News Flash:
New Version of ShopClass theme 1.4.0 is Released on 13 JUNE 2018, Please upgrade your installation.

WhatsApp Share Plugin Topic is solved

If you are having general problems with ShopClass theme, post your questions here. This is not the place for customization or feature requests
Post Reply
User avatar
expatn
Beginner
Posts: 10
Joined: Fri Oct 14, 2016 6:17 pm
Contact:

WhatsApp Share Plugin

Post by expatn » Sun Oct 16, 2016 9:42 am

Hi,

I have installed whatsup share app plugin since Whats app is being used by many of my users, The issue is that the app button is not appearing well in Shopclass theme style. I know this is not a theme issue but was just asking if integration was possible that would make the button more pleasing ascetically to the themes overall design..
You do not have the required permissions to view the files attached to this post.

User avatar
tuffadmin
Site Admin
Posts: 1236
Joined: Tue Jan 29, 2013 7:31 pm
Has thanked: 33 times
Been thanked: 111 times

Re: WhatsApp Share Plugin  Topic is solved

Post by tuffadmin » Sun Oct 16, 2016 8:03 pm

Yes it is possible but I need to look at the code of that plugin, to give you a proper suggestion,.
No support for unnecessary PM, use forum for support queries.
Please give us good review if you bought our theme from Osclass Market

User avatar
tuffadmin
Site Admin
Posts: 1236
Joined: Tue Jan 29, 2013 7:31 pm
Has thanked: 33 times
Been thanked: 111 times

Re: WhatsApp Share Plugin

Post by tuffadmin » Fri Oct 21, 2016 5:47 pm

I thought about modifying plugin files for this but it may break future compatibility, that's why I am integrating support for this plugin in future release.
For now just follow these steps.
Add this into item.php file after other social links code( near line no. 71)

Code: Select all

<?php if (function_exists('whatsapp_share_content')) { 
    $item=osc_item();
    if($item!=null)
    {
    $cat_id = $item['fk_i_category_id'];
    $share_cats = explode(",",osc_get_preference('whatsapp_share_categories', 'whatsapp_share'));
    if(osc_item_title() && in_array($cat_id,$share_cats))
    {
    $pre_text = osc_get_preference('share_pre_text', 'whatsapp_share');
    $share_desc_char_limit = osc_get_preference('share_desc_char_limit', 'whatsapp_share');
    if($share_desc_char_limit)
    $desc=osc_highlight( osc_item_description() ,$share_desc_char_limit); ?>
<li><a href="whatsapp://send?text=<?php echo urlencode($pre_text).' '.urlencode(osc_item_title()).' '.get_short_link(get_whatsapp_share_link(osc_item_url(),'normal')).' '.$desc; ?>" class="social-share">
    <i data-toggle="tooltip" data-placement="top" data-original-title="<?php _e("Share on WhatsApp", 'shopclass'); ?>" class="fa fa-whatsapp fa-3x"></i>
    </a>
</li>
<?php
    }
    }
    }?>


And than add this css code in your css file (file with .min.css extension)

Code: Select all

.fa-whatsapp {
	color: #25d366;
	margin-left: .1em;
	margin-right: .1em;cursor: pointer;
}
No support for unnecessary PM, use forum for support queries.
Please give us good review if you bought our theme from Osclass Market

User avatar
expatn
Beginner
Posts: 10
Joined: Fri Oct 14, 2016 6:17 pm
Contact:

Re: WhatsApp Share Plugin

Post by expatn » Sun Oct 23, 2016 7:02 pm

Hi,

Thank you so Much Looks preface better than what I expected. Thank you again for the great support.

User avatar
expatn
Beginner
Posts: 10
Joined: Fri Oct 14, 2016 6:17 pm
Contact:

Re: WhatsApp Share Plugin

Post by expatn » Mon Oct 31, 2016 3:39 pm

HI,

There is one more small issue, The button should only appear on devices with small screens. Currently it does appear desktop devices and laptop devices that normally do not hove whats app installed.

User avatar
tuffadmin
Site Admin
Posts: 1236
Joined: Tue Jan 29, 2013 7:31 pm
Has thanked: 33 times
Been thanked: 111 times

Re: WhatsApp Share Plugin

Post by tuffadmin » Thu Nov 03, 2016 5:16 am

I will update this thread soon with working code.
No support for unnecessary PM, use forum for support queries.
Please give us good review if you bought our theme from Osclass Market

Post Reply