X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   How to add whatsapp share button ? (https://forum.x-cart.com/showthread.php?t=75682)

anandat 09-21-2017 05:13 AM

How to add whatsapp share button ?
 
Any one has added whatsApp share button besides FB share button ?

Please let me know how to achieve that.
Sharethis button have that facility but I don't want to use third party code.

https://www.sharethis.com/best-practices/2017/05/3-reasons-to-have-whatsapp-share-button/

anandat 10-08-2017 10:51 PM

Re: How to add whatsapp share button ?
 
**BUMP**
No one is using whatsapp share button ??!!

qualiteam 10-15-2017 11:05 PM

Re: How to add whatsapp share button ?
 
I guess only a few use it because WhatsApp has to be installed on the computer for the button to work.

Here is their documentation:
https://faq.whatsapp.com/en/android/28000012

It has a sample "Share" link that doesn't work on my computer because I have no WhatsApp installed there.

anandat 12-01-2017 10:36 PM

Re: How to add whatsapp share button ?
 
Hi Alex,
I have added following code for whatsapp share button
Quote:

<a href="whatsapp://send?text={$href}" data-action="share/whatsapp/share">Share via Whatsapp</a>
But it's generating php url....what should I do so that it should generate CDSEO url or canonical url ?

PhilJ 12-02-2017 05:52 AM

Re: How to add whatsapp share button ?
 
Have you tried...
Code:

<a href="whatsapp://send?text={$current_location}/{$canonical_url}" data-action="share/whatsapp/share">Share via Whatsapp</a>

anandat 12-03-2017 10:23 PM

Re: How to add whatsapp share button ?
 
Quote:

Originally Posted by PhilJ
Have you tried...
Code:

<a href="whatsapp://send?text={$current_location}/{$canonical_url}" data-action="share/whatsapp/share">Share via Whatsapp</a>

Thanks Phil for the reply.
But it's still generating PHP url :(

elmirage001 12-04-2017 02:24 PM

Re: How to add whatsapp share button ?
 
Maybe...
Code:

<a href="whatsapp://send?text={$http_location}{$smarty.server.REQUEST_URI}" data-action="share/whatsapp/share">Share via Whatsapp</a>

anandat 12-04-2017 10:21 PM

Re: How to add whatsapp share button ?
 
Quote:

Originally Posted by elmirage001
Maybe...
Code:

<a href="whatsapp://send?text={$http_location}{$smarty.server.REQUEST_URI}" data-action="share/whatsapp/share">Share via Whatsapp</a>

Thanks for the reply.
This code is creating html url but it's generating directory name 2 times.
But good thing is that following code is working perfectly

Quote:

<a href="whatsapp://send?text=https://www.yoursite.com{$php_url.url}" data-action="share/whatsapp/share">Share via Whatsapp</a>


All times are GMT -8. The time now is 07:19 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.