Post by mteverest » Fri Nov 27, 2015 1:06 am

Hi,

I'm trying to integrate affiliate tracking which needs to be placed on success.tpl but variables are already cleared before success page is displayed so that tracking code not getting values for the variable.

It needs value for following variable for affiliate tracking.

CRID=<?php echo $orderDetails['customer_id']; ?>
ORDERID=<?php echo $orderDetails['order_id']; ?>
ORDERAMNT=<?php echo $orderDetails['total']; ?>
CUR=<?php echo $orderDetails['currency']; ?>

I'll really appreciate if i get some hints how to get values for variable in success.tpl.

Thanks.

User avatar
Newbie

Posts

Joined
Sat May 17, 2008 8:46 am
Location - Dhulikhel, Nepal

Post by ocmta » Fri Nov 27, 2015 1:18 am

In catalog/controller/checkout/success.php , right below this line:

Code: Select all

if (isset($this->session->data['order_id'])) {
add this:

Code: Select all

$this->load->model('checkout/order');
$data['orderDetails] = $this->model_checkout_order->getOrder($this->session->data['order_id']);

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 mteverest » Fri Nov 27, 2015 10:02 am

Thank you so much 'ocmta'. It worked perfectly.
Thanks a lot for your help.

User avatar
Newbie

Posts

Joined
Sat May 17, 2008 8:46 am
Location - Dhulikhel, Nepal

Post by taran_117 » Mon Oct 10, 2016 6:08 pm

Hi

Its not working for ver 2.3. Any help for the same version?

New member

Posts

Joined
Sun Apr 29, 2012 9:26 pm

Post by ocmta » Mon Oct 10, 2016 7:02 pm

taran_117 wrote:Its not working for ver 2.3.
It should work fine in 2.3 as well without any changes.

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 joss » Wed Apr 12, 2017 7:33 pm

taran_117 wrote:
Mon Oct 10, 2016 6:08 pm
Hi
Its not working for ver 2.3. Any help for the same version?
It's working fine.. It's just missing a ' in

Code: Select all

$data['orderDetails]
Thanks ocmta!

Newbie

Posts

Joined
Fri Nov 04, 2016 1:10 am
Who is online

Users browsing this forum: No registered users and 22 guests