Assuming that "only one" in the shopping cart means that there's only 1 item of any type/product, then what you want is:
Code:
if ($_SESSION['cart']->count_contents() == 1) {
echo "Did you know a second box will ship for free!<br />";
}
... of course, it's always good practice to put language-specific stuff in a language file! You could add to /includes/languages/english/YOURTEMPLATE/shopping_cart.php:
Code:
define('CART_2ND_FOR_FREE', 'Did you know a second box will ship for free!<br />');
and then change your template code to
Code:
if ($_SESSION['cart']->count_contents() == 1) {
echo CART_2ND_FOR_FREE;
}
Bookmarks