Hi Team,
I want to add whatsapp sharing link on product detail page. I have installed extension but its not supported whatsapp sharing link functionality.
I have found one dynamic code of whatsapp sharing link but its not working.
<?php $urlInterface = \Magento\Framework\App\ObjectManager::getInstance()->get('Magento\Framework\UrlInterface');
$_currentUrl = $urlInterface->getCurrentUrl();
?>
<a href="whatsapp://send?text=<?php echo $_currentUrl?>" data-action="share/whatsapp/share"><img src='WHATSAPP_ICON_IMG_SRC_HERE' /></a>
Can you please help me on this point.?
-
Thank you
Hi @dipmegpro,
Thanks for responding.
I have added Mageplaza Extensions for social sharing links.
-
Thanks
Hello @purvishvrif740
have you added the API configuration for WhatsApp?
If my answer is helpful full then please set the accept solution flag and kudos flag so other members can take the same reference.
Hi @dipmegpro
Thanks for responding.
I have found the solution for custom WhatsApp sharing link on product detail page.
There are two codes one is consider for desktop and another one is consider for mobile version.
<a href="https://web.whatsapp.com/send?text=<?php echo $_currentUrl ?>">Whatsapp</a> [ Desktop ] <a href="whatsapp://send?text=<?php echo $_currentUrl?>" data-action="share/whatsapp/share">whatsapp</a> [ Mobile ]
Now these both links are working fine.
-
Thanks
AloWhatsapp is a modified version of WhatsApp for Android that allows you to customize the user interface and add new features. One of the most popular customizations people make with WhatsApp is to use themes, but every time we release an update we put these themes at risk