Post by SamNabz » Tue Nov 20, 2018 9:22 am

Hey all,

Looking for a way to include a specific affiliate in all orders so that they always get a commission, regardless of whether the customer used their referral link or not (which won't be used anywhere anyway).

What would be the best way to achieve this? Any help is appreciated.

Thanks in advance :)
Last edited by SamNabz on Wed Nov 21, 2018 11:23 am, edited 1 time in total.

Cheers, Sam


Active Member

Posts

Joined
Wed Jul 06, 2011 7:32 am
Location - Sydney, Australia

Post by IP_CAM » Wed Nov 21, 2018 9:36 am

they always get a commission, regardless of whether the customer used their referral link or not
Well, how in the World should it be possible for OC, to know, which one of the Affiliates
gets the commission, if there is no way, to identify the affiliate, related to this... :crazy:

Better think twice! ;)
Ernie

For Sale: Top URL's, including an OpenCart V-Pro Shop!
A wide range of matching Designs can be seen here: http://www.opencart.li
For Information on URL's offered, please contact me at: jti@jacob.ch
Hundreds of Mods in 380+ Repositories for OC v.1.5.x - v.2.3.x
to be found on my Github Site: https://github.com/IP-CAM
Image


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by SamNabz » Wed Nov 21, 2018 10:17 am

Hey IP_CAM, thanks for the response.

There will only be 1x affiliate account in the system. So is there no way for me to include the affiliate's tracking ID on all orders during the checkout process?

Cheers, Sam


Active Member

Posts

Joined
Wed Jul 06, 2011 7:32 am
Location - Sydney, Australia

Post by ocmta » Wed Nov 21, 2018 10:28 am

I really doubt that it should be built into openCart and i guess this is a wrong forum for a question like that, you probably should post it in a proper support forum.
On a practical level, if you just need that in your store, you could hardcode affiliate's tracking code somewhere, but implementation depends on your openCart version.

Extensions for affiliates (openCart 1, 2, 3):
Advanced Multi Level Affiliate System
Customer and Affiliate Accounts Combined into one Account
Affiliate Tracking with Coupons
Discount for Referred Customers - Order Total
Type Tracking Code
Mass Pay
Affiliate Transactions for openCart 3
Affiliate Pack X - all modules with 40% discount


Active Member

Posts

Joined
Mon Mar 12, 2012 11:21 am


Post by SamNabz » Wed Nov 21, 2018 10:53 am

Hey ocmta,

Sorry, I must have posted this into the wrong section of the forum. I don't want this to be built into OC, it's more so a customization I'm looking to implement for a particular site I'm working on. Admins, please move this to the right forum (if applicable).

Hardcoding this customization is fine. I'm using OC version is 3.0.2.0 - any ideas?

Cheers, Sam


Active Member

Posts

Joined
Wed Jul 06, 2011 7:32 am
Location - Sydney, Australia

Post by ocmta » Wed Nov 21, 2018 11:07 am

Edit file catalog/controller/startup/startup.php, find:

Code: Select all

public function index() {
and put these 2 lines below:

Code: Select all

if (isset($this->request->get['tracking'])) unset($this->request->get['tracking']);
if (!isset($this->request->cookie['tracking'])) setcookie('tracking', 'your_affiliate_tracking_code', time() + 3600 * 24 * 1000, '/');
(replace your_affiliate_tracking_code with actual tracking code of the affiliate)

Extensions for affiliates (openCart 1, 2, 3):
Advanced Multi Level Affiliate System
Customer and Affiliate Accounts Combined into one Account
Affiliate Tracking with Coupons
Discount for Referred Customers - Order Total
Type Tracking Code
Mass Pay
Affiliate Transactions for openCart 3
Affiliate Pack X - all modules with 40% discount


Active Member

Posts

Joined
Mon Mar 12, 2012 11:21 am


Post by SamNabz » Wed Nov 21, 2018 11:22 am

Hey ocmta,

Perfect, that worked!! Thanks for your help, much appreciated ;D

Cheers, Sam


Active Member

Posts

Joined
Wed Jul 06, 2011 7:32 am
Location - Sydney, Australia
Who is online

Users browsing this forum: No registered users and 3 guests