Request and sample: Referral discount link feature

  • Posts: 41
  • Thank you received: 9
11 years 2 weeks ago #131405

-- HikaShop version -- : 2.2.2 Business
-- Joomla version -- : 2.5.14
-- PHP version -- : 5.24

Hello!

I'd like to give partners of my store option to place referral link (banner) in their websites, that would contain partner name as parameter - so when client clicks banner in our partner's site, he would get 10% discount upon placing order in our shop. So link in banner would be something like:

domain.com/shop/register ?refferal=banner01

Newly registred client would receive discount for his next order.

As there is no feature now, I made small JavaScript, that parses referral link searching for referral keyword and it's value. If referral is found, it's value is stored in temporary cookie. And when customer gets to step in Hikashop order procedure, when there is discount field, this script finds coupon field, fills it with coressponding referral, and updates discount.

If somebody is interested in this temporary solution I wrote, please download attached JavaScript fragment (jQuery 1.9 or newer required) and add to the end of Your existing template javascript. What this script does is - it search for parameter

?referral=name
in link that points to Your shop, it makes temporary cookie to store this referral, and than upon placing order it automatically enters "name" as coupon.

For example:
  1. You create banner with link " yourshop.com ?referral=partnersite.com"
  2. You create HikaShop coupon "partnersite.com" with, lets say, 10% discount
  3. When customer clicks on banner above he gets to Your site, places order, and automatically have one-time 10% discount

I hope that this funcionality will be included in HikaShop future versions, but until than - I hope that maybe someone else will find this code useful. :)

Attachments:
Last edit: 11 years 2 weeks ago by Savickis.
The following user(s) said Thank You: nicolas

Please Log in or Create an account to join the conversation.

  • Posts: 82864
  • Thank you received: 13372
  • MODERATOR
11 years 2 weeks ago #131468

I think that it's great to have it as a side plugin an not included by default. We're currently working at having something like an app store on our website so that any developer can add its plugins for HikaShop. It will be great to have it listed there once done so that users can easily find it.

Please Log in or Create an account to join the conversation.

Time to create page: 0.055 seconds
Powered by Kunena Forum