rayg Posted June 26, 2013 Share Posted June 26, 2013 Dear sir madam I got a default theme v1.5.4.1. With 3 language installed - german - spain - english If you look at the Product page. The Stock text is not translate. for example if i choose the Language german, spain, 1. Where can i change the text In stock Screenshot: issue is s Link to comment Share on other sites More sharing options...
rayg Posted July 3, 2013 Author Share Posted July 3, 2013 anyone? Link to comment Share on other sites More sharing options...
vekia Posted July 3, 2013 Share Posted July 3, 2013 you're using default translation tool to translate this field? (localization > translations - then select "front office translatinons" search for product.tpl and translate it) in some cases it's also necessary to clear prestashop cache (or recompile tempalte) Link to comment Share on other sites More sharing options...
rayg Posted July 15, 2013 Author Share Posted July 15, 2013 (edited) 1. no, I download the dutch v1.5.4.1 language pack http://www.prestasho...en/translations The in Stock was not translated. 2. I folllow your instructions "localization > translations - then select "front office translatinons" search for product.tpl and translate it) After i select the FRONT office Translations. There is on the left a dropdown menu i can only choose DEFAULT. 3. Where exactly can i clear the Presta Cache or recompile the template Edited July 15, 2013 by rayg (see edit history) Link to comment Share on other sites More sharing options...
eleazar Posted July 15, 2013 Share Posted July 15, 2013 Hi rayg, you won't find in in the translations, because this to be modified for each produkt. Go in BO to Catalog, then choose Product -->open any <anyproduct>-->Quantities Then scroll down to section Availabilty options, where you find the standard 'in stock'. Change it to whatever you like. 1 Link to comment Share on other sites More sharing options...
vekia Posted July 15, 2013 Share Posted July 15, 2013 that's right, @eleazar has got absolutely right. This is the way to achieve this. i marked this thread as [solved] - if you've got any other questions - feel free to continue discussion here regards Link to comment Share on other sites More sharing options...
rayg Posted July 16, 2013 Author Share Posted July 16, 2013 (edited) Hi rayg, you won't find in in the translations, because this to be modified for each produkt. Go in BO to Catalog, then choose Product -->open any <anyproduct>-->Quantities Then scroll down to section Availabilty options, where you find the standard 'in stock'. Change it to whatever you like. Thank you it worked :-) . Edited July 16, 2013 by rayg (see edit history) Link to comment Share on other sites More sharing options...
acemiprestaci Posted July 21, 2013 Share Posted July 21, 2013 hello. yes it works when i change "in stock" in product page. but make it separately for all products is very hard and consuming time too much. how can i make bulk edit and change "in stock" for all products ? 2 Link to comment Share on other sites More sharing options...
vekia Posted July 21, 2013 Share Posted July 21, 2013 if you want to use the same information for each product in your store, just go to the theme directory and open the product.tpl file you've got there: <span id="availability_value"{if $product->quantity <= 0} class="warning_inline"{/if}>{if $product->quantity <= 0}{if $allow_oosp}{$product->available_later}{else}{l s='This product is no longer in stock'}{/if}{else}{$product->available_now}{/if}</span> change the: {$product->available_now} to {l s='available now'} {$product->available_later} to {l s='available later'} or use any other text you want (then you will be able to translate it under the localization > translation tab) 2 Link to comment Share on other sites More sharing options...
acemiprestaci Posted July 21, 2013 Share Posted July 21, 2013 Hi Vekia !! Many thanks for your help.it is amazing ! Link to comment Share on other sites More sharing options...
MissLili Posted April 11, 2014 Share Posted April 11, 2014 Thank you Vekia for your solution!! I tried it and it's working great in English, but as 2nd language has no translated text by default in the 2 product availability fields, the text doesn't show up. Would there be a way to make it appear when needed without the need to go put text in those two fields for every item? Thanks! Link to comment Share on other sites More sharing options...
vekia Posted April 11, 2014 Share Posted April 11, 2014 hello what you've got right now in the code Link to comment Share on other sites More sharing options...
MissLili Posted April 11, 2014 Share Posted April 11, 2014 (edited) Hi, thanks for your fast answer! My code so far is: <p id="availability_statut"{if ($product->quantity <= 0 && !$product->available_later && $allow_oosp) OR ($product->quantity > 0 && !$product->available_now) OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display: none;"{/if}> <span id="availability_label">{l s='Availability:'}</span> {* ORIGINAL *} <span id="availability_value"{if $product->quantity <= 0} class="warning_inline"{/if}>{if $product->quantity <= 0}{if $allow_oosp}{$product->available_later}{else}{l s='This product is no longer in stock'}{/if}{else}{$product->available_now}{/if}</span> {* LILIDOO MODIF *} <span id="availability_value"{if $product->quantity <= 0} class="warning_inline"{/if}>{if $product->quantity <= 0}{if $allow_oosp}{l s='Pre-order one!'}{else}{l s='This product is no longer in stock'}{/if}{else}{l s='Available now'}{/if}</span> </p> I think the if in the <p> is the problem as the code shows "style="display: none;" when the page is in french It shows "in stock in stock" in english, but nothing in french! Thanks! Edited July 23, 2014 by MissLili (see edit history) Link to comment Share on other sites More sharing options...
MissLili Posted April 11, 2014 Share Posted April 11, 2014 (edited) (How can I delete this reply?) Edited April 11, 2014 by niclap (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted April 11, 2014 Share Posted April 11, 2014 i missed something? product is in stock (?) Link to comment Share on other sites More sharing options...
MissLili Posted April 14, 2014 Share Posted April 14, 2014 (edited) *deleted* Edited July 23, 2014 by MissLili (see edit history) Link to comment Share on other sites More sharing options...
mastek Posted February 4, 2015 Share Posted February 4, 2015 if you want to use the same information for each product in your store, just go to the theme directory and open the product.tpl file you've got there: <span id="availability_value"{if $product->quantity <= 0} class="warning_inline"{/if}>{if $product->quantity <= 0}{if $allow_oosp}{$product->available_later}{else}{l s='This product is no longer in stock'}{/if}{else}{$product->available_now}{/if}</span> change the:{$product->available_now} to {l s='available now'} {$product->available_later} to {l s='available later'} or use any other text you want (then you will be able to translate it under the localization > translation tab) Hello vekia, i try this solution on prestashop 1.6.0.9 and its not working, I still shows translation from product card (in stock) or nothing - can you help me with this? my code in product.tpl <p id="availability_statut"{if ($product->quantity <= 0 && !$product->available_later && $allow_oosp) || ($product->quantity > 0 && !$product->available_now) || !$product->available_for_order || $PS_CATALOG_MODE} style="display: none;"{/if}> {*<span id="availability_label">{l s='Availability:'}</span>*} <span id="availability_value"{if $product->quantity <= 0 && !$allow_oosp} class="warning_inline"{/if}>{if $product->quantity <= 0}{if $allow_oosp}{l s='available later'}{else}{l s='This product is no longer in stock'}{/if}{else}{l s='available now'}{/if}</span> </p> Link to comment Share on other sites More sharing options...
vekia Posted February 4, 2015 Share Posted February 4, 2015 you recompiled theme after applying changes? Link to comment Share on other sites More sharing options...
mastek Posted February 4, 2015 Share Posted February 4, 2015 (edited) {PL}Po polsku było by mi łatwiej ale że to angielski wątek to postaram się to opisać{/PL} I think so On "Advenced"->"Performance" i have select such options: Compilation template:Force compilation. Cache: NO I click "Save" and "Clear Cache" on the top. On the bottom i have option: Use Cache: No Edited February 4, 2015 by mastek (see edit history) Link to comment Share on other sites More sharing options...
weareawes Posted November 9, 2016 Share Posted November 9, 2016 Hi I tried change products.tpl file, later translated on back-end. Then when I refreshed my page there was a good translation, but after few miliseconds it refresh in "In stock", this caused Js script which I can't find. Any ideas how to fix. P.S. my prestashop is 1.6.1.7 Link to comment Share on other sites More sharing options...
vekia Posted November 9, 2016 Share Posted November 9, 2016 any chance to see it live? it requires inspection of code Link to comment Share on other sites More sharing options...
Recommended Posts