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.
{{ header }}.
$this->load->language('checkout/success');
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 is0. 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.