Jump to content

Hide "Quantity" in product main page


morp

Recommended Posts

Hello everyone,
You can hide the quantity of the product from the product main page leaving only the word "available" or "unavailable"?

I've not found such a function in the backend ...

Or .. if I have to do it on myself .. What do you recommend?
Edit the .tpl file (maybe with a display "none" on the block that shows the quantity of the product?)


many thanks
bye

Link to comment
Share on other sites

thank you but I's like to leave "available" or "not available", I want only to hide the quantity available, just the number.

It's an hybrid way.

I think the only thing is to edit .tpl with display block = none


any other advice?

thanks

Link to comment
Share on other sites

I got it..

Now go to your themes/yourtheme/product.tpl to edit.

Find <!-- number of item in stock --> around line 273

and disable from <!-- number of item in stock --> to around line 279 just before the <!-- Out of stock hook -->

regards.

Link to comment
Share on other sites

  • 1 year later...

How would you recommend disabling this part? I'd like to do the same but am not sure what I should remove exactly just to keep the "items in stock" without the actual quantity:

 

{if ($product->quantity <= $last_qties OR isset($combination.list))}

<p id="pQuantityAvailable"{if $display_qties != 1 OR $product->quantity <= 0 OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display: none;"{/if}>

<span id="quantityAvailable">{$product->quantity|intval}</span>

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

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

</p>

{/if}

Link to comment
Share on other sites

  • 1 year later...
  • 1 year 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...