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

#   Affiliate Cookie

##

- **[bars92](/forum/user/3048-bars92 "View bars92's Profile")**
- [![bars92's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/3048-bars92 "View bars92's Profile") Topic Author
- [ Offline](/forum/user/3048-bars92)

Less More

- Posts: 108
- Thank you received: 2
-
-

15 years 4 months ago [\#19978](#19978) by [bars92](/forum/user/3048-bars92 "View bars92's Profile")  *[Affiliate Cookie](/forum/2-general-talk-about-hikashop/19978-affiliate-cookie#19978 "Hello everyone. I wish to make the affiliate program a bit more complex. i would like the affiliate cookie to be set not in my current HikaShop website, I want the cookie to be set when an affiliate redirect someone to a page redirecting to the to the shop.  Means guest comes to an affiliate web site &gt;&gt; linked to a bridge website (an HikaShop cookie is set) &gt;&gt; linked to hikashop store.  I have searched a while for the cookie creation in the HikaShop and couldnt find it, i can set the cookie far back at a different web site or set a cookie and then search for that cookie in the HikaShop.  First option sounds better, so my question is wher can i find the name of the cookie and the definition?  Thanks in advance!")* was created by *[bars92](/forum/user/3048-bars92 "View bars92's Profile")*

Hello everyone.
I wish to make the affiliate program a bit more complex.
i would like the affiliate cookie to be set not in my current HikaShop website, I want the cookie to be set when an affiliate redirect someone to a page redirecting to the to the shop.

Means guest comes to an affiliate web site &gt;&gt; linked to a bridge website (an HikaShop cookie is set) &gt;&gt; linked to hikashop store.

I have searched a while for the cookie creation in the HikaShop and couldnt find it, i can set the cookie far back at a different web site or set a cookie and then search for that cookie in the HikaShop.

First option sounds better, so my question is wher can i find the name of the cookie and the definition?

Thanks in advance!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzE5OTc4LWFmZmlsaWF0ZS1jb29raWU/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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: 86322
- Thank you received: 14281
-
-

15 years 4 months ago [\#19996](#19996) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Affiliate Cookie](/forum/2-general-talk-about-hikashop/19978-affiliate-cookie#19996 "Hello everyone. I wish to make the affiliate program a bit more complex. i would like the affiliate cookie to be set not in my current HikaShop website, I want the cookie to be set when an affiliate redirect someone to a page redirecting to the to the shop.  Means guest comes to an affiliate web site &gt;&gt; linked to a bridge website (an HikaShop cookie is set) &gt;&gt; linked to hikashop store.  I have searched a while for the cookie creation in the HikaShop and couldnt find it, i can set the cookie far back at a different web site or set a cookie and then search for that cookie in the HikaShop.  First option sounds better, so my question is wher can i find the name of the cookie and the definition?  Thanks in advance!")*

Hi,

You cannot set a cookie for another website than yours. That's restricted by the browsers to avoid any session hijacking or other hacks. So I'm afraid you won't be able to do that with php in the code of the bridge website.
The code generating the cookie is in the file plugins/system/hikashopaffiliate.php

What I would do if I were you would be to have an iframe of 1px*1px displaying a page on the hikashop store website on the bridge website with the partner_id included. That would enable the system to set the cookie for the store while the user would be displaying the bridge website.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzE5OTc4LWFmZmlsaWF0ZS1jb29raWU/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[bars92](/forum/user/3048-bars92 "View bars92's Profile")**
- [![bars92's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/3048-bars92 "View bars92's Profile") Topic Author
- [ Offline](/forum/user/3048-bars92)

Less More

- Posts: 108
- Thank you received: 2
-
-

15 years 4 months ago [\#19999](#19999) by [bars92](/forum/user/3048-bars92 "View bars92's Profile")  Replied by *[bars92](/forum/user/3048-bars92 "View bars92's Profile")* on topic *[Re: Affiliate Cookie](/forum/2-general-talk-about-hikashop/19978-affiliate-cookie#19999 "Hello everyone. I wish to make the affiliate program a bit more complex. i would like the affiliate cookie to be set not in my current HikaShop website, I want the cookie to be set when an affiliate redirect someone to a page redirecting to the to the shop.  Means guest comes to an affiliate web site &gt;&gt; linked to a bridge website (an HikaShop cookie is set) &gt;&gt; linked to hikashop store.  I have searched a while for the cookie creation in the HikaShop and couldnt find it, i can set the cookie far back at a different web site or set a cookie and then search for that cookie in the HikaShop.  First option sounds better, so my question is wher can i find the name of the cookie and the definition?  Thanks in advance!")*

Ok i understand the restriction.
And thank you for the code i needed the decoder.
Your idea is great, I have just installed it on the bride website but as far as i know i need to iframe with the partner_id which is at the bridge site the iframe is in. so im asking do i have to use JS or something to implant the partner_id to the iframe or can it work differently?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzE5OTc4LWFmZmlsaWF0ZS1jb29raWU/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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: 86322
- Thank you received: 14281
-
-

15 years 4 months ago [\#20001](#20001) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Affiliate Cookie](/forum/2-general-talk-about-hikashop/19978-affiliate-cookie#20001 "Hello everyone. I wish to make the affiliate program a bit more complex. i would like the affiliate cookie to be set not in my current HikaShop website, I want the cookie to be set when an affiliate redirect someone to a page redirecting to the to the shop.  Means guest comes to an affiliate web site &gt;&gt; linked to a bridge website (an HikaShop cookie is set) &gt;&gt; linked to hikashop store.  I have searched a while for the cookie creation in the HikaShop and couldnt find it, i can set the cookie far back at a different web site or set a cookie and then search for that cookie in the HikaShop.  First option sounds better, so my question is wher can i find the name of the cookie and the definition?  Thanks in advance!")*

For example, you could use a custom code module [ extensions.joomla.org/extensions/edition...code-in-modules/3668](http://extensions.joomla.org/extensions/edition/custom-code-in-modules/3668)

And then, suppose that you give URLs like [ mybridge.com/index.php?partner\_id=56](http://mybridge.com/index.php?partner_id=56) to your affiliates, you could put something like that:

echo '&lt;iframe src="[ mystore.com/index.php?partner\_id='.$\_GET](http://mystore.com/index.php?partner_id='.$_GET).'" height="1px" width="1px"&gt;&lt;/iframe&gt;';

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzE5OTc4LWFmZmlsaWF0ZS1jb29raWU/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[bars92](/forum/user/3048-bars92 "View bars92's Profile")**
- [![bars92's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/3048-bars92 "View bars92's Profile") Topic Author
- [ Offline](/forum/user/3048-bars92)

Less More

- Posts: 108
- Thank you received: 2
-
-

15 years 4 months ago [\#20004](#20004) by [bars92](/forum/user/3048-bars92 "View bars92's Profile")  Replied by *[bars92](/forum/user/3048-bars92 "View bars92's Profile")* on topic *[Re: Affiliate Cookie](/forum/2-general-talk-about-hikashop/19978-affiliate-cookie#20004 "Hello everyone. I wish to make the affiliate program a bit more complex. i would like the affiliate cookie to be set not in my current HikaShop website, I want the cookie to be set when an affiliate redirect someone to a page redirecting to the to the shop.  Means guest comes to an affiliate web site &gt;&gt; linked to a bridge website (an HikaShop cookie is set) &gt;&gt; linked to hikashop store.  I have searched a while for the cookie creation in the HikaShop and couldnt find it, i can set the cookie far back at a different web site or set a cookie and then search for that cookie in the HikaShop.  First option sounds better, so my question is wher can i find the name of the cookie and the definition?  Thanks in advance!")*

Perfect!
Work exactly as i need it.
Thank you again ![:)](/media/kunena/emoticons/3.png ":)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzE5OTc4LWFmZmlsaWF0ZS1jb29raWU/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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.065 seconds

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