ovy79ro Posted March 11, 2015 Share Posted March 11, 2015 (edited) 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 March 11, 2015 by ovy79ro (see edit history) Link to comment Share on other sites More sharing options...
musicmaster Posted March 11, 2015 Share Posted March 11, 2015 You are not very precise in pointing out what you want. product_list.tpl is called by category.tpl and so is used to show the products on the category page. The page with individual products is product.tpl. Link to comment Share on other sites More sharing options...
ovy79ro Posted March 11, 2015 Author Share Posted March 11, 2015 Sorry, product.tpl i mean. Link to comment Share on other sites More sharing options...
ovy79ro Posted March 12, 2015 Author Share Posted March 12, 2015 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? Link to comment Share on other sites More sharing options...
Adi Maniur Posted March 12, 2015 Share Posted March 12, 2015 (edited) 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 March 12, 2015 by AdiManiur (see edit history) Link to comment Share on other sites More sharing options...
ovy79ro Posted March 12, 2015 Author Share Posted March 12, 2015 Thank you AdiManiur for advice. On product-list.tpl I will try to take same stock from product.tpl. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now