![]() |
If statement checking for items in cart
I would like to display a shipping message only after an item is added is the the cart; So the message will not appear is their are no items in the cart.
Does someone know the the IF statement that checks the cart to see if their are items in the cart? |
You can use:
Code:
{if $minicart_total_items > 0}There are items in the cart |
Is there also a statement along the same lines to check for a particular item in the cart?
Dan |
^ No, I believe that would need to be done in the PHP code anywhere except cart.php
|
thanks
|
Re: If statement checking for items in cart
Quote:
I looked all over for this recently and then ended up just coding it myself in products.tpl. Should be a similar process for any other page. For the curious: 4.1.3 products.php before Code:
$smarty->assign("products",$products); add Code:
x_load('cart'); then in products.tpl Code:
{assign var="pid" value=$products[product].productid} hope that helps. |
All times are GMT -8. The time now is 07:18 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.