Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Apr 2006
    Location
    Ohio
    Posts
    6,098
    Plugin Contributions
    0

    Default Turn Off Shopping cart sidebox during checkout pages

    Want to disguard shopping cart [more] sidebox on the checkout process on 3 pages.

    includes > modules > my template > shopping_cart.php
    Where do I place code? using 1.3.7 zen-cart

    Example, I am playing with.
    Works perfect on the checkout process, but the sidebox Shopping Cart [more] opens on the main page after log out, and when you empty your cart still appears... Don't want this....
    What am I missing???


    $show_shopping_cart_box = true;
    if ($_GET['main_page'] == 'checkout_shipping'){
    $show_shopping_cart_box = false;
    }

    if ($_GET['main_page'] == 'checkout_payment'){
    $show_shopping_cart_box = false;
    }

    if ($_GET['main_page'] == 'checkout_confirmation'){
    $show_shopping_cart_box = false;

    Mark,
    Mark
    Hare Do - Does the rabbit beat Zen "never".
    Zen Cart 1.5.1 Update Release Need help Purchase the Book

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    67,548
    Plugin Contributions
    6

    Default Re: Turn Off Shopping cart sidebox during checkout pages

    Make sure that all of that is below the existing case statements ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.3]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  3. #3
    Join Date
    Apr 2006
    Location
    Ohio
    Posts
    6,098
    Plugin Contributions
    0

    Default Re: Turn Off Shopping cart sidebox during checkout pages

    There are three case statements in includes > modules < sideboxes > shopping cart. php.
    I placed the code just below the following.

    case (SHOW_SHOPPING_CART_BOX_STATUS == '2'):
    if ( ( ($_SESSION['cart']->count_contents() > 0) || (isset($_SESSION['customer_id']) && zen_user_has_gv_account($_SESSION['customer_id']) > 0) ) && ($_GET['main_page'] != FILENAME_SHOPPING_CART) ) {
    $show_shopping_cart_box = true;
    } else {
    $show_shopping_cart_box = false;
    }
    break;
    }

    Yes, you do not see cart on the check out phase, but I still see cart on index page after logging out & empting cart to 0. Should only see cart when product is added to it.

    Mark,
    Mark
    Hare Do - Does the rabbit beat Zen "never".
    Zen Cart 1.5.1 Update Release Need help Purchase the Book

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    67,548
    Plugin Contributions
    6

    Default Re: Turn Off Shopping cart sidebox during checkout pages

    The setting 2 shows when something is in the cart or when there is a GV balance ...

    What clicks are you doing and where do you still see this when you think that you should not?

    I am assuming your additional code only is setting a false switch and is located beneath the original case statements ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.3]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  5. #5
    Join Date
    Apr 2006
    Location
    Ohio
    Posts
    6,098
    Plugin Contributions
    0

    Default Re: Turn Off Shopping cart sidebox during checkout pages

    includes > modules > sideboxes > your template > shopping_cart.php
    I am placing this the code below

    $show_shopping_cart_box = true;
    if ($_GET['main_page'] == 'checkout_shipping'){
    $show_shopping_cart_box = false;
    }

    if ($_GET['main_page'] == 'checkout_payment'){
    $show_shopping_cart_box = false;
    }

    if ($_GET['main_page'] == 'checkout_confirmation'){
    $show_shopping_cart_box = false;
    }

    Placing this code right above: if ($show_shopping_cart_box == true) between Line 31 & 32 below the case statements.

    Yes it works on the checkout phase, but when you empty shopping cart contents to 0, and you click home (index page), products page, log out & log in page the sidebox shopping cart appears saying Your cart is empty.

    Normally the shopping cart sidebox never appears on the index page, products page with 0 contents in the cart.

    Mark,
    Mark
    Hare Do - Does the rabbit beat Zen "never".
    Zen Cart 1.5.1 Update Release Need help Purchase the Book

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    67,548
    Plugin Contributions
    6

    Default Re: Turn Off Shopping cart sidebox during checkout pages

    I cannot reproduce this ...

    Can you give me an URL and a Click for click break down so that I can repeat this please?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.3]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  7. #7
    Join Date
    Apr 2006
    Location
    Ohio
    Posts
    6,098
    Plugin Contributions
    0

    Default Re: Turn Off Shopping cart sidebox during checkout pages

    Mark
    Hare Do - Does the rabbit beat Zen "never".
    Zen Cart 1.5.1 Update Release Need help Purchase the Book

  8. #8
    Join Date
    Apr 2006
    Location
    Ohio
    Posts
    6,098
    Plugin Contributions
    0

    Default Re: Turn Off Shopping cart sidebox during checkout pages

    I would like to eliminate the shopping cart sidebox on the 3 checkout phases.
    1. checkout_shipping
    2. checkout_payment
    3. checkout_confirmation

    includes > modules > sideboxes > your template > shopping_cart.php
    I am placing this the code

    <?php
    /**
    * shopping_cart sidebox - displays contents of customer's shopping cart. Also shows GV balance, if any.
    *
    * @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: shopping_cart.php 3505 2006-04-24 04:00:05Z drbyte $
    */

    switch (true) {
    case (SHOW_SHOPPING_CART_BOX_STATUS == '0'):
    $show_shopping_cart_box = true;
    break;
    case (SHOW_SHOPPING_CART_BOX_STATUS == '1'):
    if ($_SESSION['cart']->count_contents() > 0 || (isset($_SESSION['customer_id']) && zen_user_has_gv_account($_SESSION['customer_id']) > 0)) {
    $show_shopping_cart_box = true;
    } else {
    $show_shopping_cart_box = false;
    }
    break;
    case (SHOW_SHOPPING_CART_BOX_STATUS == '2'):
    if ( ( ($_SESSION['cart']->count_contents() > 0) || (isset($_SESSION['customer_id']) && zen_user_has_gv_account($_SESSION['customer_id']) > 0) ) && ($_GET['main_page'] != FILENAME_SHOPPING_CART) ) {
    $show_shopping_cart_box = true;
    } else {
    $show_shopping_cart_box = false;
    }
    break;
    }
    $show_shopping_cart_box = true;
    if ($_GET['main_page'] == 'checkout_shipping'){
    $show_shopping_cart_box = false;
    }

    if ($_GET['main_page'] == 'checkout_payment'){
    $show_shopping_cart_box = false;
    }

    if ($_GET['main_page'] == 'checkout_confirmation'){
    $show_shopping_cart_box = false;
    }

    if ($show_shopping_cart_box == true) {
    require($template->get_template_dir('tpl_shopping_cart.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_shopping_cart.php');
    $title = BOX_HEADING_SHOPPING_CART;
    $title_link = false;
    $title_link = FILENAME_SHOPPING_CART;

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

    Placing this code right above: if ($show_shopping_cart_box == true) right below the case statements.
    Great works but when you empty your shopping cart or the box still appears on the log in, log out, index page, product pages.

    mark,
    Mark
    Hare Do - Does the rabbit beat Zen "never".
    Zen Cart 1.5.1 Update Release Need help Purchase the Book

  9. #9
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    67,548
    Plugin Contributions
    6

    Default Re: Turn Off Shopping cart sidebox during checkout pages

    This line after the original case statements broke the logic that was originally built in:
    PHP Code:
    $show_shopping_cart_box true
    Anything that set the:
    $show_shopping_cart_box = false;

    is not set now, as you just reset it to true ... then did your new tests ...

    Comment out that line ...

    Does the logic flow right now for you?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.3]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  10. #10
    Join Date
    Apr 2006
    Location
    Ohio
    Posts
    6,098
    Plugin Contributions
    0

    Default Re: Turn Off Shopping cart sidebox during checkout pages

    Thank you for you time fellow Buckeye!
    Yes, In the last week I have been studying php and the logic.
    Getting a grasp on the language. Still have many miles to run.

    It works beautifully.

    Mark,
    Mark
    Hare Do - Does the rabbit beat Zen "never".
    Zen Cart 1.5.1 Update Release Need help Purchase the Book

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Shopping Cart Summary Sidebox
    By mrmrsg in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 26 Apr 2007, 07:59 AM
  2. Shopping Cart sidebox question
    By ZZZZZeeeennn in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 28 Oct 2006, 02:43 AM
  3. Lost my shopping cart sidebox
    By shy_violet in forum Basic Configuration
    Replies: 3
    Last Post: 22 Jun 2006, 09:28 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
  •