Results 1 to 8 of 8
  1. #1
    Join Date
    Sep 2008
    Posts
    98
    Plugin Contributions
    0

    Default Remove shopping cart sidebox from Account History Page

    I want to remove the shopping cart sidebox from the account history page.

    I have looked at other threads and in particular this one: http://www.zen-cart.com/forum/showthread.php?t=63813

    So following that pattern I wanted to add something like this:

    PHP Code:
     if ($_GET['main_page'] == 'account_history_info'){
    $show_shopping_cart_box false;

    However that did not produce any results as the shopping cart side box still appears. Nor did it do anything if I changed to 'account_history' instead of 'account_history_info' nor if I used both statements.

    Interestingly, however, if I do the following:

    PHP Code:
    if ($_GET['main_page'] == 'account'){
    $show_shopping_cart_box false;

    then the shopping cart sidebox disappears when going to the "My Account" link...however, it reappears when I then move to the account history pages...

    Any suggestions would be appreciated. Thanks, Ken

    Forgot to mention that the file I am talking about modifying is: shopping_cart.php

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Remove shopping cart sidebox from Account History Page

    You need to include each of the pages where you want that removed ...

    Code:
    if ($_GET['main_page'] == 'account' || $_GET['main_page'] == 'account_history' || $_GET['main_page'] == 'account_history_info'){
    NOTE: if you want to include the other sections of the My Account area, add them as well ...
    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.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Sep 2008
    Posts
    98
    Plugin Contributions
    0

    Default Re: Remove shopping cart sidebox from Account History Page

    Thanks...but maybe I am trying to block the shopping cart from the wrong page.

    The page I want the shopping cart blocked from is the page where one views specific order information on a prior order. I thought that would be 'account_history_info' but if it is then for some reason this is still not working even though it works on the main account page and on the show all orders page. But when I click on "view" to see a specific order then the shopping cart sidebox still shows up.

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Remove shopping cart sidebox from Account History Page

    Make sure that you are adding the new code in the right place ...

    If I add the code:
    Code:
    if ($_GET['main_page'] == 'account' || $_GET['main_page'] == 'account_history' || $_GET['main_page'] == 'account_history_info'){
            $show_shopping_cart_box = false;
    }
    above the existing code:
    Code:
      if ($show_shopping_cart_box == true) {
    I do not see the shopping cart sidebox when on those pages ...
    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.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    Sep 2008
    Posts
    98
    Plugin Contributions
    0

    Default Re: Remove shopping cart sidebox from Account History Page

    That is where I am adding it... Here is the entire file:

    PHP Code:
    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() > || (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 ( ( (isset(
    $_SESSION['cart']) && $_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;
        }

        if (
    $_GET['main_page'] == 'account' || $_GET['main_page'] == 'account_history' || $_GET['main_page'] == 'account_history_info'){

        
        
    $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_defaultDIR_WS_TEMPLATE$current_page_base,'common') . '/' $column_box_default);
      }
    ?> 
    I think I need to try to install this in a completely fresh cart and then if it works see what may be causing it not to work in my cart.

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Remove shopping cart sidebox from Account History Page

    Which file are you updating ... the original or your template and override file in:
    /includes/modules/sideboxes/your_template_dir/shopping_cart.php
    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.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  7. #7
    Join Date
    Sep 2008
    Posts
    98
    Plugin Contributions
    0

    Default Re: Remove shopping cart sidebox from Account History Page

    the override file

  8. #8
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Remove shopping cart sidebox from Account History Page

    I am not sure why this would not be working 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.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 

Similar Threads

  1. Remove right sidebox shopping cart from when on shopping cart page
    By alterego55 in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 2 Oct 2010, 01:45 AM
  2. Remove weight from shopping cart page.
    By sports guy in forum Basic Configuration
    Replies: 2
    Last Post: 3 Aug 2010, 03:57 PM
  3. How to remove 'weight' from shopping cart page ?
    By spazzo in forum Basic Configuration
    Replies: 2
    Last Post: 15 Nov 2008, 05:23 AM
  4. Remove [more] link from shopping cart sidebox header
    By kachana in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 22 Oct 2008, 07:31 PM
  5. remove header from shopping cart sidebox
    By chabates in forum Addon Sideboxes
    Replies: 7
    Last Post: 23 May 2008, 02:59 AM

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