Skip to main content

Google Structured Data Schema

More
3 weeks 2 days ago #100000157 by StefanTwigt
-- url of the page with the problem -- : www.3dstudio.nl/webshop/product/sketchup-pro
-- HikaShop version -- : 6.6.0
-- Joomla version -- : 6.1.4
-- PHP version -- : 8.3.x
-- Browser(s) name and version -- : Chrome 154.0

when checking the product pages on this validator ( validator.schema.org/ ) for Google Structured Data, I noticed that I am missing some data.
I can't find where to add this in Hikashop, so I made a script to add it automatically. However, that means I should also disable/remove the structured data already generated by Hikashop...

Does anyone know how to do that? Disable all structured data for hikashop OR add any missing info to it?

thank you in advance!

Best regards,

Stefan

Please Log in or Create an account to join the conversation.

More
3 weeks 2 days ago #100000158 by nicolas
Hi,

HikaShop builds the product structured data (JSON-LD) itself, and most of what the validators report as missing can be filled in from HikaShop, so you may not need your own script at all. On your SketchUp Pro page the data currently has the name, image, description, SKU and the offer (price, currency, stock, condition), but no brand, GTIN/MPN, return policy or shipping details, because nothing is configured for them yet.

Where each piece comes from:

- Brand: select a brand in the "Brand" field of the product (brands are managed in Products > Brands).

- GTIN: fill in the "GTIN" field on the product edit page.

- MPN: in System > Plugins, open "Hikashop Google / Meta / OpenAI Products feed Plugin" and turn on "Add Product Code (mpn)" to use the product code, or enter the column name of a product custom field in its "MPN" setting.

- Return policy (hasMerchantReturnPolicy): in the same plugin, set "Return policy type", "Return window (days)", "Applicable country" (for example NL; it is required, nothing is output without it), "Return fees", "Return method" and optionally "Return policy page URL". For software licences, "MerchantReturnNotPermitted" is probably the right type.

- Shipping details (shippingDetails): the "Shipping" setting of that plugin, one rule per method separated by commas, in the form country:region:service:price:min handling days:max handling days:min transit days:max transit days, for example NL::Standaard:0.00 EUR:0:1:1:2

- Reviews and rating: added automatically from HikaShop's own product votes/reviews once a product has rated reviews.

- Product condition: the plugin's "Product Condition" setting (new by default).

The plugin only needs to be enabled for these settings to be used on the product pages; you don't have to use its feed.

If you still prefer to output your own structured data, you can turn HikaShop's off with a view override: go to Display > Views, search for show_microdata, click the show_microdata line of your site template (product view, front end), replace its whole content with the content of the attached file show_microdata-override.txt and save. The product pages then no longer contain HikaShop's Product JSON-LD (the breadcrumb data comes from Joomla and stays). You can undo it any time with the "Remove customization" button on that line. Alternatively, a small plugin can add or change properties of HikaShop's data through the onHikashopMicrodataProductInfo event, which receives the JSON-LD object before it is written in the page.

If something is still reported as missing after that, please tell us which property the validator mentions.

Please Log in or Create an account to join the conversation.

Time to create page: 0.091 seconds
Powered by Kunena Forum