Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Making cart summary not show on cart page.

Making cart summary not show on cart page.

Locked

Views: 787

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
1 Dec 2010, 12:19 AM
#1
robbie269 avatar

robbie269

Zen Follower

Join Date:
Feb 2010
Location:
New South Wales, Australia
Posts:
228
Plugin Contributions:
0

Making cart summary not show on cart page.

I have a cart summary show up when something is added to the cart. I would like the summary to not show when I go to the actual shopping cart page. What is the code I need to get this to work?
My site is w w w.thehorsestall.com.au.

1 Dec 2010, 1:25 AM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Making cart summary not show on cart page.

You could add an IF to it:

if ($_GET['main_page'] != FILENAME_SHOPPING_CART) {
// show stuff
} else {
// do not show stuff
}
1 Dec 2010, 2:42 AM
#3
robbie269 avatar

robbie269

Zen Follower

Join Date:
Feb 2010
Location:
New South Wales, Australia
Posts:
228
Plugin Contributions:
0

Re: Making cart summary not show on cart page.

Thankyou very much. It worked!

I had a bit of trouble including the bit where it only shows when there is something in the cart. I ended up with:

<?php if ($_GET['main_page'] != FILENAME_SHOPPING_CART && $_SESSION['cart']->count_contents() != 0) {
?>

It seems to work OK but is that the best or neatest way?

1 Dec 2010, 3:18 AM
#4
robbie269 avatar

robbie269

Zen Follower

Join Date:
Feb 2010
Location:
New South Wales, Australia
Posts:
228
Plugin Contributions:
0

Re: Making cart summary not show on cart page.

Also to make things a bit more complicated, I have made the cart summary not show through the checking out stages.

I used this code:

<?php if ($_GET['main_page'] != FILENAME_SHOPPING_CART &&$_GET['main_page'] != FILENAME_CHECKOUT_SHIPPING&&$_GET['main_page'] != FILENAME_CHECKOUT_PAYMENT&& $_GET['main_page'] != FILENAME_CHECKOUT_CONFIRMATION&& $_GET['main_page'] != FILENAME_LOGIN&& $_GET['main_page'] != FILENAME_CREATE_ACCOUNT&&$_SESSION['cart']->count_contents() != 0) {
?>

I put each page that you go to at checkout.

Is that getting messy?

1 Dec 2010, 3:41 AM
#5
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Making cart summary not show on cart page.

You could collapse the pages as shown in tpl_main_page.php...

if (!in_array($_GET['main_page'], explode(',', 'shopping_cart,checkout_shipping,checkout_payment,etc')) && $_SESSION['cart']->count_contents() != 0) {
1 Dec 2010, 3:55 AM
#6
robbie269 avatar

robbie269

Zen Follower

Join Date:
Feb 2010
Location:
New South Wales, Australia
Posts:
228
Plugin Contributions:
0

Re: Making cart summary not show on cart page.

Thankyou. That is a bit neater.