Jump to content

edit stock status


ovy79ro
 Share

Recommended Posts

Hello.

 

I want to change stock status on prestashop 1.4.

I want to set three categories:

- when stock is 0, i want status "this product is no longer available"

- when stock is 1, i want status "Ask stock"

- when stock is 2, i want status "On stock"

 

I update my products database from an xml file.

 

What page should i edit? product_list.tpl?

 

Sorry for my bad english :)

Edited by ovy79ro (see edit history)

Share this post


Link to post
Share on other sites

I have 10000 products in db, i can't modify stock of products line by line. I receive daily an xml file from my supplier which contains all products (prices and stock). I update daily my db from this xml file (prices and stock).

I want to make changes to product.tpl file, as I said above:

- when stock is 0, i want status "this product is no longer available"

- when stock is 1, i want status "Ask stock"

- when stock is 2, i want status "On stock

 

Any ideas?

Share this post


Link to post
Share on other sites

try this in product.tpl and for product-list.tpl just change -> with . (ex.: $product.quantity)

 

{if $product->quantity <= 0} {l s='This product is no longer available'} {elseif $product->quantity == 1} {l s='Ask stock'} {else} {l s='On stock'} {/if}

Edited by AdiManiur (see edit history)

Share this post


Link to post
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
 Share

×
×
  • Create New...

Important Information

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