Jump to content
Ionut Chiriac

[solved] Prestashop 1.7.x product availability badge

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

Share this post


Link to post
Share on other sites
Posted (edited)

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)

Share this post


Link to post
Share on other sites
Posted (edited)

Thanks for your reply!

Well the option was under my nose (somewhat).

The label was altered at the installation and i managed to translate it from Shop parameters / Products 

Edited by Ionut Chiriac (see edit history)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More