okaty Posted August 22, 2013 Share Posted August 22, 2013 Hello, I need to make the default quantity wanted set to 0. In the product list the deafult quantity is set to 1 but i want it 0 to know if a customer selected atributes or not. Thanks in advance, and sorry for my bad english Link to comment Share on other sites More sharing options...
parsifal Posted August 22, 2013 Share Posted August 22, 2013 (edited) Hello okaty! I don't think there is a setting for this anywhere in the BackOffice. But you could accomplish what you want by editing the product.tpl file inside your theme folder: ... <!-- 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 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> ... Change this line: <input 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} /> To this: <input type="text" name="qty" id="quantity_wanted" class="text" value="0" size="2" maxlength="3" {if $product->minimal_quantity > 1}onkeyup="checkMinimalQuantity({$product->minimal_quantity});"{/if} /> Disclaimer: I HAVE NOT tested the above myself, but it is a trivial modification and should work... Edited August 22, 2013 by parsifal (see edit history) Link to comment Share on other sites More sharing options...
okaty Posted August 22, 2013 Author Share Posted August 22, 2013 (edited) Hello okaty! I don't think there is a setting for this anywhere in the BackOffice. But you could accomplish what you want by editing the product.tpl file inside your theme folder: ... <!-- 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 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> ... Change this line: <input 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} /> To this: <input type="text" name="qty" id="quantity_wanted" class="text" value="0" size="2" maxlength="3" {if $product->minimal_quantity > 1}onkeyup="checkMinimalQuantity({$product->minimal_quantity});"{/if} /> Disclaimer: I HAVE NOT tested the above myself, but it is a trivial modification and should work... Thank you, for the reply but sadly it doesn't work. The default quantity reamains 1. Edited August 22, 2013 by okaty (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts