PHP Shopping cart status
Posted: Sat Jun 04, 2011 3:51 pm
Currently, I have this code that shows you what you have in your shopping cart:
(The code is live, here.)
But when your shopping cart is empty, it still shows: You have 0 item(s) in your cart - Checkout?
But I'd like for it to say: Your cart is empty!
In the language file its defined as "EMPTY". Can someone please help? I know theres something like <?php else or idk!
(The code is live, here.)
Code: Select all
<div id = "shopping_cart">
<table width = "100%" >
<tr>
<td>
<p><?php print JText::_('CART1')?> <?php print $cart->count_product?> <?php print JText::_('CART2')?> - <a href = "<?php print SEFLink('index.php?option=com_jshopping&controller=cart&task=view', 1)?>"><?php print JText::_('CHECKOUT')?></a></p>
</td>
</tr>
</table>
</div>But I'd like for it to say: Your cart is empty!
In the language file its defined as "EMPTY". Can someone please help? I know theres something like <?php else or idk!