Yu5tas Posted July 12, 2013 Share Posted July 12, 2013 (edited) I sell unique items, so every item has only 1 quantity and when some customer orders it, product goes out of stock, even if he doesn't pay the money (others can't order it then). If I let users order items out of stock, then they can put more than 1 product to the cart. So how can I forbid people put more than 1 product to cart or how to remove automatic quantity lowering? Version: PrestaShop™ 1.5.4.1 Website http://www.laumesskrynia.lt/en/ Edited July 12, 2013 by Yu5tas (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted July 12, 2013 Share Posted July 12, 2013 you can for example disable the quantity input field for that you have to add readonly="readonly" attribute for quantity field in your product.tpl file then your customers will not have possibility to increase the quantity value. this is the code: <!-- quantity wanted --> <p id="quantity_wanted_p"{if (!$allow_oosp && $product->quantity <= 0) OR $virtual OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display: none;"{/if}> <label>{l s='Quantity:'}</label> <input readonly="readonly" type="text" name="qty" id="quantity_wanted" class="text" value="{if isset($quantityBackup)}{$quantityBackup|intval}{else}{if $product->minimal_quantity > 1}{$product->minimal_quantity}{else}1{/if}{/if}" size="2" maxlength="3" {if $product->minimal_quantity > 1}onkeyup="checkMinimalQuantity({$product->minimal_quantity});"{/if} /> </p> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now