Variable product’s prices issue with Merchant Google

#55488
  • We have a problem with Merchant Center using variable products with different prices:
    I think that the structured data markup for all variable products is showing the price of the cheapest variable version of a products. All variable products, apart from the cheapest one, therefor have a structured data markup price that is different than the price that is being put in the product feed and as a result Google will disapprove all of those variations.
    To be clear: in the XML Feed we send to Google we have the correct prices (one for each variable version of the product), but when Google check it in the web site it find a different value in the Schema (the schema always refers to the lowest price among the variable version of the product). This is a problem for us with Google Merchant because it confuses Google when indexing all variations of a product and they are often rejected. (Google Says: Value in xml feed: ‘variable’
    – Value in Schema: ‘lowest’)
    And no matter what variation we tell Google to index, the product:price:amount is always showing the lowest variation price.

    May you help me?
    Dittmar Metz

Viewing 1 replies (of 1 total)
  • Thank you for contacting Rank Math today.

    You can use the following code snippet to customize the product snippet data and assign a new offer price to your products:

    
    /**
     * Filter to Short-circuit Schema if a 3rd party is interested in generating their own data.
     * Replace $schmea_type with schema name like article, review, etc.
     * @param array $entity Snippet Data
     * @return array
     */
    add_filter( "rank_math/snippet/rich_snippet_{$schema_type}", function( $entity ) {
     return $entity;
    });

    Please take a look at this page for more info on this:

    https://rankmath.com/kb/filters-hooks-api-developer/

    To show price inc VAT in the schema data, please add below filter code in your theme’s functions.php file:

    
    add_filter( "rank_math/snippet/rich_snippet_product_entity", function( $entity ) {
        global $product;
        $entity['offers']['price'] = wc_get_price_including_tax( $product );
        return $entity;
    });

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 1 replies (of 1 total)

The ticket ‘Variable product’s prices issue with Merchant Google’ is closed to new replies.