Jump to content

Default Label "There are not enough products in stock" not show translated one from Product Settings


8ternity
 Share

Recommended Posts

Hi,

I have the version 1.7.5.1 installed with two differents languages. I've modified the default label for "Out of Stock" in english, and "En Rupture" for French. We can clearly see that the label is set into product settings:

2020-01-28_13h15_33.thumb.png.7e32e19638fdebe6099d9eb2bedc61e9.png

In Github, they have a fix for the Product which i already applied.
https://github.com/PrestaShop/PrestaShop/pull/12655/commits/1132abd94382fc13c614371a85c108be1cc26a31
 

I clear cache, clear browser cache, delete \var\cache\dev and \prod folders.

Message are still shown has default one.

2020-01-28_13h17_37.thumb.png.862788574e9923c29ef2b93ec09a373b.png

 

Maybe i can translate the label from the ProductLazyArray.php for the english part, but what about the French label? 

Anybody can help me with that issue?

PS 1.7.5.1 with French Canada "qc" + English Canada "en" languages.

Thanks.

 

 

Share this post


Link to post
Share on other sites

Fixed!

I download a Fresh installation of 1.7.6.3 files and copy the line 788 of \src\Adapter\Presenter\Product\ProductLazyArray.php, replace the line 766 into the version of 1.7..5.1 currently in my store (same file).


Replace

} elseif ($product['quantity'] - $product['quantity_wanted'] < 0) {


for

} elseif ($product['quantity_wanted'] > 0 && $product['quantity'] > 0) {


It's working now with the label entered into "Product Settings".

Share this post


Link to post
Share on other sites

  • 6 months 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
 Share

×
×
  • Create New...

Important Information

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