DARKF3D3 Posted September 19, 2016 Share Posted September 19, 2016 I would like to remode the product condition from the product pages, but i need to continue having the itemprop condition into the html code. The original PS code it's (product.tpl): {if !$product->is_virtual && $product->condition} <p id="product_condition"> <label>{l s='Condition:'} </label> {if $product->condition == 'new'} <link itemprop="itemCondition" href="https://schema.org/NewCondition"/> <span class="editable">{l s='New product'}</span> {elseif $product->condition == 'used'} <link itemprop="itemCondition" href="https://schema.org/UsedCondition"/> <span class="editable">{l s='Used'}</span> {elseif $product->condition == 'refurbished'} <link itemprop="itemCondition" href="https://schema.org/RefurbishedCondition"/> <span class="editable">{l s='Refurbished'}</span> {/if} </p> {/if} Editing it like showed below should works? {if !$product->is_virtual && $product->condition} {if $product->condition == 'new'} <link itemprop="itemCondition" href="https://schema.org/NewCondition"/> {elseif $product->condition == 'used'} <link itemprop="itemCondition" href="https://schema.org/UsedCondition"/> {elseif $product->condition == 'refurbished'} <link itemprop="itemCondition" href="https://schema.org/RefurbishedCondition"/> {/if} {/if} Link to comment Share on other sites More sharing options...
modprestashop Posted September 19, 2016 Share Posted September 19, 2016 Why don't you test your new HTML code with Google snippet test tool https://search.google.com/structured-data/testing-tool ? It can give you perfect answer than any Prestashop experts. Link to comment Share on other sites More sharing options...
DARKF3D3 Posted September 19, 2016 Author Share Posted September 19, 2016 I asked this because I'm not expert and I'm not sure if this can create any problem on my website, so before apply this modify I prefer having an opinion about this from a PS expert. Link to comment Share on other sites More sharing options...
rocky Posted September 21, 2016 Share Posted September 21, 2016 Looks fine to me. Give it a go and see what happens. 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