0

I have created a catalog_product_view.xml in my theme and when I go to create a widget and select all product types in the layout updates section I can see my custom container I created.

If I then change to simple product type I can't see my container. Do I really need to configure each product type individually?

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <!-- Custom Containers -->
        <referenceContainer name="content">
            <referenceContainer name="product.info.main">
                <container name="test.container" label="Test Container" after="product.name" htmlTag="div" htmlClass="test-container" />
            </referenceContainer>
        </referenceContainer>
    </body>
</page>
  • Can you update the code which you have written on your catalog_product_view.xml – Sukumar Gorai Jan 9 at 12:13
  • Yeah, I just done it and it updated fine. However, it is still not showing on specific product types. Just on all product types. – Kieran Jan 9 at 12:19
  • Can you add your code to the question what you have done? – Sukumar Gorai Jan 9 at 12:20
  • @SukumarGorai I have added the code.. pretty basic so I'm not sure as to why it isn't working. – Kieran Jan 9 at 12:39
  • It should show. Can you take screenshot by Inspect Element for all product types and send it here in comments or to your question? – Sukumar Gorai Jan 9 at 12:41
0

The issue is with core Magento. I have created an issue on the official GitHub repository.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.