Results 1 to 10 of 10
  1. #1
    Join Date
    Oct 2007
    Posts
    157
    Plugin Contributions
    0

    Default Can't Get Side Box Anywhere to work

    I am trying to have a sidebox on my self-hosted workdpress blog to show my new products. I followed the instructions for the Side Box Anywhere, but couldn't get it to work.

    So I researched other posts on it, and followed what this one said to do:
    http://www.zen-cart.com/forum/showth...le_sidebox.php
    so in the single_sidebox.php file, I set the full path to the application_top to this:
    PHP Code:
    require('/home/MY-USERNAME/public_html/zen/includes/application_top.php'); 
    I uploaded the single-sidebox in my zen folder.

    I tried pasting this code:
    PHP Code:
    <?php
      $zcSBmodule 
    'whats_new.php';
      
    $zcSBlayout 'right';
      require (
    '/home/MY-USERNAME/public_html/zen/single_sidebox.php');
    ?>
    into my sidebar.php and tried it in different places, but couldn't get it to work--I want it to be on the right sidebar. Here's the code for that file for the right sidebar:
    PHP Code:
    <!-- start sidebar-wrapper-right -->
    <div id="sidebar-wrapper-right" class="sidebar">
        <ul id="sidebar-2">
        <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar(2) ) : else : ?>
            <div class="widget">
            <li><h2 class="title"><?php _e('Profile'); ?></h2>
                <p>This is a test profile widget</p>
            </li>
            </div>
        <?php endif; ?>
        </ul>
    </div>
    <!-- start sidebar-wrapper-right -->
    I also tried using some wordpress plugins/widgets that are supposed to let you put php in the text box widgets, but that didn't work.

    Also, I put in the width for the side box into the single_sidebox.php file in case my zen cart default was too big:
    PHP Code:
     if (!isset($zcSBwidth)) $zcSBwidth  = (isset($_GET['width'])) ? zen_db_input($_GET['width']) : 180
    Any ideas on what I'm doing wrong, or where exactly I should paste the code on my sidebar.php file?

    My blog is http://www.TraciBunkers.com/blog

    THANKS!

  2. #2
    Join Date
    Oct 2007
    Posts
    157
    Plugin Contributions
    0

    Default Re: Can't Get SideBox Anywhere to work

    Anyone have any ideas? I'm not sure if I haven't gotten any replies because I called it Side box instead of sidebox, so people aren't finding it.

  3. #3
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Can't Get SideBox Anywhere to work

    The Zen Cart piece works fine: http://www.tracibunkers.com/zen/single_sidebox.php

    As for how to get WordPress to display it, I'm sorry that's not code I'm familiar with.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #4
    Join Date
    Oct 2007
    Posts
    157
    Plugin Contributions
    0

    Default Re: Can't Get Side Box Anywhere to work

    Hi DrByte,
    I figured it wasn't an issue with the addon since I was able to see it at http://www.tracibunkers.com/zen/single_sidebox.php

    I was just hoping someone could tell me where to paste in my sidebar.php file for wordpress, or how to make it work in a sidebar widget in wordpress. I posted on the wordpress forum also, but no luck.

    Thanks for looking at it.

  5. #5
    Join Date
    Oct 2007
    Posts
    157
    Plugin Contributions
    0

    Default Re: Can't Get Side Box Anywhere to work

    I'm still struggling with this. What I don't understand is why this works: http://www.tracibunkers.com/zen/single_sidebox.php

    But, I'm unable to call the single_sidebox.php file--not just in wordpress, but even on a plain html page.

    I made a php file called zen_whats_new_sidebox.php to call the single_sidebox.php file. Here's what I have in it:

    PHP Code:
    <?php
      $zcSBmodule 
    'whats_new.php';
      
    $zcSBlayout 'left';
      
    $zcSBwidth 180;
      require (
    "/home/tracibu/public_html/zen/single_sidebox.php");
    ?>
    I have tried calling that file in wordpress with no luck. And on a plain html page just to see if I can get it to work--but nothing shows up.

    I've tried pasting the above code into the body of an html page; I've tried pasting this:

    PHP Code:
    <?php
    include ('http://www.tracibunkers.com/zen_whats_new_sidebox.php');
    ?>
    and this:
    PHP Code:
    <?php
    include (home_url'/' ) . 'zen_whats_new_sidebox.php');
    ?>
    but I can't get anything to show up. I've got the single_sidebox.php in my shop folder, and the zen_whats_new_sidebox.php in my public folder. Any ideas? I'm getting pretty frustrated. Thanks!

  6. #6
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Can't Get Side Box Anywhere to work

    Many servers don't let you run PHP code inside a .html page. You would need to name the page with a .php extension instead of .html.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    Oct 2007
    Posts
    157
    Plugin Contributions
    0

    Default Re: Can't Get Side Box Anywhere to work

    I was able to paste php code into an html page to show a form--and it worked. But not this:
    PHP Code:
    <?php
    include ("/home/tracibu/public_html/zen_whats_new_sidebox.php");
    ?>
    oi!

    And maybe that doesn't really matter because I want to show it on my blog. But when I paste it into a php page in my blog, it doesn't show up. I've tried it in various places, and even started a new test blog, with a different theme in case the problem was with my theme. But that didn't make a difference.
    Last edited by tracib; 4 Jan 2012 at 06:23 AM.

  8. #8
    Join Date
    Oct 2007
    Posts
    157
    Plugin Contributions
    0

    Default Re: Can't Get Side Box Anywhere to work

    Tonight I pasted this
    PHP Code:
    <?php
    include ("/home/tracibu/public_html/zen_whats_new_sidebox.php");
    ?>
    into the index.php file of my wordpress blog theme, and the new products showed up! Of course it wasn't where I wanted it, but it was there. BUT, if I pasted it into any other php file for my theme, like the sidebar, it didn't show up. Depending on where I put it, it either made no difference, or made the right sidebar content disappear (since that's where I was trying to put it).

    Does that give any clues to what I'm doing wrong & how to fix it? Please oh please?

  9. #9
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,023
    Plugin Contributions
    32

    Default Re: Can't Get Side Box Anywhere to work

    "throw it up against the wall to see what sticks" brand of troubleshooting is not always the best way to get an answer to a problem.. Especially this problem.. Getting Sideboxes Anywhere to work within WordPress is not likely to be answered by anyone unless someone knows BOTH platforms well enough to answer you (and that they are willing to share the information).. It's just not a quick answer..

    As I explained on the WordPress forum, what you've posted here ALL BY ITSELF will not give anyone a clue as to why this code won't work in a WordPress widget vs a WordPress page (which is what you are trying to do) unless they know BOTH platforms.. I'm sure the answer is a simple one, but it will take someone who knows BOTH platforms to get it to work properly. (the gentleman who tried to help you with this is DEFINITELY not that guy..)

    Personally I'd prefer to find the right answer versus implementing a hacky solution that works today, but breaks on the next WP or ZC update..

    I know that still doesn't give you the answer, but it might be time to consider paying for an expert to give you the right solution.. If there is an expert out there who knows the answer they appear to not be in a sharing mood on this one..

    Quote Originally Posted by tracib View Post
    Tonight I pasted this
    PHP Code:
    <?php
    include ("/home/tracibu/public_html/zen_whats_new_sidebox.php");
    ?>
    into the index.php file of my wordpress blog theme, and the new products showed up! Of course it wasn't where I wanted it, but it was there. BUT, if I pasted it into any other php file for my theme, like the sidebar, it didn't show up. Depending on where I put it, it either made no difference, or made the right sidebar content disappear (since that's where I was trying to put it).

    Does that give any clues to what I'm doing wrong & how to fix it? Please oh please?
    Last edited by DivaVocals; 9 Jan 2012 at 08:53 PM.
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  10. #10
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,023
    Plugin Contributions
    32

    Default Re: Can't Get Side Box Anywhere to work

    Quote Originally Posted by tracib View Post
    I was able to paste php code into an html page to show a form--and it worked. But not this:
    PHP Code:
    <?php
    include ("/home/tracibu/public_html/zen_whats_new_sidebox.php");
    ?>
    oi!

    And maybe that doesn't really matter because I want to show it on my blog. But when I paste it into a php page in my blog, it doesn't show up. I've tried it in various places, and even started a new test blog, with a different theme in case the problem was with my theme. But that didn't make a difference.
    It wouldn't work because you can't paste PHP code into a page using the blog page editor..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

 

 

Similar Threads

  1. Side Box anywhere HELP please
    By boomfunk in forum Addon Sideboxes
    Replies: 6
    Last Post: 1 Apr 2011, 02:31 PM
  2. can't get new logo to show in side box banner
    By Rob905 in forum Customization from the Admin
    Replies: 2
    Last Post: 28 Jun 2009, 10:37 PM
  3. Can't get side box link to work
    By scottsplace in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 26 Feb 2009, 10:57 PM
  4. Side Box Anywhere mod
    By sjemms in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 1 Feb 2008, 07:42 AM
  5. Side Box Anywhere & Specials
    By sjemms in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 30 Dec 2007, 12:41 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR