Hi guys, i'm new here..
i'm doing some mods to a zencart site and i need some help..
i'm trying to let user add a product in the cart in a new row when that product is also in the cart..
normally zencart updates the quantity (if the product is the same and the attributes too) but i need to show a different row in the cart for every time user click on the "add to cart" button..
in includes/classes/shopping_cart.php there is a function "add_cart" that checks if the product is also in the cart:
if ($this->in_cart($products_id)) {
$this->update_quantity($products_id, $qty, $attributes);
} else {
//add the product
}
i tryed editing the code like that but nothing:
//alway execute the code to add product (no qty update)
if (false /*$this->in_cart($products_id)*/) {
$this->update_quantity($products_id, $qty, $attributes);
} else {
//add the product
}
do you know how to do what i need?
p.s. sorry if this isn't the right place for this thread
Bookmarks