OpenCart

OpenCart is an open-source e-commerce platform. It is designed for small to large-sized online merchants. Scaleo provides the ability to create the affiliate network for your OpenCart store and gives your affiliates all the tools to promote the products effectively.

This instructions works for OpenCart 3.0.

Setting Up The Tracking

1
Create an Offer the regular way in Scaleo.
2
Select that Offer, go to Goals. Select Edit a Goal and scroll to Tracking Methods section.
3
Select: Tracking Method > IMG Pixel. Copy that code.
4

OpenCart doesn't give the ability to enter tracking pixel via interface settings, so we need to edit the code manually.

Please edit the following file:

catalog/controller/checkout/success.php	

Find the line:

$this->load->language('checkout/success');	

and insert the following code right after this line:

if (isset($this->session->data['order_id'])) {
        $this->load->model('checkout/order');
        $order_id = $this->session->data['order_id'];

        $order_data = $this->model_checkout_order->getOrder($order_id);
        $sub_total = '0';
        foreach ($this->model_checkout_order->getOrderTotals($order_id) as $total) {
            if ($total['code'] = 'sub_total') {
                $sub_total = $total['value'];
            }
        }

        $data['order_info'] = array(
            "id" => $order_data['order_id'],
            "total" => $sub_total,
            "currency" => $order_data['currency_code']
        );

    }	
5

Then go to your OpenCart Administrator Panel and find the following file: Design > Theme Editor > Common > success.twig . Add the Tracking Pixel code after {{ header }} section:

<img src="https://yourcompany.scaletrk.com/track/img?goal_id=XXX&amount={{ order_info.total }}&adv_order_id={{ order_info.id }}" height="1" width="1" />	

Note: Please make sure you added the additional parameters {{ order_info.total }} and {{ order_info.id }} to pass Order Amount and Order ID to your Scaleo platform.

Everything is set now. Affiliate can use Offer Tracking Link to drive the traffic to your OpenCart store. Once the order will be placed, we will get the conversion into Scaleo platform and Affiliate will be credited.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us