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

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>
...

Just add below code to catalog_product_view.xml file for the simple and configurable product:

For Simple Product

<referenceBlock name="product.info.addtocart">
     <block class="Magento\Wishlist\Block\Catalog\Product\View\AddTo\Wishlist" name="view.addto.wishlist" template="Magento_Catalog::product/view/addto/wishlist.phtml" />
 </referenceBlock>

For Configurable Product

 <referenceBlock name="product.info.addtocart.additional">
     <block class="Magento\Wishlist\Block\Catalog\Product\View\AddTo\Wishlist" name="view.addto.wishlist.bottom" template="Magento_Catalog::product/view/addto/wishlist.phtml" />
 </referenceBlock>

It will look like:

Wishlist in simple product

enter image description here

Wishlist in Configurable Products

enter image description here


Leave a comment if have any query