Skip to main content
November 9, 2026
Integrating Tapfiliate with OpenCart lets you track conversions and commissions based on order amounts for your online store.

To get started:
1. Log in to your OpenCart admin panel, navigate to Design > Theme Editor > Common > header.twig. Just before the closing </head> tag, insert the provided code snippet below and click the “Save” button.
Be sure to replace ‘YOUR ACCOUNT ID’ with your actual account ID. 2. Next, proceed to Design > Theme Editor > Common > success.twig. Place the following code after {{ header }}.
Make sure to replace ‘YOUR ACCOUNT ID’ with your actual account id. 3. Lastly, on your server, locate catalog/controller/checkout/success.php. Insert the provided code snippet right after $this->load->language('checkout/success');
4. Save your changes, and you’re all set! Please remember to conduct a conversion test before launching your program. This step will help you confirm that tracking has been correctly established. You can create a test conversion by following the steps described here.

Amount, currency and unpaid orders

Amount: the code sends the order’s Sub-Total line from OpenCart. That is the price of the products, special and quantity-discount prices included, plus any gift certificates bought in the order. It doesn’t include shipping or taxes, and it is taken before coupons, reward points, store credit and gift certificates the customer redeems. A percentage commission is calculated from this amount. If the Sub-Total order total is disabled in your store (Extensions > Extensions, type Order Totals), the amount sent is 0. If you need commissions calculated on a different amount, please contact us. Currency: OpenCart calculates the Sub-Total in the currency your product prices are entered in, even when the customer pays in another currency of your store. The code doesn’t send a currency, so Tapfiliate records the conversion and its commission in your program’s currency with the same number and without any exchange: an order of 100 EUR in a USD program is recorded as 100 USD. So the code records the right amounts only if your program’s currency is the currency of your OpenCart product prices. If it isn’t, please contact us before you add the code. Unpaid orders: OpenCart creates the order before the customer pays, and the code runs when the customer reaches the order success page. So a conversion is also recorded for an order that isn’t paid yet, for example one placed with bank transfer or cash on delivery, or one whose payment wasn’t completed when the customer still reached that page. Tapfiliate doesn’t learn when the order is paid later: the conversion and its commission stay as they were recorded. An order that is still waiting for its payment may be paid later, so disapprove its commission only when the order is canceled or won’t be paid (the conversion’s external ID is your OpenCart order ID; if your account also gets conversions from another OpenCart installation or store, first see More than one OpenCart installation in one account). A commission you disapproved by mistake can be approved again. If Automatically approve commissions is on, these commissions are approved as soon as they are recorded, whether the order is paid or not. If your store takes payments after the order is placed, please contact us before you use automatic approval with this code. See How to Approve, Disapprove or Modify Conversions.

More than one OpenCart installation in one account

The code sends your OpenCart order ID as the conversion’s external ID, and Tapfiliate records each external ID only once in your account, in all your programs together (see How are duplicate conversions prevented?). Each OpenCart installation numbers its orders on its own, so two installations can give the same order ID to different orders. If both send conversions to the same Tapfiliate account, a conversion is rejected as a duplicate when a conversion with the same order ID is already recorded in your account, and the affiliate gets no commission for it. The same applies to a test copy of your store and to another online store that sends its own order numbers to the same account. If you want to track more than one OpenCart installation in one Tapfiliate account, or OpenCart together with another store, please contact us before you add the code to the second one. If the code already runs in more than one OpenCart installation or in a test copy of your store, or another store sends its own order numbers to the same Tapfiliate account, a conversion you find by an OpenCart order ID may belong to an order of the other store. Please contact us before you disapprove or change commissions by OpenCart order ID. Stores you add within one OpenCart installation (System > Settings) share one order numbering, so their order IDs don’t repeat.

Which version of OpenCart does your integration support?

This integration only supports Opencart 3. Prior versions are not supported.