How can I go about moving the Add to Wish List Button next to the add to cart button? I can get the wishlist button to dissapear which I definitely don't want, but I can not get it to move next to add to cart. Is this something that I can do via XML in catalog_product_view.xml? I am using a custom theme that is extended from the Blank default theme. I have added an image above to show exactly what I am trying to do.
1 Answer
You can set move block of wishlist into product info option wrapper as below. create catalog_product_view.xml in your app/code/vendor/module/view/frontend/layout
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<move element="view.addto.wishlist" destination="product.info.options.wrapper.bottom" after="product.info.addtocart"/>
</body>
</page>
Then you can write css which set wishlist next to add to cart button.
Hope it helps!
-
This unfortunately just made the wish list button disappear. I am not seeing it anywhere in the code. Aug 25, 2020 at 17:55
-
-
I have edit my post and you can see in inspector window and you can see wishlist is set next to add to cart only css required to set. Well in your theme you need to find put the container name in destination value which belongs to add to cart phtml file Aug 25, 2020 at 18:05