Page 1 of 1

Cart.php and Cart.tpl

Posted: Wed Sep 29, 2010 4:42 pm
by legend717
cart.php :

Code: Select all

if ($this->cart->countProducts() == 1) {
    $output .= $this->cart->countProducts() . ' item';
} else {
    $output .= $this->cart->countProducts() . ' items';
} 
cart.tpl:
???

Re: Cart.php and Cart.tpl

Posted: Wed Sep 29, 2010 5:29 pm
by Karen
Is there a question here?

Re: Cart.php and Cart.tpl

Posted: Wed Sep 29, 2010 6:00 pm
by legend717
how to write in cart.tpl:

Code: Select all

if ($this->cart->countProducts() == 1) {
    $output .= $this->cart->countProducts() . ' item';
} else {
    $output .= $this->cart->countProducts() . ' items';
}
?

Re: Cart.php and Cart.tpl

Posted: Wed Sep 29, 2010 7:49 pm
by legend717

Code: Select all

<?php if ((int)$this->cart->countProducts() == 1) { ?>
<?php echo $this->cart->countProducts(); ?> item
<?php } else {?>
<?php echo $this->cart->countProducts(); ?> items
<?php } ?>
8)