Forums / Templates, Stylesheets, Page Layout / Turn Off Shopping cart sidebox during checkout pages

Turn Off Shopping cart sidebox during checkout pages

Locked

Views: 5,304

Results 1 to 12 of 12
This thread is locked. New replies are disabled.
20 Apr 2007, 4:14 AM
#1
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,185
Plugin Contributions:
0

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; :bangin:

Mark,

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.

Zen Cart Certified hosting at myZenCartHost.com.

20 Apr 2007, 1:08 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

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!]
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!

20 Apr 2007, 3:48 PM
#3
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,185
Plugin Contributions:
0

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,

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.

Zen Cart Certified hosting at myZenCartHost.com.

21 Apr 2007, 1:31 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

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!]
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!

21 Apr 2007, 5:59 PM
#5
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,185
Plugin Contributions:
0

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,

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.

Zen Cart Certified hosting at myZenCartHost.com.

22 Apr 2007, 2:00 AM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

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? :smile:

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!]
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!

22 Apr 2007, 2:07 AM
#7
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,185
Plugin Contributions:
0

Re: Turn Off Shopping cart sidebox during checkout pages

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.

Zen Cart Certified hosting at myZenCartHost.com.

22 Apr 2007, 2:16 AM
#8
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,185
Plugin Contributions:
0

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,

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.

Zen Cart Certified hosting at myZenCartHost.com.

22 Apr 2007, 2:40 AM
#9
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Turn Off Shopping cart sidebox during checkout pages

This line after the original case statements broke the logic that was originally built in:

$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!]
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!

22 Apr 2007, 2:51 AM
#10
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,185
Plugin Contributions:
0

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,

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.

Zen Cart Certified hosting at myZenCartHost.com.

22 Apr 2007, 2:53 AM
#11
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Turn Off Shopping cart sidebox during checkout pages

Thanks for the update! Glad that this worked for you ... :smile:

Definite had me confused on how to break this as I could not duplicate it ... :blink:

Then I saw your almost excellent code ...

You were very very close the the right solution ... :cool:

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!]
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!

6 Oct 2007, 5:22 PM
#12
dizz avatar

dizz

Zen Follower

Join Date:
Oct 2006
Posts:
170
Plugin Contributions:
0

Re: Turn Off Shopping cart sidebox during checkout pages

Love this thread, thanks all!