Our site www.viart.com site is operated by latest Viart Shop 5 with default Clear design
Topic Information
ccc12808
ccc12808
Hi,
 
Don't know if anyone has run across this but I have a product where the increment has to change in the cart's qty dropdown. Instead of 500, 1000, 1500, I needed 500, 1000, 2000. To do this, scroll down to line 1188 of includes/shopping_cart.php and add the code as shown.
 
for ($i = $min_quantity; $i <= $show_max_quantity; $i = $i + $quantity_increment) {$quantity_control .= "<option value=\"" . $i ."\">" . $i . "</option>";
 
if ($i == 1000) { //Added Code
$quantity_increment = 1000; //Added Code
} //Added Code
}
 
This changes the increment on the fly. You could conceivably change the increment multiple times. Only one caveat...I believe the change is global for all products.
 
Chris
 
ccc12808
ccc12808
One more caveat...
 
It appears that the code needs to be added to the "Basket" qty dropdown function as well.
 
Chris
 
Riyaz (Guest)
Riyaz (Guest)
Can you not just use the options to place your required qty there, instead of changing the code?
 
ccc12808
ccc12808
I needed to change quantities/prices without using options.
 
You can change pricing with specified quantity ranges, but I needed specific quantities in the cart dropdown list for the main product, not its options. The stock and shipping tab for each product allows you to set minimum and maximum quantities and one increment - I needed two different increments. This also allows you to set specific quantities with specific prices (rather than quantity ranges).
 
For instance when I click the Qty dropdown, I now only see 500, 1000, 2000, 3000, 4000, 5000. When each of these are selected, the main price changes to $3.00. 2.75, 2.50, 2.25, 2.00, 1.75 respectively. And no options are necessary.