0

I want to override vendor/magento/module-catalog/view/frontend/templates/product/view/attributes.phtml file in my theme.

I've tried putting it in app/code/Infortis/Ultimo/Magento_Catalog/templates/product/view/attributes.phtml

but that doesn't do anything at all

I've also tried app/design/frontend/Infortis/ultimo/Magento_Catalog/templates/product/view/attributes.phtml

but this just creates a duplicate file in var/view_preprocessed/pub/static/app/design/frontend/Infortis/ultimo/Magento_Catalog/templates/product/view/attributes.phtml

instead of overriding the file in var/view_preprocessed/pub/static/vendor/magento/module-catalog/view/frontend/templates/product/view/attributes.phtml

Any help is very appreciated

1 Answer 1

1

Override attributes.phtml with theme Copy From

vendor/magento/module-catalog/view/frontend/templates/product/view/attributes.phtml

To

app/design/frontend/{Vendor}/{theme}/Magento_Catalog/templates/product/view/attributes.phtml

Create catalog_product_view.xml at

app/design/frontend/{Vendor}/{theme}/Magento_Catalog/layout/catalog_product_view.xml

<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="product.attributes">
            <action method="setTemplate">
                <argument name="template" xsi:type="string">Magento_Catalog::product/view/attributes.phtml</argument>
            </action>
        </referenceBlock>
    </body>
</page>
2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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