Zen Cart Logo
Forums / All Other Contributions/Addons / can you help me with php for the "external sidebox" contribution?

can you help me with php for the "external sidebox" contribution?

Locked

Views: 1,491

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
29 Oct 2006, 11:26 AM
#1
p_m avatar

p_m

New Zenner

Join Date:
Sep 2006
Posts:
27
Plugin Contributions:
0

can you help me with php for the "external sidebox" contribution?

i'm setting up a zencart shop in a subdirectory (/shop) of my wife's art blog (plastiquemonkey.com), which is built on wordpress. the blog is reasonably busy and will likely be the main source of visitors to the shop. i'd like to include the zencart "whats new" sidebox in the blog's sidebar, in order to draw people in.

i've been trying to figure out the "single sidebox for external file" contribution. the contribution doesn't include detailed instructions, because it's designed for people familiar with PHP. i'm a PHP rookie, but i'm trying.

this comment is the best guide i've found about how to set up the contribution. but i still haven't been able to make it work.

here's what i've done so far:

  1. set up a dummy blog page (not accessible from the main site) to play with this: plastiquemonkey.com/tagshop/
  2. edited the wordpress sidebar.php file to include the "external sidebox" code -- and limited that to the single new page so i won't crash the main site
  3. defined variable sidebox_name to whats_new.php (as per Dr Byte's comments in the code)
  4. changed the path to "require application_top.php" to be relative to the file...

well, that's where the problem is, i think. the file (the wordpress page) is in its own sub-directory (plastiquemonkey.com/tagshop/). i can't figure out how to get from there to application_top.

i get "failed to open stream: No such file or directory..." errors with:
includes/application_top.php
shop/includes/application_top.php
../shop/includes/application_top.php

i'm using ../ to try to move back to the root directory from the page /tagshop/, then forward again -- the blog is in the root directory (but all its pages are in their own child directories), the shop's root is /shop.

i'm not sure what to try next. can you help me figure this one out?

4 Nov 2006, 4:02 AM
#2
p_m avatar

p_m

New Zenner

Join Date:
Sep 2006
Posts:
27
Plugin Contributions:
0

Re: can you help me with php for the "external sidebox" contribution?

still haven't been able to figure this out, but i knocked together a rough imitation using the "rotator" function described here:

http://alistapart.com/articles/betterrotator/

had to hand code the entire list of image SRC's, URL's and titles, and it was fussy to implement.

but it works!