[email protected] Posted March 4, 2015 Share Posted March 4, 2015 Hi, I would like to know if it is possible in any way to add a text on my product pages saying '' Estimated delivery time: xx days '' I would like the text to be shown under the text '' Available ''. I know that i can change the product.tpl and just add the text where i want it, but I dont want the same delivery time on every product and i would like the text to dissapear if the product is out of stock. Does anyone know what code to write? I guess i need to change it in the product.tpl? Link to comment Share on other sites More sharing options...
Naldinho Posted March 4, 2015 Share Posted March 4, 2015 (edited) Edit product.tpl. Use an if statement and product id to set different text. Put the whole thing in a if statement that checks out of stock and only displays something if the product is available. I'd love to help more but I don't know what the variables PrestaShop uses to store the info. A chart of those would be really helpful. Edited March 4, 2015 by Naldinho (see edit history) Link to comment Share on other sites More sharing options...
[email protected] Posted March 5, 2015 Author Share Posted March 5, 2015 I'm not really good at this, but i found this in product.tpl: <!-- number of item in stock --> {if ($display_qties == 1 && !$PS_CATALOG_MODE && $product->available_for_order)} <p id="pQuantityAvailable" {if $product->quantity <= 0}style="display:none"{/if}> <span id="quantityAvailable">{$product->quantity|intval}</span> <span id="quantityAvailableTxt" {if $product->quantity > 1}style="display:none"{/if}>{l s='item in stock'}</span> <span id="quantityAvailableTxtMultiple" {if $product->quantity == 1}style="display:none"{/if}>{l s='items in stock'}</span> </p> {/if} Maybe I can use some of this, and just change it? Link to comment Share on other sites More sharing options...
[email protected] Posted March 5, 2015 Author Share Posted March 5, 2015 {if} <p id="pQuantityAvailable" {if $product->quantity <= 0}style="display:none"{/if}> <span id="quantityAvailableTxt" {if $product->quantity > 1}style="display:none"{/if}>{l s='Estimated delivery time: XX days'}</span> </p> {/if} How about this? 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