1

I've been trying to create an override for the addto.phtml file but it doesn't seem to be working.

I have this theme file:

/app/design/frontend/Vendor/theme/Magento_Catalog/product/view/addto.phtml

With this in the file:

<div class="product-addto-links" data-role="add-to-links">
    <?php echo $block->getChildHtml(); ?>

    <a href="#amfinder.product.attributes" class="action">
        <span>View Compatibility</span>
    </a>
</div>

I've run:

$ php bin/magento setup:upgrade
$ php bin/magento setup:di:compile
$ php bin/magento setup:static-content:deploy -f
$ php bin/magento cache:clean

Everything was a-ok but refreshing the product view page had no changes. What am I missing from my override?

4
  • Are you sure you are using the custom theme? (settings in the backoffice) Nov 20, 2018 at 10:07
  • @ArnoVandeCappelle I am sure indeedy
    – treyBake
    Nov 20, 2018 at 10:08
  • ^^flagging own question due to typo issue
    – treyBake
    Nov 20, 2018 at 16:04
  • I'm voting to close this question as off-topic because of last comment ;)
    – sv3n
    Nov 20, 2018 at 20:21

1 Answer 1

4

You have put your file in the wrong place.

Instead of:

app/design/frontend/Vendor/theme/Magento_Catalog/product/view/addto.phtml

you should put the file in:

app/design/frontend/Vendor/theme/Magento_Catalog/templates/product/view/addto.phtml

Notice the templates in the file path.

0

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.