OverviewBy default every product in ViArt Shop has quantity control. Quantity Control settings are located in Products > Products Settings > 'Appearance' tab. Here you can regulate how Qty will be displayed on products listing page, on products details page and on basket. Quantity Control settingsThere are 4 choices available:
FAQHow to change default quantity control amount? You can increase the number of allowed values, for example from 10 to 15 (e.g. 1, 2, 3, 4 ...15) by editing a "set_quantity_control"
function within includes/shopping_cart.php - open this file and change the quantity amount in the below string: Is it possible to have such values in Qty control as 1, 5, 15, 30 etc.? No, by default with the help of Quantity Increment field (see section 4.5.5) you can increase quantity control only on a measured amount, for example on '5' (5, 10, 15, 20 ...) or '15' (15, 30, 45, 60 ...) but not first on '4' then on '10' etc. ExamplesHow to set the quantity 5, 10, 15, 20, 25 for all products at once? Open 'shopping_cart.php' script and change the "set_quantity_control" function like this:
How to set qty for all products as 1, 10, 100? Find in the 'includes' folder 'shopping_cart.php' script and comment out the below string like this: //for ($i = $min_quantity; $i <= $show_max_quantity; $i = $i + $quantity_increment) {
Then right below this line add the following string: for($i=1;$i<=100;$i=$i*10){
How can I set my own minimum quantity so for example the quantity will be 5, 25, 50, 75, 100? You will need to edit 'shopping_cart.php' to make this possible. Find the following line: $quantity_control .= "<option value=\"" . $i ."\">" . $i . "</option>";
and replace it with:
After this small change you can set in Products > Top > Edit Product (see section 4.5.5) Minimum Quantity as '5', Maximum Quantity as '100' and
Quantity Increment as '25' and the quantity for this product will be 5, 25, 50, 75, 100.
|