Skip to end of metadata
Go to start of metadata

Use this guide in case you store up-to-date orders data in OpenCart.

WARNING

Back up all files that you're going to modify.

Configuring integration in OpenCart

Server-side modification

1. Download the archive and then copy the files to the corresponding folders on the server where OpenCart is installed.


2. Open the catalog/model/checkout/order.php file and find the following code snippet at the beginning of the file:

Insert the following code snippet immediately after the code line mentioned above:

 

3. Scroll down and find the following line:

Replace it with the following code snippet:


4. Open the admin/view/template/sale/order_form.tpl file and find the code snippet as follows:

Add the following code block immediately after this <tr></tr> tag:


5. Open the admin/view/template/sale/order_info.tpl file and find:

Insert the following code snippet after this <tr></tr> tag and before < /table>:


6. Open the admin/model/sale/order.php file and find:

Replace this line with the following one:


7. Open the admin/controller/sale/order.php file and find:

Immediately after these lines, add the following code block:


8. Find the following lines in the same admin/controller/sale/order.php file:

Immediately after these lines, add the following code block:

Complete the setup via the admin panel

9. Open the OpenCart admin panel. Navigate to Extensions  Modules. Find the Roistat data export module in the modules list and click Install.

 

10. Once the module is installed, choose the Edit option.

 The export settings page will open then. Enter the following connection details:

  • Project ID: the Roistat project number. It can be copied from the browser's address bar (e.g. http://cloud.roistat.com/project/1288, where 1288 is your project number)
  • The Username and Password are not created automatically but by yourself.

WARNING

The username and password should be unique and shouldn't coincide with your administrator login details or any other. It is crucial for protecting your orders data from being lost or corrupted.

 

11. Once you have saved the project ID, the Roistat tracking code will be automatically copied into the Google Analytics Code field.

 If it hasn't happened, in the OpenCart admin panel navigate to System  Settings and click Edit near the store you want to customize.

Then, open the Server tab and find the Google Analytics Code field at the bottom of the tab. Install the Roistat tracking code from Roistat Settings Tracking Code:

Configuring integration in Roistat

Configure Roistat access to Opencart

12. Open Settings  Integrations and choose OpenCart from the Available integrations drop-down menu.


13. The integration settings page will then open.

Enter the URL of your website into the corresponding field, e.g. http://mysite.com . 

Enter the same username and password that you created in paragraph 10.

Click Save to apply the changes.

Once you have specified all the information needed and saved it by clicking Save, OpenCart deal statuses will be imported to Roistat.

Arrange statuses

Once OpenCart has integrated with Roistat, you'll need to arrange the statuses uploaded:

  • Not registered: waste leads or duplicate deals. Do not delete such deals to provide reliable statistics. You can gather them all in one status, e.g. Waste.

  • Processing: deals being in process, not completed, e.g. negotiations or product packaging.

  • Paid: deals that are paid or very likely to be paid.

  • Rejected: when a client rejects the purchase or requests a refund.

Just drag and drop a status to the box you wish.

Roistat will track your achievements (the Paid group) and forecast possible achievements (the Processing and Paid statuses) basing on the grouping principle.

  • No labels