Announcement

Collapse
No announcement yet.

Duplicate field in Google Merchant listings

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

    Duplicate field in Google Merchant listings

    I'm getting an error in my Google Search Console Merchant listings that states Duplicate field "price" (in "offers").

    When I dig around in the code, I believe I've narrowed it down to this IF statement in the Google Rich Snippets of the PROD page:

    Code:
    <mvt:if expr="l.settings:attributemachine:product:inv_leve l">
    <mvt:assign name="l.availability_inv_level" value="l.settings:attributemachine:product:inv_lev el"/>
    <mvt:do name="l.formatted_variant_price" file="g.Module_Root $ g.Store:currncy_mod:module" value="CurrencyModule_AddFormatting( g.Store:currncy_mod, l.settings:attributemachine:product:price )" />
    <meta itemprop="price" content="&mvt:attributemachine:product:price;"/>
    <mvt:else>
    <mvt:assign name="l.availability_inv_level" value="l.settings:product:inv_level"/>
    <meta itemprop="price" content="&mvt:product:price;"/>
    </mvt:if>
    One other possible location for the error is from JavaScript Resource: product-json-ld. The relevant code there is:

    Code:
    "offers": {
    "@type": "Offer",
    "url": "&mvtj:product:link;",
    <mvt:if expr="NOT ISNULL l.settings:product:sku">
    "sku": "&mvtj:product:sku;",
    <mvt:else>
    "sku": "&mvtj:product:code;",
    </mvt:if>
    "name": "&mvtj:product:name;",
    "description": "&mvtj:product:stripped_descrip;",
    "seller": "&mvtj:global:store:name;",
    "itemCondition": "NewCondition",
    <mvt:if expr="l.settings:attributemachine:product:inv_leve l">
    <mvt:assign name="l.availability_inv_level" value="l.settings:attributemachine:product:inv_lev el"/>
    <mvt:do name="l.formatted_variant_price" file="g.Module_Root $ g.Store:currncy_mod:module" value="CurrencyModule_AddFormatting( g.Store:currncy_mod, l.settings:attributemachine:product:price )" />
    "price": "&mvtj:attributemachine:product:price;",
    <mvt:else>
    <mvt:assign name="l.availability_inv_level" value="l.settings:product:inv_level"/>
    "price": "&mvtj:product:price;",
    </mvt:if>
    <mvt:if expr="l.availability_inv_level EQ 'low'">
    "availability": "http://schema.org/LimitedAvailability",
    <mvt:elseif expr="l.availability_inv_level EQ 'out'">
    "availability": "http://schema.org/OutOfStock",
    <mvt:else>
    "availability": "http://schema.org/InStock",
    </mvt:if>
    "priceCurrency": "USD"
    }
    Unfortunately, I'm not conversant enough in any code language to determine if this is exactly where the problem is, or how to fix it. Can anyone give me some help here?

    #2
    It looks to me like the double price issue might be because the schema is being delivered in two formats. Both Microdata (your 1st code snippet) and JSON-LD (your 2nd code snippet) seem to be used on the page. Those conditionals in both code snippets should not cause a duplicate price within the offers of each snippet.

    Do you have a link to a product page?

    Either tool on this page should be helpful, although I'd go with the Google tool if you're looking to make Google happy: https://developers.google.com/search...tructured-data
    Nick Harkins
    www.loveisarose.com
    *Web Developer
    *Miva
    *Google Analytics, Search Console, Tag Manager, Merchant Center, Ads

    Comment


      #3
      Thanks for the link. The Google tool is not happy, but the Schema tool appears to be. I've got about half my products (600+) that are getting the duplicate price complaint from Google. Here's the page I tested:

      https://www.captainboom.com/santa-muerte

      Again, I only know enough to be dangerous when it comes to coding, and there have been many hands on this site over the past few years. It could be that the left hand didn't know what the right hand was doing. I could use a redo IMO, due to the amount of cruft that I'm sure has built up. Nevertheless pointing me to how to solve this would be most appreciated.

      Comment


        #4
        It looks like it is due to a duplicate price itemprop in the microdata (html) that is in the Shadows theme.

        On the PROD page template go to the Product Display Layout and replace this line:
        Code:
                                        <span id="price-value" itemprop="price" content="&mvte:product:price;">&mvt:product:formatted_price;</span>
        with this:
        Code:
                                        <span id="price-value">&mvt:product:formatted_price;</span>
        I'll go ahead and post this issue in the Shadows thread.
        Nick Harkins
        www.loveisarose.com
        *Web Developer
        *Miva
        *Google Analytics, Search Console, Tag Manager, Merchant Center, Ads

        Comment


          #5
          Thank you very much for the code fix. I've applied it to the PROD page Product Display Layout, and told Google to validate it, so it's grinding away at that. In looking at the code history, a developer from a few years ago is the last person who made any changes to the Product Display Layout, so it may not be a template issue.

          Comment


            #6
            Hii, Similar problem i am facing on my website. In product schema GSC says there is critical error named Duplicate field "brand" and i am unable to find it on my website. can anyone help me with that, there. my website is Yufta (dot) com. Share if anyone know how to remove the error that will be a great help to me.

            Comment


              #7
              nevermind
              Last edited by Bruce - PhosphorMedia; 04-29-24, 12:23 PM.
              Bruce Golub
              Phosphor Media - "Your Success is our Business"

              Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
              phosphormedia.com

              Comment


                #8
                Originally posted by GSS View Post
                Hii, Similar problem i am facing on my website. In product schema GSC says there is critical error named Duplicate field "brand" and i am unable to find it on my website. can anyone help me with that, there. my website is Yufta (dot) com. Share if anyone know how to remove the error that will be a great help to me.
                Possibly from a duplicate set of JSON LD data around the point of

                <div id="ProductSection-template--17817663471834__main-6840553963704"

                Its surrounded by HTML comment tags, but GSC may ignore that. (And stuff like this should use <mvt:comment></mvt:comment> instead. HTML comments should only be used when you WANT devs/etc to see that information (from view source or Inspector).

                Nice looking site though!
                Bruce Golub
                Phosphor Media - "Your Success is our Business"

                Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
                phosphormedia.com

                Comment

                Working...
                X