Jump to content

(Solved) Remove from Product Page - Availability: 1 Item in stock.


aa1joe

Recommended Posts

  • 7 months later...

Hi,

I have this problem, the product page displays "1 item in stock" I want to be able to remove this text compltely.

I have checked in the BO / Preferences / products and Enable stock management and Display available quantities on prodict page are both set to No.

Can you please advise how I can fix this problem.

it did not display the quanity in verion 1.3 but since upgrading to version 1.4 it is on the product page.

Any help will be very much appreciated.

Many thanks
Nick

Link to comment
Share on other sites

I fixed it,

there is a setting in BO / Preferences / products

Display last quantities when qty is lower than:3 I changed this value to 0 and it has now gone from the product page.

I wouldnt of thought this value would be used if Display available quantities on prodict page is set to No. but anyway it is now fixed.

Thanks
nick

  • Like 1
Link to comment
Share on other sites

Changing "Display available quantities on product page:" to "No" should remove that text. Looking at the code, it seems you must also set the "Display last quantities when qty is lower than:" to 0. If disabling both those options doesn't work, you might be using an old theme that doesn't support removing that text. If so, you will need to manually remove it from product.tpl. Change lines 344-351 of product.tpl (in PrestaShop v1.4.1) from:

<!-- number of item in stock OR isset($combination.list)-->
{if (($display_qties == 1 OR $product->quantity <= $last_qties) && !$PS_CATALOG_MODE && $product->available_for_order)}

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

{/if}



to:

{*<!-- number of item in stock OR isset($combination.list)-->
{if (($display_qties == 1 OR $product->quantity <= $last_qties) && !$PS_CATALOG_MODE && $product->available_for_order)}

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

{/if}*}

Link to comment
Share on other sites

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...