outeredge / magento-structured-data-module

Magento Structured Data Module by outer/edge
MIT License
52 stars 14 forks source link

Missing on Product #56

Closed charlielangridge closed 1 year ago

charlielangridge commented 1 year ago

I've installed the plugin (lincolnbinns.com) and enabled the structured data for products but the script is not being inserted. It works on the contact page and the category pages, just not the products - could you shed any light on this please

davidwindell commented 1 year ago

Hi @charlielangridge, the script is injected here:

https://github.com/outeredge/magento-structured-data-module/blob/c2a7670575390f893c11921a916d29829be826eb/view/frontend/layout/default.xml#L5

and

https://github.com/outeredge/magento-structured-data-module/blob/c2a7670575390f893c11921a916d29829be826eb/view/frontend/layout/catalog_product_view.xml#L4

Please check your theme isn't removing this block or target container.

charlielangridge commented 1 year ago

Hi @davidwindell - nope nothing to remove those - our catalog_product_view.xml is


<?xml version="1.0"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <script src="js/custom.js" />
    </head>
    <body>
        <move element="page.main.title" destination="product.info.main" before="-"/>
        <move element="product.info.stock.sku" destination="product.info.price" after="product.price.final"/>
        <move element="product.info.review" destination="product.info.main" before="product.info.price"/>
        <referenceBlock name="catalog.compare.sidebar" remove="true"/>
        <referenceBlock name="product.info.review" remove="true" />
        <referenceBlock name="reviews.tab" remove="true" />
    </body>
</page>
davidwindell commented 1 year ago

Hm, ok please drop support@outeredge.agency an email and we'll see if one of the team can access your site and take a deeper look.