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

Through Postman Api send data through JSON and create simple product in Magento2

Getting product Image in PHTML in Magento2

programmaticlly Create Order in Magento2 with custom options in order