Move Add to Wishlist Button after Add to Cart in Product View

by Jackrose   Last Updated August 21, 2018 07:09 AM

How to move Add to wishlist button after Add-to cart?

I try using move but just working on configurable product. I want it works too on simple products.

Check my catalog_product_view.xml :

...
  <move element="product.addto.wishlist" destination="product.info.addtocart.additional" />
...
  <container name="product.addto.wishlist" as="product_addto_wishlist" htmlClass="product wishlist" htmlTag="div">
      <block class="Magento\Catalog\Block\Product\View" name="product.info.addto" as="addto" template="Magento_Catalog::product/view/addto.phtml"/>
  </container>
...

Add to Wishlist button not showing on simple product.

Simple Products

Configurable Products :

Configurable Products

Thanks.



Answers 2


Can you try this

<move element="product.addto.wishlist" destination="product.info.addtocart.additional" after="product.info.addtocart">
Shorabh Kumar Gupta
Shorabh Kumar Gupta
August 21, 2018 06:15 AM

I got solutions for my problem.

Just create catalog_product_view_type_simple.xml and use this code below:

...
   <referenceBlock name="product.info.addtocart">
        <block class="Magento\Catalog\Block\Product\View" name="product.info.addto" as="addto" template="Magento_Catalog::product/view/addto.phtml"/>
   </referenceBlock>
...
Jackrose
Jackrose
August 21, 2018 06:58 AM

Related Questions


CE 1.9 - CSS class for CMS Page Layout update

Updated June 29, 2015 18:04 PM



Magento 2 - Updating Product list page Layout

Updated April 06, 2018 11:09 AM

Duplicate product/view tabs element in Magento 2

Updated March 13, 2017 15:09 PM