Hello. Sorry if I ask the last time too many questions. If someone can help - I will be grateful.
I want to be when you click add to cart on the page caterogy.tpl (a href="<?php echo $products[$j]['add']; ?>">) - the goods are not added to the basket to the existing elements and do not add the quantity of the previously added item.
ie that the basket was always one (last added) goods.
it is possible?
I want to be when you click add to cart on the page caterogy.tpl (a href="<?php echo $products[$j]['add']; ?>">) - the goods are not added to the basket to the existing elements and do not add the quantity of the previously added item.
ie that the basket was always one (last added) goods.
it is possible?
So you always want 1 item only for each item?
1. EDIT: system/library/cart.php
2. FIND:
3. REPLACE WITH:
1. EDIT: system/library/cart.php
2. FIND:
Code: Select all
$this->session->data['cart'][$key] += (int)$qty;
Code: Select all
$this->session->data['cart'][$key] = (int)$qty;
Thank you for trying to help, unfortunately this is not what I need
I want to delete function that when you add a product to the cart and there is already another product, then the new product is added to the old.
Instead, I need to make an old product is replaced by a new one. In other words, the buyer could buy for 1 time only one product (but in any quantity)
I want to delete function that when you add a product to the cart and there is already another product, then the new product is added to the old.
Instead, I need to make an old product is replaced by a new one. In other words, the buyer could buy for 1 time only one product (but in any quantity)
Attachments
Безымянный.png (64.7 KiB) Viewed 6740 times
So you want ONLY 1 type of product in the cart at one time and if another is added it deletes the existing products and replaces with the new one?
1. EDIT: system/library/cart.php
2a. FIND (1.4.x):
2b. FIND (1.5.x):
3. BEFORE, ADD:
1. EDIT: system/library/cart.php
2a. FIND (1.4.x):
Code: Select all
if (!$options) {
Code: Select all
if (!$option) {
Code: Select all
$this->clear();
Q your first answer helped me a lot. thx!
Now, would it be possible to have this function (only allow one item per product) for all products except products with certain Manufacturer ID's?
Now, would it be possible to have this function (only allow one item per product) for all products except products with certain Manufacturer ID's?
Who is online
Users browsing this forum: No registered users and 87 guests