Jump to content

[SOLVED] Hide Quantity


idab

Recommended Posts

in themes/prestashop/product.tpl

replace:

            
quantity == 0) || $virtual} style="display:none;"{/if}>
{l s='Quantity :'}
               <input type="text" name="qty" id="quantity_wanted" class="text" value="{if isset($quantityBackup)}{$quantityBackup|intval}{else}1{/if}" size="2" maxlength="3" />




with:


quantity == 0) || $virtual} style="display:none;"{/if}>
{l s='Quantity :'}
               <input type="text" name="qty" id="quantity_wanted" class="text" value="{if isset($quantityBackup)}{$quantityBackup|intval}{else}1{/if}" size="2" maxlength="3" />

Link to comment
Share on other sites

  • 1 month later...

Change lines 271-273 from:

{$product->quantity|intval}
quantity > 1} style="display:none;"{/if} id="quantityAvailableTxt">{l s='item in stock'}
quantity < 2} style="display:none;"{/if} id="quantityAvailableTxtMultiple">{l s='items in stock'}



to:

{if $product->quantity|intval > 0}{l s='Yes'}{else}{l s='No'}{/if}
{*quantity > 1} style="display:none;"{/if} id="quantityAvailableTxt">{l s='item in stock'}
quantity < 2} style="display:none;"{/if} id="quantityAvailableTxtMultiple">{l s='items in stock'}*}

Link to comment
Share on other sites

  • 1 year later...

Hi,

How to hide Quantity?

please see my attachment (red circle)

 

i need to do this exact same thing, im running version 1.4.4.1 so the code is a bit different and the solution isnt correct anymore.

 

any suggestions?

 

EDIT-

 

changing the system to use smarty2 instead of smary3 fixed this. i would still like to know where the code is in smarty3 so that i can fix it for future versions.

Edited by Izzyflex (see edit history)
Link to comment
Share on other sites

  • 1 month later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...