Incorrect Product JSON-LD Price / SKU For Products With Variants (EasyStore 2.1.0 & 3.0.0) - Question | JoomShaper

is live, now with multi-currency selling.

Incorrect Product JSON-LD Price / SKU For Products With Variants (EasyStore 2.1.0 & 3.0.0)

Stephane Hanrez

Stephane Hanrez

EasyStore 4 days ago

Hi,

I found an issue with the automatic Product structured data generated by EasyStore for products using variants.

For a product where pricing, SKU and inventory are defined at variant level, the product page correctly displays the selected variant price, but the generated JSON-LD contains:

"offers": {
    "@type": "Offer",
    "priceCurrency": "EUR",
    "price": "0.00",
    "availability": "schema.org/InStock"
},
"sku": ""

The product itself has no parent price because pricing is managed through its variants.

After checking site/src/Traits/ProductStructuredData.php, the structured data appears to use the parent product values:

$price = $product->has_sale
    ? $product->discounted_price
    : $product->regular_price;

and:

"sku" => isset($product->sku) ? $product->sku : '',

This means the JSON-LD does not reflect the selected variant, although the product URL can represent a specific variant (for example /product-name/black-12-years).

I compared ProductStructuredData.php from EasyStore 2.1.0 and 3.0.0 and the relevant implementation is unchanged, so the same issue appears to be present in EasyStore 3.0.0.

Could you please check how Product structured data is generated for products with variants?

Ideally, the schema should either represent the selected variant with its actual price, SKU and availability, or use the appropriate ProductGroup/Product variant structured data.

Thank you.

0
1 Answers
Ziaul Kabir
Ziaul Kabir
Accepted Answer
Support Agent 4 days ago #233961

Hi Stephane,

Thank you for reporting this issue and for providing the detailed analysis.

I have forwarded this to our development team for further review. We appreciate your findings regarding the JSON-LD structured data for variant products, including the price and SKU behavior in EasyStore.

Thanks for your understanding and patience.

Best Regards,

0