Dirty Butter Posted July 24, 2016 Share Posted July 24, 2016 (edited) The Structured Data test tool, https://search.google.com/structured-data/testing-tool# is complaining that Quote (The property $19.00 is not a valid price specification. Learn more about http://schema.org/price.) I need to split the itemprop code so the currency symbol is split off of the price. To do that I need to know what to use for the symbol itself, so it works with any currency, and how to stop CC from automatically adding the symbol to the price. This is not satisfying Google: <td><div itemprop="offers" itemscope itemtype="http://schema.org/Offer"><meta itemprop="priceCurrency" content="USD" /><span itemprop="price">{$PRODUCT.price}</span></div></td> Edited July 27, 2016 by Dirty Butter Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 26, 2016 Share Posted July 26, 2016 Would something like this work? <td> <div itemprop="offers" itemscope itemtype="http://schema.org/Offer"> <meta itemprop="priceCurrency" content="USD" /> <meta itemprop="price" content="{$PRODUCT.full_base_price}"{* Example: 14.99 *} /> <span>{$PRODUCT.price}</span> </div> </td> Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted July 26, 2016 Author Share Posted July 26, 2016 That works perfectly, but I need to have something similar for the Sale Price. Any suggestions? I tried <meta itemprop="price" content="{$PRODUCT.full_base_sale_price}"{* Example: 14.99 *} /> Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 26, 2016 Share Posted July 26, 2016 In the template main.php, at the bottom, add {debug}, save the file, view a product, then remove {debug} from the template file. Do this as quickly as possible. Do not dismiss the Smarty debug popup window as you will be able to scroll to the PRODUCT variable (or any other product-related variable) to see all the various elements that relate to that product. You don't want the {debug} popup to be seen by visitors, so that's why I suggest that once you get the popup, remove the {debug} command as quickly as possible. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted July 26, 2016 Author Share Posted July 26, 2016 OK I have the popup. What am I looking for? Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 26, 2016 Share Posted July 26, 2016 Viewing the left pane, scroll to PRODUCT. Then, in the right pane, you will see 'price', 'sale_price', and a bunch of other data elements. Pick the name of the element you want to use. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted July 26, 2016 Author Share Posted July 26, 2016 I just found price_to_pay => "6.00"full_base_price => "8.00"price_unformatted => "8.00"sale_price_unformatted => "6.00" I used price_to_pay and it worked!! THANK YOU! Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 26, 2016 Share Posted July 26, 2016 Interesting: this is what I have -- price_to_pay => 9full_base_price => "10.00"price_unformatted => "10.00"sale_price_unformatted => 9 Unfortunately for me, 'price_to_pay' (note that javascript will update the displayed value based on options selected) and 'sale_price_unformatted' are in true integers, not strings. But your store seems to have it. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted July 26, 2016 Author Share Posted July 26, 2016 I have a nagging unrelated issue with the way I tried to code some if/else for pricing. I'm going to open a different thread for it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.