don't you know how to get number "total quantity of products" in the cart in the right column? Right now, I've got just total price, but I'd like to have something like:
Thank you very much.You have 3 items, total price is 100GBP
Thank you very much.You have 3 items, total price is 100GBP
Code: Select all
<?php echo $this->cart->countProducts(); ?>
Code: Select all
public function countProducts() {
$total = 0;
foreach ($this->session->data['cart'] as $value) {
$total += $value;
}
return $total;
}
Code: Select all
public function countProducts() {
return array_sum($this->session->data['cart']);
}
Should be the same code.
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
Users browsing this forum: No registered users and 30 guests