Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Make the Shopping Cart infoBox disappear when empty


npn2531

Recommended Posts

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.

Oscommerce site:

 

 

OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120

Link to comment
Share on other sites

  • 1 month later...

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.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...