Announcement

Collapse
No announcement yet.

Product Price for Schema

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Product Price for Schema

    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?

    #2
    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#post706511
    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


      #3
      I saw that post but wasn't sure if implementing would fix my problem, and I didn't want to go through it if it didn't. Our inventory variants are created using "Variant Price is set by the Master Product and its Attributes". Will that work?

      Comment


        #4
        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


          #5
          I set this up but I am still getting a '0' for the price. The attribute that creates the price is a radio button - would that affect it? We have a default set.

          Comment


            #6
            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


              #7
              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


                #8
                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


                  #9
                  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?
                  Probably not the best solution. And maybe not the best way of doing it... I've run across this issue as well. Fortunately I didn't have too many products to deal with. Here's the workaround I came up with. It requires setting up some custom fields, populating the data and maintaining it when there are changes. Not a great solution but it works.

                  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


                    #10
                    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


                      #11
                      we already have one to show the low-high range on the pages instead of just the price
                      Ya, you would want to split that into two different fields and update the display.

                      Code:
                      From $&mvt:product:customfield_values:customfields:schema_lowprice; to $&mvt:product:customfield_values:customfields:schema_highprice;
                      I only had about 8 products to deal with so not a huge undertaking...
                      Ron Frigon
                      Jedi Webmaster Obi-Ron Kenobi

                      Comment

                      Working...
                      X