Add Custom Wishlist in PHTML Magento2



  Add Custom Wishlist anywhere in Phtml from here


<a href="<?php echo $block->getUrl('wishlist', ['_secure' => true]);?>" img src="<?php echo $block->getViewFileUrl('images/wish_icon.jpg'); ?>" data-post='<?php  echo $this->helper('Magento\Wishlist\Helper\Data')->getAddParams($_product) ?>' class="action towishlist" data-action="add-to-wishlist"><span>' . __('Add to Wish List') . '</span></a>
                            

Comments

Popular posts from this blog

Get Swatch Text Product id of Configurable Product in Detail Page through Jquery Magento2

Get Customer Address with customer ID programmatically Magento2

programmaticlly Create Order in Magento2 with custom options in order