okay then
so i should use this code:
<?php
if(!defined('DS'))
define('DS', DIRECTORY_SEPARATOR);
if(!include_once(rtrim(JPATH_ADMINISTRATOR,DS).DS.'components'.DS.'com_hikashop'.DS.'helpers'.DS.'helper.php'))
return true;
$cartClass = hikashop_get('class.cart');
$fullCart = $cartClass->loadFullCart();
$nbProducts = 0;
foreach($fullCart->products as $product){
if($group && $row->cart_product_option_parent_id) continue;
$nbProducts += $product->cart_product_quantity;
}
echo $nbProducts;
?>
but it returns "0" while i have 3 product with selected options in my cart.
when i remove this line :
if($group && $row->cart_product_option_parent_id) continue;
it returns"11" which is my product count + their options.
i want the code to return "3" as the count of only my main products in cart!