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) Commented Nov 20, 2018 at 10:07
  • @ArnoVandeCappelle I am sure indeedy Commented Nov 20, 2018 at 10:08
  • ^^flagging own question due to typo issue Commented Nov 20, 2018 at 16:04
  • I'm voting to close this question as off-topic because of last comment ;) Commented 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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.