How to Show or Hide Items According to Cart Status

It is possible to show – or hide – items according to the status of the Shopping Cart. Currently only two statuses are available: shopping cart empty and shopping cart not empty.

Display Items only when Shopping Cart is Empty

To display items only when whe shopping cart is empty, thus hiding them when any one item is added to the cart, go to the item and click the gear icon to access the item’s options. Then check the Advanced checkbox to display advanced options.

Look for the CSS Class text books and add the following code snippet:

ClassHideIfCartEmpty

Any item with such class in it’s options will disappear from the menu as soon as any item is added to the shopping cart.

Display Items Only when Shopping Cart is Not Empty

The counterpart to the previous option is to show items on the menu only when the cart is not empty. This is useful for items that require a previous item to be bought before being available to customers.

To display an item only when the shopping cart is not empty, follow this instructions:

Locate the desired item and click the gear icon to access the item’s options. Then check the Advanced checkbox to display advanced options.

Look for the CSS Class text books and add the following code snippet:

ClassHideIfCartNotEmpty

Any item with such class in its options will disappear from the menu and be displayed only when any other item has been added to the shopping cart.