Jump to content

[solved] Prestashop 1.7.x product availability badge


Ionut Chiriac

Recommended Posts

Hello,

I'm using Prestashop version 1.7.5.2 with the Warehouse theme on this web address.

I have a problem regarding the text translation for the product availability badge.

Right now it shows „Fără stoc” (this translates to Out of stock in Romanian) even though the stock for the products is greater then 2.

 

In the backed ive translated the text for „In stock” products but even though i deleted the cache, recompile the template it doesn't seem to be working. Also in the theme file (the product.tpl) the text „Fără stoc” is nowhere to be found.

Also when i change the theme to the default one, the label „Fără stoc” is still present on the product page for all the in stock products.

 

The solution that worked was to insert a custom in stock label (for each product) but this is kinda time consuming and i think there is something that i'm missing here.

 

Any replay helps, thanks.

 

 

 

 

Opera Snapshot_2019-07-11_095115_electro-term.ro.png

Link to comment
Share on other sites

It's difficult to say where is the problem but according to inspector you have:

<div class="product-prices">
  
<span id="product-availability" class="badge badge-success product-available">
   <i class="fa fa-check rtl-no-flip" aria-hidden="true"></i>
                                                     Fără stoc
 </span>
</div>

1. It depends on your theme, but check product-prices.tpl in {your_theme}/templates/catalog/_partials/product-prices.tpl

            NOTICE: it can include other .tpl files, so track all of them.

2. 100% but long method:

           Download all the files of your shop, open files folder with your code editor (ex: Atom or Sublime Text), press Ctrl+Shift+F (find in project) and write your phrase "Fără stoc" and then see the results. In the results, track .tpl files.

           If this method doesnt work it seems you have problems with cache. Also you can delete shop.json file from          {root_folder}/config/themes/{your_theme}

 

Hope it helps!

 

image.png

Edited by Amantha Bill (see edit history)
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...