Change Default Quantity on Magento Product Page
Add to Favourites
Email This Post
|
I find it a tad annoying how on Magento, you’ve got this empty quantity box next to the Buy Now/Add to Basket button. Although clicking the button alone will add an item to the cart, some users may experience doubt in this motion, and enter the quantity required AS WELL as press the button.
But why even have any doubt? Why not just make the default quantity set to 1 - well this something that a lot of people have required, and fortunately, I have got the answer!
In app\design\frontend\default\default\template\catalog\product\view\type\Simple.phtml
Just change…
<input id="qty" class="input-text qty" maxlength="12" name="qty" type="text" value="<?php echo $this->getMinimalQty($_product) ?>" />
To…
<input id="qty" class="input-text qty" maxlength="12" name="qty" type="text" value="<?php echo $this->getMinimalQty($_product)== null?1:$this->getMinimalQty($_product) ?>" />
about the author
This article was written by Sam Davis on November 20, 2008.
Computing over a glass of Grenache Shiraz... again! Sam encourages you to make money by writing articles for us! Learn More |
related articles
comments
Leave a Reply
![]() Remove Product Tags from Magento Product Page |
















































