WordPress.org

Ready to get started?Download WordPress

Forums

Display Zen Cart Sidebox inside Widget (54 posts)

  1. DivaVocals
    Member
    Posted 2 years ago #

    I need help trying to get Zen Cart sideboxes to display within a WordPress widget. Though I think I am on the right path, I have officially hit a wall and was hoping that someone might be able to point me in the right direction on how to get unstuck..

    I am using a Zen Cart add-on called Sideboxes Anywhere..

    Following these instructions I was successfully able to display the new products sidebox by adding the following code to my template.

    <?php
      $zcSBmodule = 'whats_new.php';
      $zcSBlayout = 'left';
      require ("/path/to/zencart/single_sidebox.php");
    ?>

    This is great except I would like to display the sidebox inside a widget, and I have been unsuccessful thus far.

    I have tried using the Executable PHP widget with no luck. When I add the code above, all the widgets in the sidebar disappear along with the footer.

    I also tried creating my own custom widget with the following code:

    <?php
    /*
    Plugin Name: Zen Cart Whats New Sidebox
    Plugin URI: http://www.yoursite.com/
    Description: Display Zen Cart Whats New sidebox inside a WordPress widget. Requires the Zen Cart Sideboxes Anywhere add-on to work.
    Author: Me
    Version: 1.0
    Author URI: http://www.yoursite.com/
    */
    
    function zen_cat() {
      $zcSBmodule = 'whats_new.php';
      $zcSBlayout = 'left';
      require ("/path/to/zencart/single_sidebox.php");
    }
    function init_zen_cat(){
        register_sidebar_widget("ZC Whats New Sidebox", "zen_cat");
    }
    add_action("plugins_loaded", "init_zen_cat");
    ?>

    This too results in the all the widgets in the sidebar & the footer disappearing.

    I am hoping that the solution is something simple that I am overlooking.. Would sure appreciate some input on this from any kind soul who can help..

  2. TraciBunkers
    Member
    Posted 2 years ago #

    Did you get this figured out? I would like to do the same thing. OR, if there is a way to display random products, not just the new ones.

  3. TraciBunkers
    Member
    Posted 2 years ago #

    I can't even get it to display by adding the code to my sidebar.php template. I've tried adding it every place imaginable, but can't get it to work.

  4. DivaVocals
    Member
    Posted 2 years ago #

    No I didn't get it figured out which is why I posted this.. Have not gotten any responses..

  5. TraciBunkers
    Member
    Posted 2 years ago #

    Too bad. I was hoping perhaps after you posted here, you figured it out. I posted on the zen cart forum to try to get help getting it to work in my sidebar.php file, but got no replies.

    I got it to work in a widget as an iframe, but the problem of course is if someone clicks on a link, it just opens it up right there in the widget, and doesn't go to the cart.

  6. DivaVocals
    Member
    Posted 2 years ago #

    If I had figured it out I would have posted something very different than a request for help.. :) If I had found a solution, I would have shared it..

  7. TraciBunkers
    Member
    Posted 2 years ago #

    It's frustrating because it seems like it shouldn't be that hard. Since there are widgets for etsy and flickr, I really wish there was one for zen cart.

  8. DivaVocals
    Member
    Posted 2 years ago #

    Well I'm sure it's not hard.. It's just that no one has shared the answer.. **shrug** I can't expect that everyone is gonna share the answer for free.. So eventually I may look into paying a developer to create this widget for me.. I'm not opposed to paying for this if needed..

    In the meantime, since I'm using the Catalyst framework to develop my theme, I may have a possible workaround I'm gonna try to see if it works.. (won't work unless you are using the Catalyst theme framework)

    I wish you luck finding an answer as well..

  9. TraciBunkers
    Member
    Posted 2 years ago #

    hey, I got it working! I found a guy via twitter, and hired him. I need to figure out the styling, but at least it's there, and he did it in a widget. Contact me and I'll give you his e-mail.
    http://www.TraciBunkers.com/blog

  10. DivaVocals
    Member
    Posted 2 years ago #

    That's awesome!!! I will contact you..

  11. DivaVocals
    Member
    Posted 2 years ago #

    Okay.. so for folks following this, using the iframes "appears" to work.. I've more testing to do before I can fully sign off on this which is why I say "appears" (your mileage may vary)..

    So let me update this thread with what I've been testing out.

    Following the Sideboxes Anywhere instructions (posted above) I created several files (1 for each sidebox I wanted to call) which contain similar code (this one is the categories sidebox zencart_categories.php):

    <?php
      $zcSBmodule = 'categories.php';
      $zcSBlayout = 'left';
      require ("/path/to/zencart/single_sidebox.php");
    ?>

    I wasn't happy with the way iframes looked using the Text/PHP widget so I researched to find a suitable iframe plugin.

    IMHO, the iframed sideboxes, behave/look best when using the "Custom IFrame Widget" plugin. The downside of this plugin is that it hardcodes in the iframe border. I resolved this by editing the plugin to remove the iframe border from the plugin code. (removing it from the plugin code versus using CSS to drop the iframe borders will ensure a wider range of cross browser compatibility)

    I'm somewhat of a stickler for detail, and I wanted to make sure that sidebox "pages" will properly validate. So I added the following to my single_sidebox.php file at the VERY top of the file:

    <!DOCTYPE html>
    <html>
    <head>
    <link rel="profile" href="http://gmpg.org/xfn/11" />
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title></title>
    </head>

    Just before the <title> opening and closing tags, you will need to add at least two more lines to your single_sidebox.php file.

    1. Some code so that links in the iframed sideboxes open where you would like (new window or same window)
    2. A link to the stylesheet which styles the sideboxes.

    Note: The site I'm building uses the WordPress template to "wrap" around Zen Cart so that Zen Cart and WordPress are styled alike. As a result, most of the store styles come from the WordPress theme's stylesheet. The Zen Cart stylesheet only manages those style declarations which affect store specific IDs and classes.

    So for the site I'm working on, instead of linking the WordPress or Zen Cart stylesheets in my single_sidebox.php file, I created a "mini" Zen Cart "sideboxes only" stylesheet just for the Zen Cart iframed sideboxes. This "mini" stylesheet contains only the declarations I needed to style the sideboxes to match the rest of the site and is stored in my WordPress theme's CSS folder. (The stylesheet contains declarations for links and images mostly -- I did not need to use any of the Zen Cart sidebox IDs and classes at all)

    Another reason I created the "sideboxes only" stylesheet is so that I could use CSS to hide the Zen Cart sidebox titles without affecting the rest of the Zen Cart shop. (I instead used the WordPress widget title to create my sidebox titles for my iframed sideboxes)

    That's it really..

    I even have it working with more than one sidebox. (It's been reported on the Sideboxes Anywhere support thread that this was not possible - wanted to confirm that I had no issue getting more than one sidebox to display using the Sideboxes Anywhere method)

    Now there is a serious caveat to using iframed sideboxes:
    I have not tested iframed sideboxes with the shopping cart or login sideboxes yet. I am fairly certain that cookies and session settings will render some fairly gnarly results if these two particular sideboxes were iframed in.. I will be testing this over the weekend, and report back my findings.

    In the meantime if my testing pans out, I will go ahead and use this method to display my Zen Cart sideboxes inside WordPress for the site I am working on. IMHO however, iframed sideboxes feel more like a workaround solution versus a solid perm solution. So longer term, I think I will investigate having a proper Zen Cart sidebox plugin for WordPress developed. (oDesk, vWorker, or Elance are excellent sources for qualified developers and it's where I'll likely go for this work)

    Once I finish testing, I'll post a link to the site I am working on so folks can see my end result.. :) Wanted to post this to pass on the information to others..

  12. DivaVocals
    Member
    Posted 2 years ago #

    Wanted to add this..

    To further clarify my previous statements, I'm truly not advocating the use (or rather I should say the OVERUSE) of iframes at all for all the reasons most often cited (accessibility, page loading times, SEO, etc). However, without a proper plugin to render the sideboxes inside a WordPress widget, the iframes APPEAR to be a viable solution. However, it should be noted that iframes can cause issues that must be taken into account and mitigated if using this method. Again, this is why while I am cautiously optimistic about this method, I probably will eventually look into having a proper plugin developed to display Zen Cart sideboxes in a WordPress widget.

    That said, I believe that the limited use of an iframe will probably be okay.. I am using a notice of external content for screenreaders to resolve any accessibility issues, there are no serious SEO concerns from displaying 1 or 2 sideboxes, and I do not plan to load more than two iframed sideboxes on a page to ensure that I don't create any performance issues.

    All this to say that I'm still testing this implementation and as of this writing I am cautiously optimistic that they will not be problematic down the road. I will of course update my findings if this turns out to NOT be the case..

  13. DivaVocals
    Member
    Posted 2 years ago #

    As it turns out, the fact that an iframe worked with this should have been the CLUE to the correct way to do this:

    My original include statement which used the local pathname looked like this:

    <?php
    include '/home2/mysite/public_html/shop/zencart-sidebox-categories.php';
    ?>

    So I changed my include statement to instead be included using a URL as follows:

    <?php
    include 'http://shop.mysite.com/zencart-sidebox-categories.php';
    ?>

    and BAM!!! It worked inside a Text/PHP widget!!! Which IMHO is the RIGHT way to do this.. No iframe needed at all!!! WHOO HOO!!! So now there are no SEO, validation, accessibility, performance, or any of the downsides to using iframes when other solutions exist.

    I kept the link to my "sidebox only" stylesheet in my single_sidebox.php file.. However now that I am not using an iframe to call my sideboxes I just need to confirm whether or not I need to include any HTML other than the CSS link to my sidebox stylesheet in my single_sidebox.php file.. Need to make sure that I don't have validation/other issues if the only thing I add to my single_sidebox.php file is this:

    <head>
    <base href="http://shop.mysite.com/" />
    <link rel="stylesheet" type="text/css" href="http://shop.mysite.com/includes/templates/MY_TEMPLATE/css/sidebox_stylesheet.css" />
    </head>

    The base link is required so that images and other content which uses relative links will display correctly.

    Now I will be testing the crap out of this, but as it turns out I may not need to have a plugin developed at all.. :) I will update this thread if I discover any issues (not anticipating any)...

    /* Begin Inside Joke */

    All in all this little "journey" only cost me $40.. **LOL**

    /* End Inside Joke */

  14. DivaVocals
    Member
    Posted 2 years ago #

    Wanted to share another thought here:
    As far as I am aware (and someone PLEASE correct me if I am wrong here) the way this add-on was INTENDED to be used is to make a call to a sidebox include file. The single_sidebox.php controls all the sideboxes. So it stands to reason that you should not be making a direct call to single_sidebox.php. While it works and you CAN call this file directly, it seems clear that this is not the way the author of this add-on intended this file to be used. Also if you are calling more than one sidebox, this is probably not a good practice.

  15. DivaVocals
    Member
    Posted 2 years ago #

    Okay.. so a few more refinements you will need to do as well..

    You will need to modify your Sideboxes Anywhere file(s) so that the sideboxes display at the same width as the sidebar widgets. Otherwise your Zen Cart sidebox content will be aligned funky inside your WordPress widget.

    There are two ways to achieve this.

    Since the sidebox include files call the single_sidebox.php file, you can update ALL your sidebox include files with one change. You would adjust the single_sidebox.php file by finding the following line:

    if (!isset($zcSBwidth)) $zcSBwidth = (isset($_GET['width'])) ? zen_db_input($_GET['width']) : 0;

    Modify the "0" value to match the width of your widget content (what's INSIDE the widget which is NOT the same as the width of the widget itself). You may need to use the Firefox Developer Tool or a similar toolset to get the width of the widget content.

    What I mean whenI say content width:
    Content width = widget width less any left/right margins or padding.

    If you want to change the width of your individual sideboxes you would add the $zcSBwidth variable to your individual sidebox include file as follows:

    <?php
      $zcSBmodule = 'whats_new.php';
      $zcSBlayout = 'left';
      $zcSBwidth =200';
      require ("/home2/public_html/path_to_your_site/single_sidebox.php");
    ?>
  16. DivaVocals
    Member
    Posted 2 years ago #

    **spoke too soon**

    Need to delete this post to post an edited version....

  17. DivaVocals
    Member
    Posted 2 years ago #

    Correction on this part:

    Modify the "0" value to match the width of your widget content (what's INSIDE the widget which is NOT the same as the width of the widget itself). You may need to use the Firefox Developer Tool or a similar toolset to get the width of the widget content.

    What I mean whenI say content width:
    Content width = widget width less any left/right margins or padding.

    The BETTER answer is to set your Zen Cart sidebox width to match your widget title width. (this MAY be the same width as your sidebar -- depends on your template's stylesheet) Again, if you don't know what this is, you can use the Firefox Developer Tool (or a similar toolset) to help you get this answer..

  18. DivaVocals
    Member
    Posted 2 years ago #

    More corrections to what I wrote previously:

    I kept the link to my "sidebox only" stylesheet in my single_sidebox.php file.. However now that I am not using an iframe to call my sideboxes I just need to confirm whether or not I need to include any HTML other than the CSS link to my sidebox stylesheet in my single_sidebox.php file.. Need to make sure that I don't have validation/other issues if the only thing I add to my single_sidebox.php file is this:

    <head>
    <base href="http://shop.mysite.com/" />
    <link rel="stylesheet" type="text/css" href="http://shop.mysite.com/includes/templates/MY_TEMPLATE/css/sidebox_stylesheet.css" />
    </head>

    The base link is required so that images and other content which uses relative links will display correctly.

    I got rid of the <head> tags altogether. They aren't required. (they never were) I knew better than to do this, I but let a "so-called" PHP expert talk me into doing it this way.. Since I didn't SEE any errors, and the sideboxes appeared to work, I thought "no harm, no foul"..

    However, when I was troubleshooting other things in my Zen Cart store, I checked the error logs only to discover that the code at the top of my single_sidebox.php file was causing Zen Cart to generate HUNDREDS of "headers already sent" error logs in Zen Cart.. (1 error log for every sidebox I displayed everytime I refreshed the page) as I suspected all along this code does cause errors on the Zen Cart side..

    So I removed the<head> tags and moved the remaining lines to the BOTTOM of the single_sidebox.php file (after the "?>"). So all that you see at the bottom of my single_sidebox.php file is this:

    <base href="http://shop.mysite.com/" />
    <link rel="stylesheet" type="text/css" href="http://shop.mysite.com/includes/templates/MY_TEMPLATE/css/sidebox_stylesheet.css" />

    And everything still works as it should and there are NO MORE error messages in the Zen Cart error logs..

  19. DivaVocals
    Member
    Posted 2 years ago #

    More information..

    As I suspected, using the shopping cart and login sideboxes with Sideboxes Anywhere does generate errors in Zen Cart.

    A quick look at my Zen Cart cache folder after viewing the URL for the the login sidebox page showed an error log was generated which contained the following:

    [29-Dec-2011 09:41:40] PHP Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home2/yoursite/public_html/shop/single_sidebox.php:6) in /home2/yoursite/public_html/shop/includes/functions/sessions.php on line 114
    [29-Dec-2011 09:41:40] PHP Warning: Cannot modify header information - headers already sent by (output started at /home2/yoursite/public_html/shop/single_sidebox.php:6) in /home2/yoursite/public_html/shop/includes/init_includes/init_templates.php on line 78

    The shopping cart sidebox page generated an error log as well:

    [29-Dec-2011 09:46:04] PHP Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home2/yoursite/public_html/shop/single_sidebox.php:6) in /home2/yoursite/public_html/shop/includes/functions/sessions.php on line 114
    [29-Dec-2011 09:46:04] PHP Warning: Cannot modify header information - headers already sent by (output started at /home2/yoursite/public_html/shop/single_sidebox.php:6) in /home2/yoursite/public_html/shop/includes/init_includes/init_templates.php on line 78

    The point here is that in my testing the Sideboxes Anywhere code works just fine for the following sideboxes:

    1. Search
    2. New Products
    3. Specials
    4. Featured Products
    5. Categories
    6. Best Sellers

    I'm sure it works with other sideboxes as well.. But it appears that any sideboxes which have session information like the login or shopping cart sideboxes will generate errors.

    For anyone who needs the login or shopping cart sideboxes to display in WordPress, you will probably have to seek the services of a qualified developer to get the code for sessions correct. Personally I think it's debatable whether or not login or shopping cart info needs to be displayed in WordPress..

  20. DivaVocals
    Member
    Posted 2 years ago #

    I'm going to start a new thread to summarize what I've done.. I'm done with my implementation. Hope someone else finds this information useful..

  21. DivaVocals
    Member
    Posted 2 years ago #

    Summary of My Findings

    You will need to use the Zen Cart add-on called Sideboxes Anywhere..

    You will need to following these instructions to create the files needed for this to all work. You need to test all your sidebox call files to make sure they work and display the sidebox you want it to display.

    This thread will not address any specific issues with configuring the Zen Cart Sideboxes Anywhere add-on. Issues with configuring the Sideboxes Anywhere add-on should be posted on the Zen Cart support forums.

    Please read Tip 3 before you begin. It provides information with regards to sideboxes which rely on sessions. (login or shopping cart sideboxes)

    Once you have the Sideboxes Anywhere add-on setup, then here's what you need to do to display your Zen Cart sideboxes inside a WordPress widget.

    1. You will need a plugin like the Executable PHP widget. You cannot use a plain text widget.
    2. At the BOTTOM of the single_sidebox.php file (after the "?>") add this:
      <base href="http://shop.mysite.com/" />
      <link rel="stylesheet" type="text/css" href="http://shop.mysite.com/includes/templates/MY_TEMPLATE/css/sidebox_stylesheet.css" />

      The base link is required so that images and other content which uses relative links will display correctly. The stylesheet link helps with styling the sideboxes.

      Tip: Instead of linking the WordPress or Zen Cart stylesheets in my single_sidebox.php file, I created a "mini" Zen Cart "sideboxes only" stylesheet just for the Zen Cart sideboxes. This "mini" stylesheet contains only the declarations I needed to style the sideboxes to match the rest of the site and is stored in my WordPress theme's CSS folder.

      Another reason I created the "sideboxes only" stylesheet is so that I could use CSS to hide the Zen Cart sidebox titles without affecting the rest of the Zen Cart shop. (I instead used the WordPress widget title to create my sidebox titles)

    3. Using the PHP/Text widget plugin add a PHP/Text widget which contains the following code:
      <?php
      include 'http://shop.mysite.com/zencart-sidebox-categories.php';
      ?>

      You will additional PHP/Text widgets for each sidebox you wish to display. Remember if you followed the Sideboxes Anywhere instructions you will have created one file for each sidebox you wish to "widgetize".

    Notes/Tips:
    Tip 1
    Sideboxes Anywhere was INTENDED to be used is to make a call to a sidebox include file. The single_sidebox.php controls all the sideboxes. So it stands to reason that you should not be making a direct call to single_sidebox.php. While it works and you CAN call this file directly, it seems clear that this is not the way the author of this add-on intended this file to be used. Also if you are calling more than one sidebox, this is probably not a good practice.

    Tip 2
    You will need to modify your Sideboxes Anywhere file(s) so that the sideboxes display at the same width as the sidebar widgets. Otherwise your Zen Cart sidebox content will be aligned funky inside your WordPress widget.

    There are two ways to achieve this.

    Since the sidebox include files call the single_sidebox.php file, you can update ALL your sidebox include files with one change. You would adjust the single_sidebox.php file by finding the following line:

    if (!isset($zcSBwidth)) $zcSBwidth = (isset($_GET['width'])) ? zen_db_input($_GET['width']) : 0;

    Modify the "0" value to match the width of your sidebox header.

    If you want to change the width of your individual sideboxes you would add the $zcSBwidth variable to your individual sidebox include file as follows:

    <?php
      $zcSBmodule = 'whats_new.php';
      $zcSBlayout = 'left';
      $zcSBwidth =200';
      require ("/home2/public_html/path_to_your_site/single_sidebox.php");
    ?>

    Tip 3
    As I suspected, using the shopping cart and login sideboxes with Sideboxes Anywhere does generate errors in Zen Cart.

    A quick look at my Zen Cart cache folder after viewing the URL for the the login sidebox page showed an error log was generated which contained the following:

    [29-Dec-2011 09:41:40] PHP Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home2/yoursite/public_html/shop/single_sidebox.php:6) in /home2/yoursite/public_html/shop/includes/functions/sessions.php on line 114
    [29-Dec-2011 09:41:40] PHP Warning: Cannot modify header information - headers already sent by (output started at /home2/yoursite/public_html/shop/single_sidebox.php:6) in /home2/yoursite/public_html/shop/includes/init_includes/init_templates.php on line 78

    The shopping cart sidebox page generated an error log as well:

    [29-Dec-2011 09:46:04] PHP Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home2/yoursite/public_html/shop/single_sidebox.php:6) in /home2/yoursite/public_html/shop/includes/functions/sessions.php on line 114
    [29-Dec-2011 09:46:04] PHP Warning: Cannot modify header information - headers already sent by (output started at /home2/yoursite/public_html/shop/single_sidebox.php:6) in /home2/yoursite/public_html/shop/includes/init_includes/init_templates.php on line 78

    The point here is that in my testing the Sideboxes Anywhere code works just fine for the following sideboxes:

    1. Search
    2. New Products
    3. Specials
    4. Featured Products
    5. Categories
    6. Best Sellers

    I'm sure it works with other sideboxes as well.. But it appears that any sideboxes which have session information like the login or shopping cart sideboxes will generate errors.

    For anyone who needs the login or shopping cart sideboxes to display in WordPress, you will probably have to seek the services of a qualified developer to get the code for sessions correct. Personally I think it's debatable whether or not login or shopping cart info needs to be displayed in WordPress..

  22. DivaVocals
    Member
    Posted 2 years ago #

    Dev site I've been working on with the Zen Cart sidebox widgets in place..
    http : // clientyourplateormineinc . overthehillweb . com/

  23. TraciBunkers
    Member
    Posted 2 years ago #

    I was very excited by what you figured out. I'm not sure if I've done something wrong, but when I put in the widget, and the code for it, it messes up my blog.

    I wonder if it has to do with my WP theme. I've had to make a lot of changes to it so that other things would work. I'm using the Minibox for WordPress (Black) 1.1 theme.

  24. TraciBunkers
    Member
    Posted 2 years ago #

    Well, I just previewed a different theme, and it broke it too. So maybe the theme isn't the issue.

  25. DivaVocals
    Member
    Posted 2 years ago #

    Without anything more descriptive than "it messes up my blog" or "it broke it too" it's hard to say what might have happened.. Some details would help..

  26. TraciBunkers
    Member
    Posted 2 years ago #

    The best way to show what happened is probably with a screen shot. Here's what it looks like without the PHP widget.

    And here's what it looks like with the php widget in the right column, right under the picture of the book. The heading shows up, but nothing after it. Plus the white background is gone along with the posts.

    I'm using the widget you suggested. The code I have in it is

    <?php
    include 'http://www.tracibunkers.com/zen_whats_new_sidebox.php';
    ?>

    I've got the zen_whats_new_sidebox.php file in my public folder. Here's the file:

    <?php
      $zcSBmodule = 'whats_new.php';
      $zcSBlayout = 'right';
      define('DIR_WS_IMAGES' , 'http://www.tracibunkers.com/zen/images/');
      require ('/home/tracibu/public_html/zen/single_sidebox.php');
    ?>

    At the bottom of my single_sidebox.php file, I have this:

    <base href="http://www.TraciBunkers.com/" />
    <link rel="stylesheet" type="text/css" href="http://www.TraciBunkers.com/zen/includes/templates/cherry_zen/css/stylesheet.css" />

    I also set the column width to 180, which is the width of my right sidebar.

    If you go to http://www.tracibunkers.com/zen_whats_new_sidebox.php the images don't show up, just the text. If you go to http://www.tracibunkers.com/zen/single_sidebox.php they do.

    Any ideas what I have done wrong?

  27. DivaVocals
    Member
    Posted 2 years ago #

    Off the top of my head I'd say mostly everything looks correct.. However, this line in your zen_whats_new_sidebox.php is probably not necessary:

    define('DIR_WS_IMAGES' , 'http://www.tracibunkers.com/zen/images/');

    Also I'd take a look at your Zen Cart cache folder and see what the last few error logs read.. They might contain a clue as to the issue.. To be VERY sure, I'd delete the log files and try refreshing your page to see if an error log is generated by your code..

  28. DivaVocals
    Member
    Posted 2 years ago #

    Took me 5 minutes to implement this on another site with a COMPLETELY different template setup (one site uses Catalyst template framework, the other is an Artisteer generated template). It worked first time out (no error logs generated either)..

    So I took another look at how you set things up.. (links are MUCH MORE helpful than screenprints for troubleshooting BTW..)

    The base href URL at the bottom of your single_sidebox.php file should be the URL for your store.. (Hence why the images don't show up)

  29. TraciBunkers
    Member
    Posted 2 years ago #

    I changed the base href from http://www.tracibunkers.com to http://www.tracibunkers.com/zen and the images still don't show up.

    I took out the line you mentioned:define('DIR_WS_IMAGES' , 'http://www.tracibunkers.com/zen/images/'); I had originally put it there because I had read it was needed for the images to show. But with & without it's not making a difference.

    I checked my zen cart error log, made 2 changes to the single_sidebox.php file and that got rid of any errors. But, I'm still not having any luck with it working on my blog. I have tried putting this:

    <?php
    include 'http://www.tracibunkers.com/zen/single_sidebox.php';
    ?>

    and this:

    <?php
    include 'http://www.tracibunkers.com/zen_whats_new_sidebox.php';
    ?>

    into the php widget and I have the same problem. I tried putting the widget on the left sidebar just to see if it made a difference, but had the same problem with everything after the sidebox heading not showing up, along with no white background or posts.

    I went to my cPanel to read the error log there. When I call the single_sidebox directly, I only get these errors:
    [Mon Jan 02 12:33:49 2012] [error] [client 66.219.58.44] File does not exist: /home/tracibu/public_html/404.shtml
    [Mon Jan 02 12:33:49 2012] [error] [client 66.219.58.44] File does not exist: /home/tracibu/public_html/robots.txt

    When I call the sidebox through zen_whats_new_sidebox.php, I get more errors, relating to the zen_whats_new_sidebox.php:
    [Mon Jan 02 12:49:06 2012] [error] [client 66.249.72.5] File does not exist: /home/tracibu/public_html/404.shtml
    [Mon Jan 02 12:49:06 2012] [error] [client 66.249.72.5] File does not exist: /home/tracibu/public_html/zen/bonkersheadquarters1965/backups/dump
    [Mon Jan 02 12:47:09 2012] [error] [client 71.201.124.118] File does not exist: /home/tracibu/public_html/404.shtml, referer: http://www.tracibunkers.com/workshops/workshops.htm
    [Mon Jan 02 12:47:09 2012] [error] [client 71.201.124.118] File does not exist: /home/tracibu/public_html/workshops/favicon.ico, referer: http://www.tracibunkers.com/workshops/workshops.htm
    [Mon Jan 02 12:45:59 2012] [error] [client 65.52.110.199] File does not exist: /home/tracibu/public_html/404.shtml
    [Mon Jan 02 12:45:59 2012] [error] [client 65.52.110.199] File does not exist: /home/tracibu/public_html/robots.txt
    [Mon Jan 02 12:45:25 2012] [error] [client 208.115.111.75] File does not exist: /home/tracibu/public_html/404.shtml
    [Mon Jan 02 12:45:25 2012] [error] [client 208.115.111.75] File does not exist: /home/tracibu/public_html/robots.txt
    [Mon Jan 02 12:44:47 2012] [error] [client 24.143.56.215] File does not exist: /home/tracibu/public_html/404.shtml, referer: http://www.tracibunkers.com/zen_whats_new_sidebox.php
    [Mon Jan 02 12:44:47 2012] [error] [client 24.143.56.215] File does not exist: /home/tracibu/public_html/bmz_cache, referer: http://www.tracibunkers.com/zen_whats_new_sidebox.php
    [Mon Jan 02 12:43:39 2012] [error] [client 24.143.56.215] File does not exist: /home/tracibu/public_html/404.shtml, referer: http://www.tracibunkers.com/zen_whats_new_sidebox.php
    [Mon Jan 02 12:43:39 2012] [error] [client 24.143.56.215] File does not exist: /home/tracibu/public_html/bmz_cache, referer: http://www.tracibunkers.com/zen_whats_new_sidebox.php
    [Mon Jan 02 12:42:45 2012] [error] [client 88.131.106.6] File does not exist: /home/tracibu/public_html/404.shtml
    [Mon Jan 02 12:42:45 2012] [error] [client 88.131.106.6] File does not exist: /home/tracibu/public_html/robots.txt

    So, I'm not exactly sure what the problem is. I even uploaded a clean single_sidebox.php file, then pasted the the base hfref link at the bottom.

    If there is a link I should post that will help, let me know!

  30. TraciBunkers
    Member
    Posted 2 years ago #

    Oh, one tiny bit of success. I got the images to show up at http://www.tracibunkers.com/zen_whats_new_sidebox.php

    I added a / after zen. so now at the very bottom of my single_sidebox.php file, I have:
    <base href="http://www.TraciBunkers.com/zen/" />

Topic Closed

This topic has been closed to new replies.

About this Topic