Jump to content



* * - - - 3 votes

Make the Shopping Cart infoBox disappear when empty


This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1   npn2531

npn2531
  • Members
  • 1,130 posts

Posted 05 March 2010 - 03:06 AM

I think it is good design to blank out the shopping cart infobox completely when it is empty.
To do this open up includes/column_right.php and change

require(DIR_WS_BOXES . 'shopping_cart.php');

to

if ($cart->count_contents() > 0) {
  require(DIR_WS_BOXES . 'shopping_cart.php');
  }

As long as the cart is empty, you don't see the infobox, add an item to the shopping cart and the infobox  appears as normal.

#2   kwscolt

kwscolt
  • Members
  • 2 posts

Posted 16 April 2010 - 10:12 PM

View Postnpn2531, on 05 March 2010 - 03:06 AM, said:

I think it is good design to blank out the shopping cart infobox completely when it is empty.
To do this open up includes/column_right.php and change

require(DIR_WS_BOXES . 'shopping_cart.php');

to

if ($cart->count_contents() > 0) {
  require(DIR_WS_BOXES . 'shopping_cart.php');
  }

As long as the cart is empty, you don't see the infobox, add an item to the shopping cart and the infobox  appears as normal.
--------------------------

For those using STS...

go to includes/modules/sts_inc

open file sts_column_left.php

and change...

require(DIR_WS_BOXES . 'shopping_cart.php');

to

if ($cart->count_contents() > 0) {
  require(DIR_WS_BOXES . 'shopping_cart.php');
  }

right above

 $sts->restart_capture ('cartbox', 'box'); // Get shopping cart box 

but leave that line in tact..

now where ever you put the shop cart infobox using STS it will disappear when it is empty.

Edited by kwscolt, 16 April 2010 - 10:13 PM.