Zen Cart Logo
Forums / Addon Sideboxes / Put A Zc Sidebox On A Page Outside Zc?

Put A Zc Sidebox On A Page Outside Zc?

Views: 21,138

Results 61 to 68 of 68
25 Mar 2008, 12:58 PM
#61
billedmunds avatar

billedmunds

New Zenner

Join Date:
Dec 2005
Posts:
52
Plugin Contributions:
0

Put A Zc Sidebox On A Page Outside Zc?

Somewhere, single_sidebox is picking up the http URL and adding the absolute server path to form:

http://www.billedmunds.com/home/billedmu/public_html/shop/images/[image].jpg

I'v done a cursory look at single_sidebox.php, random.php (my chosen sidebox) and the store admin but I don't know where either path is originating.

Any suggestions welcome.

27 Mar 2008, 5:02 PM
#62
billedmunds avatar

billedmunds

New Zenner

Join Date:
Dec 2005
Posts:
52
Plugin Contributions:
0

Re: Put A Zc Sidebox On A Page Outside Zc?

I removed the whole installation and re-installed Sidebox Anywhere. The path problem seems to be corrected. However, Sidebox Anywhere is now looking for the images in the bmz_cache folder.

"http://www.billedmunds.com/bmz_cache/2/26ec5d163f6ffaa35cee2999a8a6efd7.image.200x250.jpg"

Links are correct and the everything works but the images.

Thanks,

28 Mar 2008, 3:53 PM
#63
aly22 avatar

aly22

Zen Follower

Join Date:
Feb 2008
Posts:
174
Plugin Contributions:
0

Re: Put A Zc Sidebox On A Page Outside Zc?

I'm just completely stumped on this, too. I wonder if there's a permissions issue to the images directory? We need to figure out where that image path is generated from. Unfortunately, it looks like we're the only ones still on this thread :blink:

3 Apr 2008, 4:34 AM
#64
neon_phoenix avatar

neon_phoenix

New Zenner

Join Date:
Dec 2007
Posts:
34
Plugin Contributions:
0

Re: Put A Zc Sidebox On A Page Outside Zc?

I have no experience with functions, but I am attempting to create one to display multiple sideboxes on one page outside of Zen Cart. I am working with a file off the Zen Cart directory. path\to\zencart\test\test.php All I get is a blank page.

<link rel="stylesheet" type="text/css" href="../includes/templates/bbp/css/stylesheet.css" />
<?php

function zcSB($module, $layout, $width)
	{
	$zcSBmodule = $module;		
	$zcSBlayout = $layout;
	//$zcSBwidth  = $width;
	require('../single_sidebox.php');
	}

zcSB('categories.php', 'left', '');

?>

With the variable names getting redefined every time I call the function, would something like the ```
unset()


Thank you.
4 Apr 2008, 1:47 AM
#65
neon_phoenix avatar

neon_phoenix

New Zenner

Join Date:
Dec 2007
Posts:
34
Plugin Contributions:
0

Re: Put A Zc Sidebox On A Page Outside Zc?

Bill,

The bmz_cache directory is used by the Image Handler contribution for resized images.

I found a quick fix to your problem. In single_sidebox.php on line 37 // define('DIR_WS_IMAGES', $zcDir . 'images/'); you need to uncomment (remove the slashes from) the line. In your case you would change it to" ```
define('DIR_WS_IMAGES', 'shop/' . 'images/');

That fix does not allow the use of "Image Handler" for resized thumbnails outside of Zen-Cart.  The images will display something like: <http://www.billedmunds.com/shop/images/SOMETHING.jpg>.

> **billedmunds:**
>
> I removed the whole installation and re-installed Sidebox Anywhere. The path problem seems to be corrected. However, Sidebox Anywhere is now looking for the images in the bmz_cache folder.
> 
> "http://www.billedmunds.com/bmz_cache/2/26ec5d163f6ffaa35cee2999a8a6efd7.image.200x250.jpg"
> 
> Links are correct and the everything works but the images. 
> 
> Thanks,
4 Apr 2008, 5:03 AM
#66
aly22 avatar

aly22

Zen Follower

Join Date:
Feb 2008
Posts:
174
Plugin Contributions:
0

Re: Put A Zc Sidebox On A Page Outside Zc?

(Whoa nevermind)

That works great! Thanks, Karl!

1 Apr 2009, 10:23 AM
#67
jeronimo avatar

jeronimo

New Zenner

Join Date:
Apr 2009
Posts:
1
Plugin Contributions:
0

Re: Put A Zc Sidebox On A Page Outside Zc?

It strange, but if I define('DIR_WS_IMAGES', 'shop/' . 'images/');
then I get images with width="0" and normal height.
If DIR_WS_IMAGES goes as it stated in config, then I got proper sizes, but not images, couse they are in another dir.

28 Apr 2009, 11:57 PM
#68
eduarte avatar

eduarte

New Zenner

Join Date:
Apr 2009
Posts:
1
Plugin Contributions:
0

Re: Put A Zc Sidebox On A Page Outside Zc?

DrByte thank you for the code I did test it and works fine outside Zc but in the same domain of the store. My question is: How can I do for call single_sidebox.php from a different whatever domain? Can I do it with this code?

I mean:
I have my store in:
https://www.mysdomain1.com/zencart/store

And I want to show the sideboxe from domain1 in:
https://www.mydomain2.com

Is this possible?

Thank you