[Skip to main content](#vessel-content)

#   Request and sample: Referral discount link feature

##

- **[Savickis](/forum/user/26490-savickis "View Savickis's Profile")**
- [![Savickis's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar26490.jpg)](/forum/user/26490-savickis "View Savickis's Profile") Topic Author
- [ Offline](/forum/user/26490-savickis)

Less More

- Posts: 41
- Thank you received: 9
-
-

13 years 2 weeks ago -  13 years 2 weeks ago [\#131405](#131405) by [Savickis](/forum/user/26490-savickis "View Savickis's Profile")  *[Request and sample: Referral discount link feature](/forum/33-customers/863451-request-and-sample-referral-discount-link-feature#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 in link that points to Your shop, it makes temporary cookie to store this referral, and than upon placing order it automatically enters &quot;name&quot; as coupon.  For example:  &#42; You create banner with link &quot;  yourshop.com &quot;  &#42; You create HikaShop coupon &quot;partnersite.com&quot; with, lets say, 10% discount  &#42; 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. :)")* was created by *[Savickis](/forum/user/26490-savickis "View Savickis's Profile")*

-- 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](http://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 Code:

?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](http://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. ![:)](/media/kunena/emoticons/3.png ":)")

Last edit: 13 years 2 weeks ago by [Savickis](/forum/user/26490-savickis "View Savickis's Profile").

The following user(s) said Thank You: [nicolas](/forum/user/63-nicolas "View nicolas's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMzLWN1c3RvbWVycy84NjM0NTEtcmVxdWVzdC1hbmQtc2FtcGxlLXJlZmVycmFsLWRpc2NvdW50LWxpbmstZmVhdHVyZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86586
- Thank you received: 14325
-
-

13 years 2 weeks ago [\#131468](#131468) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Request and sample: Referral discount link feature](/forum/33-customers/863451-request-and-sample-referral-discount-link-feature#131468 "-- 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 in link that points to Your shop, it makes temporary cookie to store this referral, and than upon placing order it automatically enters &quot;name&quot; as coupon.  For example:  &#42; You create banner with link &quot;  yourshop.com &quot;  &#42; You create HikaShop coupon &quot;partnersite.com&quot; with, lets say, 10% discount  &#42; 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. :)")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMzLWN1c3RvbWVycy84NjM0NTEtcmVxdWVzdC1hbmQtc2FtcGxlLXJlZmVycmFsLWRpc2NvdW50LWxpbmstZmVhdHVyZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.056 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
