Page 1 of 1

PHP Shopping cart status

Posted: Sat Jun 04, 2011 3:51 pm
by dddmx3
Currently, I have this code that shows you what you have in your shopping cart:
(The code is live, here.)

Code: Select all

<div id = "shopping_cart">
<table width = "100%" >
<tr>
    <td>
    <p><?php print JText::_('CART1')?>&nbsp;<?php print $cart->count_product?>&nbsp;<?php print JText::_('CART2')?>&nbsp;-&nbsp;<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 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!

Re: PHP Shopping cart status

Posted: Sat Jun 04, 2011 11:09 pm
by twinedev
Just tried the site, and when my cart is empty (both initial visit and after adding something then removing it, it says "Your cart is empty? Oh boy." So I'm assuming you found what you needed?

Re: PHP Shopping cart status

Posted: Mon Jun 06, 2011 11:56 pm
by dddmx3
Yes. I guess the moderators deleted the other posts?