Contributions
order-drop-down-button-in-shoppingcart
Many articles here deal with the
the annoying fact, that you had to "extra" press the "update" button in your shopping-cart to update the number of products ordered. In response to this and to make my and your customers shopping easier, I have contributed this tiny, but I find extremly important module.
Here you have a drop down button to change the number of products ordered. And the number is changed instantaniously for your billing. So it cannot happen any more, that a customer forgets to press the "update" button and gets the wrong number of articles.
The number displayed in the drop down button can be changed in the your admin. ENJOY!!
Expand All / Collapse All
A classic problem of algorithms called side-effects was identified on this contribution. The for loop to populate the $options variable changes the value of the %i variable, that is the same of the scope outside the loop, already identified by $i. The increment ($i++) of this for loop leads to display the cart with the wrong number of items.
Solution: change the for loop initializer variable to another one.
for ($j=0 ; $j< $inventory_quantity; $j++) {
$options[$j][id] = ($j+1);
$options[$j][text] = ($j+1);
}
Fix the bug of creating array
Simple and efficient way to creat array for order quantity drop down options.
Many articles here deal with the
the annoying fact, that you had to "extra" press the "update" button in your shopping-cart to update the number of products ordered. In response to this and to make my and your customers shopping easier, I have contributed this tiny, but I find extremly important module.
Here you have a drop down button to change the number of products ordered. And the number is changed instantaniously for your billing. So it cannot happen any more, that a customer forgets to press the "update" button and gets the wrong number of articles.
The number displayed in the drop down button can be changed in the your admin. ENJOY!!
Note: Contributions are used at own risk.