Our prices for Product Schema are showing as "0" because we use product variants for pricing. So I believe we will need to use schema's 'aggregatoffer' to show the low and high price. Anyone else deal with this or have a solution?
Announcement
Collapse
No announcement yet.
Product Price for Schema
Collapse
X
-
You may want to look into updating your product pages to use JSON-LD; this is what has been done in Shadows. Here is an older post regarding this to get you started, there is more information for attributes on page 2 as well.
https://www.miva.com/forums/forum/on...511#post706511Matt Zimmermann
Miva Web Developer
Alchemy Web Development
https://www.alchemywebdev.com
Site Development - Maintenance - Consultation
Miva Certified Developer
Miva Professional Developer
https://www.dev4web.net | Twitter
-
You should be able to use this regardless of how the pricing is handled.Matt Zimmermann
Miva Web Developer
Alchemy Web Development
https://www.alchemywebdev.com
Site Development - Maintenance - Consultation
Miva Certified Developer
Miva Professional Developer
https://www.dev4web.net | Twitter
Comment
-
It shouldn't matter what type of attribute it is. With pricing being set by master plus attribute, even if the attribute has no amount, the master price should still show.Matt Zimmermann
Miva Web Developer
Alchemy Web Development
https://www.alchemywebdev.com
Site Development - Maintenance - Consultation
Miva Certified Developer
Miva Professional Developer
https://www.dev4web.net | Twitter
Comment
-
But that is the problem - the master price is $0 because pricing is determined by the attribute. This is what I see in the page source:
Code:"offers": { "@type": "Offer", "url": "https:\/\/www.seedsoflife.com\/southern-magnolia-memorial-tree", "sku": "S1M", "name": "Southern Magnolia Memorial Tree", "description": "This Southern Magnolia Tree has magnificent white flowers, with a sweet fragrance, that bloom May-June. Its leaves are a rich glossy green, with velvet brown on the underside.\r\nWhen grown to its maximum height, this tree can be 80 feet tall, and 40 feet in diameter. This tree loves sun, and can live 80 years or more.\r\nEach gift tree is beautifully packaged in a 100\u0025 natural jute bag with an accompanying soft green ribbon. When planted, this tree will serve as a memorial to honor that special someone.\r\nCare instructions and a personalized gift card are included with each gift tree. ", "seller": "Seeds Of Life", "itemCondition": "new", "price": "0", "availability": "http://schema.org/InStock", "priceCurrency": "USD" }
Comment
-
As long as you are tracking inventory, I don't see why this isn't returning the correct pricing. Have you tried contacting support regarding this?Matt Zimmermann
Miva Web Developer
Alchemy Web Development
https://www.alchemywebdev.com
Site Development - Maintenance - Consultation
Miva Certified Developer
Miva Professional Developer
https://www.dev4web.net | Twitter
Comment
-
I believe we will need to use schema's 'aggregatoffer' to show the low and high price. Anyone else deal with this or have a solution?
This is from Levels, not Colossus. We're not using JSON. But you should be able to work out something similar using JSON.
Code:<mvt:if expr="ISNULL l.settings:product:customfield_values:customfields:schema_lowprice"> <div itemprop="offers" itemscope itemtype="https://schema.org/Offer"> <meta itemprop="url" content="&mvte:product:link;" /> <meta itemprop="priceCurrency" content="USD" /> <meta itemprop="price" content="&mvt:product:price;" /> <mvt:if expr="NOT ISNULL l.settings:product:customfield_values:customfields:gtin"> <meta itemprop="gtin12" content="&mvt:product:customfield_values:customfields:gtin;" /> </mvt:if> <meta itemprop="availability" content="InStock" /> </div> <mvt:else> <div itemprop="offers" itemscope itemtype="https://schema.org/AggregateOffer"> <meta itemprop="url" content="&mvte:product:link;" /> <meta itemprop="lowPrice" content="&mvt:product:customfield_values:customfields:schema_lowprice;" /> <meta itemprop="highPrice" content="&mvt:product:customfield_values:customfields:schema_highprice;" /> <meta itemprop="offerCount" content="&mvt:product:customfield_values:customfields:schema_offercount;" /> <meta itemprop="priceCurrency" content="USD" /> <mvt:if expr="NOT ISNULL l.settings:product:customfield_values:customfields:gtin"> <meta itemprop="gtin12" content="&mvt:product:customfield_values:customfields:gtin;" /> </mvt:if> <meta itemprop="availability" content="InStock" /> </div> </mvt:if>
Last edited by Ron Frigon; 07-20-21, 09:30 AM.Ron Frigon
Jedi Webmaster Obi-Ron Kenobi
Comment
-
Ron Frigon Thanks for that code Ron. I was definitely hoping not to have to use custom fields as we already have one to show the low-high range on the pages instead of just the price. So that would make pricing adjustments even more tedious. But this is definitely simpler to setup.
Matt Zimmermann We are not actually tracking inventory because we don't need to. But we did generate variants for each size. No, I haven't contacted support yet.
Comment
-
we already have one to show the low-high range on the pages instead of just the price
Code:From $&mvt:product:customfield_values:customfields:schema_lowprice; to $&mvt:product:customfield_values:customfields:schema_highprice;
Ron Frigon
Jedi Webmaster Obi-Ron Kenobi
Comment
Comment