Page 1 of 3 123 LastLast
Results 1 to 10 of 22
  1. #1
    Join Date
    Mar 2013
    Posts
    48
    Plugin Contributions
    0

    Default Changes to sidebars... very frustrated...

    Hi Zen Cart Forum,

    This is my first time posting here... i am just looking for some help with modifying the sidebar in zen cart.

    It seems like the whole shopping cart software is designed to function around these annoying sideboxes. I dont want to totally get rid of the sideboxes, because i still have interest in using some of them- but - Is there a way to get my own content (HTML) in the side bar??? Which files would i have to modify in order to do that? Your help with this would be much appreciated.

    my website is https://www.toyzeum.com/store/


    as you can see...

    i have attempted to do this by modifying the files "tpl_box_default_left.php" and "tpl_box_default_right.php" in the "common" subfolder of the "template-default" folder. However whenever a sidebox is present it also repeats my HTML content... That is why the "INCOMING" image repeatedly shows... Any suggestions? I already tried the blank sidebox plugin but was not happy with the results of that either because i do not want boxes but rather the freedom to post pure HTML content or call up other scripts in the sidebar...

    This is what the coding looks like of the tpl_box_default_right.php

    ##################################################
    <?php
    /**
    * Common Template - tpl_box_default_right.php
    *
    * @package templateSystem
    * @copyright Copyright 2003-2005 Zen Cart Development Team
    * @copyright Portions Copyright 2003 osCommerce
    * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    * @version $Id: tpl_box_default_right.php 2975 2006-02-05 19:33:51Z birdbrain $
    */




    // choose box images based on box position
    if ($title_link) {
    $title = '<a href="' . zen_href_link($title_link) . '">' . $title . BOX_HEADING_LINKS . '</a>';
    }
    //
    ?>




    <IMG SRC="https://www.toyzeum.com/store/images/main/rightsidebar_incoming<?
    //Chooses a random number
    $num = Rand (1,6);
    //Based on the random number, gives a quote
    switch ($num)
    {
    case 1:
    echo "1";
    break;
    case 2:
    echo "2";
    break;
    case 3:
    echo "2";
    break;
    case 4:
    echo "2";
    break;
    case 5:
    echo "1";
    break;
    case 6:
    echo "1";
    }
    ?>.jpg">




    <!--// bof: <?php echo $box_id; ?> //-->



    <div class="rightBoxContainer" id="<?php echo str_replace('_', '-', $box_id ); ?>" style="width: <?php echo $column_width; ?>">
    <h3 class="rightBoxHeading" id="<?php echo str_replace('_', '-', $box_id) . 'Heading'; ?>"><?php echo $title; ?></h3>
    <?php echo $content; ?>
    </div>
    <!--// eof: <?php echo $box_id; ?> //-->
    ########################################################


    Thank you so much!

    Sincerely,

    Aaron morgan

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Changes to sidebars... very frustrated...

    i have attempted to do this by modifying the files "tpl_box_default_left.php" and "tpl_box_default_right.php" in the "common" subfolder of the "template-default" folde
    First you should not be altering any of the files in the template-default structure
    Review these tutorials
    http://www.zen-cart.com/content.php?...verride-system
    http://www.zen-cart.com/content.php?...late-overrides

    Secondly, I can not tell what it is that you want???


    /TOYZEUM/css/stylesheet.css"

  3. #3
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: Changes to sidebars... very frustrated...

    tpl_box_default_right.php and tpl_box_default_left.php are framework structural pieces which are used to output the actual sideboxes built from sidebox-specific files/templates.

    The fastest way to accomplish what (I think) you're after is to use the Blank Sidebox plugin (http://www.zen-cart.com/downloads.php?do=file&id=80 ) and plug your custom HTML into that. A great side-benefit of doing that is that'll show you all the files involved in how any given sidebox works.
    .

    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
    Mar 2013
    Posts
    48
    Plugin Contributions
    0

    Default Re: Changes to sidebars... very frustrated...

    What I am trying to do is to place HTML in the sidebox area above where the boxes appear... is this even possible? modification to the code above makes the image appear every time a new sidebox appears. I only want the incoming image to display once and that is on top of all of the side boxes. Is there a way to call up content on top of the sideboxes without having to call up a new sidebox just in order for the content to display? The content is re-displaying with every sidebox and I do not want that.

    As far as the blank sidebox script. It still is having the boxes and i do not want my HTML contained within a box with a title... I just want pure HTML in the sidebar. Is there a way to get rid of the actual box with that script and just have pure HTML content display?

  5. #5
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: Changes to sidebars... very frustrated...

    Use the Blank Sidebox mod, and remove the header and border, either by editing the sidebox code or from the stylesheet.

  6. #6
    Join Date
    Mar 2013
    Posts
    48
    Plugin Contributions
    0

    Default Re: Changes to sidebars... very frustrated...

    can you show me an example how to remove that? Please forgive me as I am also new to the world of PHP editing.. I am looking at the blank sidebox code below- what should be removed for the header and border to not display anymore?

    ##################################
    <?php
    /**
    * blank sidebox - allows a blank sidebox to be added to your site
    *
    * @package templateSystem
    * @copyright 2007 Kuroi Web Design
    * @copyright Portions Copyright 2003-2007 Zen Cart Development Team
    * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    * @version $Id: blank_sidebox.php 2007-05-26 kuroi $
    */

    // test if box should display
    $show_blank_sidebox = true;

    if ($show_blank_sidebox == true) {
    require($template->get_template_dir('tpl_blank_sidebox.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_blank_sidebox.php');
    $title = BOX_HEADING_BLANK_SIDEBOX;
    $title_link = false;
    require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
    }
    ?>
    ################################################


    if i edit the style sheet... wouldnt that effect all of the sideboxes and not just the blank sidebox?

    Thanks for your help

    -Aaron

  7. #7
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: Changes to sidebars... very frustrated...

    The stylesheet is the easier way. Most of the sideboxes have their own classes and ids so they can be styled separately. Install the Blank Sidebox and place it where you want in Layout Boxes Controller. Then place this in your stylesheet:

    #blanksidebox {border: none;}
    #blanksideboxHeading {display: none;}

    See here at the top of the left column:

    http://www.stevesh.com/demo

  8. #8
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Changes to sidebars... very frustrated...

    Comment out this line and replace it with blank title content:
    PHP Code:
    //$title = BOX_HEADING_BLANK_SIDEBOX;
    $title ''
    Or you can edit the value of BOX_HEADING_BLANK_SIDEBOX in blank_sidebox_defines.php like
    PHP Code:
    define('BOX_HEADING_BLANK_SIDEBOX'''); 
    You can make style rules that apply only to this sidebox like
    Code:
    #blank_sidebox {border: none;}
    #blank_sidebox h3 {display: none;}
    #blank_sideboxContent {what: ever;}
    Adjust to taste, using your actual sidebox id if you have changed it from blank_sidebox.

  9. #9
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Changes to sidebars... very frustrated...

    Note that these techniques, especially custom style rules, allow you to have a "sidebox" with your HTML content at the top of the sidebar without looking like any kind of box.

  10. #10
    Join Date
    Mar 2013
    Posts
    48
    Plugin Contributions
    0

    Default Re: Changes to sidebars... very frustrated...

    ok this is what ive done:

    includes / templates/ template_default / css/ stylesheet.css & also applied to toyzeum folder as well

    ##################################
    /*sideboxes*/
    .columnLeft {}

    h3.leftBoxHeading, h3.leftBoxHeading a {
    font-size: 1em;
    color: #ffffff;
    }

    .leftBoxHeading, .centerBoxHeading {
    margin: 0em;
    background-color: #FF6699;
    padding: 0.5em 0.2em;
    }

    .leftBoxContainer {
    border: 1px solid #ffffff;
    margin-top: 1.5em;
    }

    .sideBoxContent {
    background-color: #ffffff;
    padding: 0.4em;
    }

    h3.rightBoxHeading, h3.rightBoxHeading a {
    font-size: 1.1em;
    color: #FFFF00;
    }

    .rightBoxHeading {
    margin: 0em;
    background-color: #663366;
    padding: 0.2em 0em;
    }

    h3.leftBoxHeading a:hover {
    color: #FFFF33;
    text-decoration: none;
    }

    h3.rightBoxHeading a:hover {
    color: #FF0000;
    text-decoration: none;
    }

    .rightBoxContent {
    background-color: #ffffff;
    margin-bottom: 1em;
    }

    .centeredContent, TH, #cartEmptyText, #cartBoxGVButton, #cartBoxEmpty, #cartBoxVoucherBalance, #navCatTabsWrapper, #navEZPageNextPrev, #bannerOne, #bannerTwo, #bannerThree, #bannerFour, #bannerFive, #bannerSix, #siteinfoLegal, #siteinfoCredits, #siteinfoStatus, #siteinfoIP, .center, .cartRemoveItemDisplay, .cartQuantityUpdate, .cartQuantity, .cartTotalsDisplay, #cartBoxGVBalance, .leftBoxHeading, .centerBoxHeading,.rightBoxHeading, .productListing-data, .accountQuantityDisplay, .ratingRow, LABEL#textAreaReviews, #productMainImage, #reviewsInfoDefaultProductImage, #productReviewsDefaultProductImage, #reviewWriteMainImage, .centerBoxContents, .specialsListBoxContents, .categoryListBoxContents, .additionalImages, .centerBoxContentsSpecials, .centerBoxContentsAlsoPurch, .centerBoxContentsFeatured, .centerBoxContentsNew, .gvBal, .attribImg {
    text-align: center;
    }

    #bestsellers .wrapper {
    margin: 0em 0em 0em 1.5em;
    }


    #blanksidebox {border: none;}

    #blanksideboxHeading {display: none;}


    #bestsellers ol {
    padding: 0;
    margin-left: 1.1em;
    }

    #bestsellers li {
    padding: 0;
    margin: 0.3em 0em 0.3em 0em;
    }

    #bannerboxHeading {
    background-color: #0000CC;
    #####################################


    for file \includes\templates\template_default\sideboxes\tpl_blank_sidebox.php
    ##########################################
    <?php
    /**
    * blank sidebox - allows a blank sidebox to be added to your site
    *
    * @package templateSystem
    * @copyright 2007 Kuroi Web Design
    * @copyright Portions Copyright 2003-2007 Zen Cart Development Team
    * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    * @version $Id: blank_sidebox.php 2007-05-26 kuroi $
    */

    $content = '';
    $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">';

    // Replace the text and HTML tags between the apostophes on lines 19 and 20.
    // Use as many or as few lines using this model as you need for your custom content.
    // If you have a multilingual site define your text in the languages/YOUR_LANGUAGE/extra_definitions/blank_sidebox_defines.php and include it as shown in line 19.
    // If your site is monolingual, you can put the text right here as shown on line 20 (and nobody will know!)



    $content .= '<IMG SRC="https://www.toyzeum.com/store/images/main/rightsidebar_incoming<?
    //Chooses a random number
    $num = Rand (1,6);
    //Based on the random number, gives a quote
    switch ($num)
    {
    case 1:
    echo "1";
    break;
    case 2:
    echo "2";
    break;
    case 3:
    echo "2";
    break;
    case 4:
    echo "2";
    break;
    case 5:
    echo "1";
    break;
    case 6:
    echo "1";
    }?>.jpg">
    ';

    $content .= '</div>';
    ?>
    ############################################

    Note- The random Image generator is not working but was working when i had it installed in- I currently have the content in bold (shown below) deleted from the file shown below now...

    \includes\templates\template_default\common\tpl_box_default_right.php

    ################################
    <?php
    /**
    * Common Template - tpl_box_default_right.php
    *
    * @package templateSystem
    * @copyright Copyright 2003-2005 Zen Cart Development Team
    * @copyright Portions Copyright 2003 osCommerce
    * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    * @version $Id: tpl_box_default_right.php 2975 2006-02-05 19:33:51Z birdbrain $
    */




    // choose box images based on box position
    if ($title_link) {
    $title = '<a href="' . zen_href_link($title_link) . '">' . $title . BOX_HEADING_LINKS . '</a>';
    }
    //
    ?>




    <IMG SRC="https://www.toyzeum.com/store/images/main/rightsidebar_incoming<?
    //Chooses a random number
    $num = Rand (1,6);
    //Based on the random number, gives a quote
    switch ($num)
    {
    case 1:
    echo "1";
    break;
    case 2:
    echo "2";
    break;
    case 3:
    echo "2";
    break;
    case 4:
    echo "2";
    break;
    case 5:
    echo "1";
    break;
    case 6:
    echo "1";
    }
    ?>.jpg">





    <!--// bof: <?php echo $box_id; ?> //-->



    <div class="rightBoxContainer" id="<?php echo str_replace('_', '-', $box_id ); ?>" style="width: <?php echo $column_width; ?>">
    <h3 class="rightBoxHeading" id="<?php echo str_replace('_', '-', $box_id) . 'Heading'; ?>"><?php echo $title; ?></h3>
    <?php echo $content; ?>
    </div>
    <!--// eof: <?php echo $box_id; ?> //-->
    ###################

    and lastly

    store\includes\modules\sideboxes\blank_sidebox.php
    ##############################
    <?php
    /**
    * blank sidebox - allows a blank sidebox to be added to your site
    *
    * @package templateSystem
    * @copyright 2007 Kuroi Web Design
    * @copyright Portions Copyright 2003-2007 Zen Cart Development Team
    * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    * @version $Id: blank_sidebox.php 2007-05-26 kuroi $
    */

    // test if box should display
    $show_blank_sidebox = true;

    if ($show_blank_sidebox == true) {
    require($template->get_template_dir('tpl_blank_sidebox.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_blank_sidebox.php');
    //$title = BOX_HEADING_BLANK_SIDEBOX;
    $title = '';

    $title_link = false;
    require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
    }
    ?>
    ################################


    the green box is still showing and i cannot get the random "incoming" image to display- what am i doing wrong here??? any ideas?

    Thanks so much for help
    - Aaron

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. Order, downloads not working - Very frustrated
    By ajswift in forum General Questions
    Replies: 4
    Last Post: 21 Sep 2011, 03:28 AM
  2. Very Frustrated
    By Slicer5489 in forum General Questions
    Replies: 3
    Last Post: 14 May 2010, 07:58 AM
  3. New User - Very frustrated- need help!
    By hurricane41 in forum General Questions
    Replies: 10
    Last Post: 15 Aug 2008, 04:01 AM
  4. Very New and frustrated - Please Help
    By Chadd in forum Templates, Stylesheets, Page Layout
    Replies: 11
    Last Post: 13 Aug 2008, 11:36 PM
  5. New user - Very Frustrated!
    By canemasters in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 30 Mar 2007, 07:17 PM

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