Jump to content

[SOLVED] Displayed text when in stock --> Update all at once? Help?


Recommended Posts

Hello all,

 

I have been trying to change "Displayed text when in stock" via FTP --> File: products.tpl

 

I have had no luck with doing this.

 

I would like all products to say: In Stock / Out of Stock.

 

If I do this manually via BO this works fine but I have over 1000+ products and this would take me forever to do manually.

 

Is there an easier way to do this all at once via FTP and editing a certain file?

 

Code I have: 

 

post-784824-0-07780900-1406335208_thumb.png

 
Thanks so much in advance!
Edited by justusguys (see edit history)
Link to comment
Share on other sites

Thanks for your reply but I actually found the fix.

 

In FTP go to:

public_html --> Themes --> Your Theme --> product.tpl

 

In products.tpl find the below block;

 

<!-- availability -->
<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=''}</span>
<span id="availability_value"{if $product->quantity <= 0} class="warning_inline"{/if}>
{if $product->quantity <= 0}{if $allow_oosp}{l s='Out of Stock'}{else}{l s='This product is no longer in stock'}{/if}{else}{l s='In Stock'}{/if}
</span>
</p>
 
The highlighted red text/code is the ONLY bit you need to remove.
 
So in the end you should have a code looking like:
 
<!-- availability -->
<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: "{/if}>
<span id="availability_label">{l s=''}</span>
<span id="availability_value"{if $product->quantity <= 0} class="warning_inline"{/if}>
{if $product->quantity <= 0}{if $allow_oosp}{l s='Out of Stock'}{else}{l s='This product is no longer in stock'}{/if}{else}{l s='In Stock'}{/if}
</span>
</p>
 
Save this file but keep the file open and then upload the file to FTP and check that your site is all working correctly, if it is then close the file and you will now have (image attached for results).
fixed.jpg
 
Hope this helps!
 
Thanks  :D
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...