Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

if statement to test for products in cart?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 07-14-2008, 03:45 PM
 
taponitrof taponitrof is offline
 

Senior Member
  
Join Date: Dec 2007
Posts: 105
 

Default if statement to test for products in cart?

Hi,

I want to display or not display mini-cart based on whether there are any items in the cart.
eg.
{if cart is-not-empty}
showthis
{/if}

Thanks

x-cart 4.1.10
__________________
X-Cart Version 4.1.10, 4.1.11, 4.2, 4.3, 4.4.5
Linux
Reply With Quote
  #2  
Old 07-14-2008, 03:55 PM
 
taponitrof taponitrof is offline
 

Senior Member
  
Join Date: Dec 2007
Posts: 105
 

Default Solution: if statement to test for products in cart?

I just stumbled on the answer looking in the minicart.tpl file:

{if $minicart_total_items > 0}
{ include file="customer/menu_cart.tpl" }
{/if}


This hides the mini cart until customer adds an item to it.
__________________
X-Cart Version 4.1.10, 4.1.11, 4.2, 4.3, 4.4.5
Linux
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 09:33 AM.

   

 
X-Cart forums © 2001-2020