Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

How to add whatsapp share button ?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 09-21-2017, 05:13 AM
 
anandat anandat is offline
 

X-Adept
  
Join Date: Jan 2004
Posts: 914
 

Default 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/
__________________
X-Cart: 4.7.7 LIVE
Skin:Ultra by xcartmods.co.uk
X-cart Modules: | ACR, Rich Google Search, Customer Testimonials | Cloud Search, | Websitecm: CDSEO (2.1.9)
---------------
Server: Linux
php: 5.3
mysql: 5.0.89
----------------
Reply With Quote
  #2  
Old 10-08-2017, 10:51 PM
 
anandat anandat is offline
 

X-Adept
  
Join Date: Jan 2004
Posts: 914
 

Default Re: How to add whatsapp share button ?

**BUMP**
No one is using whatsapp share button ??!!
__________________
X-Cart: 4.7.7 LIVE
Skin:Ultra by xcartmods.co.uk
X-cart Modules: | ACR, Rich Google Search, Customer Testimonials | Cloud Search, | Websitecm: CDSEO (2.1.9)
---------------
Server: Linux
php: 5.3
mysql: 5.0.89
----------------
Reply With Quote
  #3  
Old 10-15-2017, 11:05 PM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default 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.
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
  #4  
Old 12-01-2017, 10:36 PM
 
anandat anandat is offline
 

X-Adept
  
Join Date: Jan 2004
Posts: 914
 

Default 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 ?
__________________
X-Cart: 4.7.7 LIVE
Skin:Ultra by xcartmods.co.uk
X-cart Modules: | ACR, Rich Google Search, Customer Testimonials | Cloud Search, | Websitecm: CDSEO (2.1.9)
---------------
Server: Linux
php: 5.3
mysql: 5.0.89
----------------
Reply With Quote
  #5  
Old 12-02-2017, 05:52 AM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default 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>
__________________
xcartmods.co.uk
Reply With Quote
  #6  
Old 12-03-2017, 10:23 PM
 
anandat anandat is offline
 

X-Adept
  
Join Date: Jan 2004
Posts: 914
 

Default 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
__________________
X-Cart: 4.7.7 LIVE
Skin:Ultra by xcartmods.co.uk
X-cart Modules: | ACR, Rich Google Search, Customer Testimonials | Cloud Search, | Websitecm: CDSEO (2.1.9)
---------------
Server: Linux
php: 5.3
mysql: 5.0.89
----------------
Reply With Quote
  #7  
Old 12-04-2017, 02:24 PM
 
elmirage001 elmirage001 is offline
 

X-Wizard
  
Join Date: Apr 2007
Posts: 1,964
 

Default 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>
__________________
X-Cart GoldPlus v4.7.12 | reBOOT (reDUX) Template v4.7.12.9 | Always The Best
Reply With Quote
  #8  
Old 12-04-2017, 10:21 PM
 
anandat anandat is offline
 

X-Adept
  
Join Date: Jan 2004
Posts: 914
 

Default 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>
__________________
X-Cart: 4.7.7 LIVE
Skin:Ultra by xcartmods.co.uk
X-cart Modules: | ACR, Rich Google Search, Customer Testimonials | Cloud Search, | Websitecm: CDSEO (2.1.9)
---------------
Server: Linux
php: 5.3
mysql: 5.0.89
----------------
Reply With Quote

The following user thanks anandat for this useful post:
qualiteam (12-13-2017)
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:31 AM.

   

 
X-Cart forums © 2001-2020