Extension Referral links on "Add to cart" button for OpenCart

Add custom link to button buy
  • Module version: 1.0.1
  • Last Update: 01 February 2023
  • Module format: ocmod.zip
  • Modification: yes
  • OpenCart: 2.x, 3.x
  • OcStore: 2.x, 3.x
  • PHP: 5.6 - 8.x
  • License: Single Domain
  • Author: OpenCartBot
  • Support: yes
  • Add custom link to button buy - Screenshot 1
  • Add custom link to button buy - Screenshot 2
  • Add custom link to button buy - Screenshot 3
quick support
$15.00
Domain for which the extension will be purchased
Available payment methods
Extension Compatibility
  • OpenCart: 2.3.x.x, 3.0.0.0, 3.0.0.2, 3.0.1.0, 3.0.1.1, 3.0.1.2, 3.0.2.0, 3.0.3.0, 3.0.3.1, 3.0.3.2, 3.0.3.3, 3.0.3.4, 3.0.3.5, 3.0.3.6, 3.0.3.7, 3.0.3.8, 3.0.3.9, 3.0.4.0,
DeveloperOfficial OpenCart partnerOpenCart Development Partner
  •  Professional support of the author
  • Lifetime license
  • The license key is provided automatically
  •  Free license key for test domain
  • Extensions can be modified
  • Periodic module updates
  • Free technical support
Special offer

Link on product cart button

The module allows you to add affiliate links to products on the standard buy buttons in OpenCart. You can set up referral links on the Add to cart buttons in several ways using the very flexible settings of this extension. With its help, you can implement the buttons "buy from partners" to go to the purchase of goods on an external site.

DEMO AdminDEMO Live
demo/demo

The module makes it possible to set affiliate links for all products or only some, for example, only those that are out of stock, and the rest of the products will be available for ordering on your website. In this case, the Buy button will be replaced with an affiliate (referral) link only in certain products that meet the specified conditions.

This extension does not put direct links, all redirects are performed through javascript. These links are not found anywhere in the js code, so search engines will not see external links on your site and will not index them and give them weight.

Several possible options for configuring the affiliate links module in OpenCart products:

1) For each product, a separate affiliate link is needed, that is, for each product a link is written in a separate field.

Links can be written in standard product fields that you have not yet used, for example: UPC, EAN, JAN, MPN, ISBN, Location.

Let's say you decided to write links in the "Location" field, then in the module settings in the "Link" field you need to write the {location} shortcode so that the module receives a link from there and substitutes it for the Add to cart button.

Or, you decided to register product referral links in the UPC field, then in the reflinks module settings you need to register the {upc} shortcode.

If you still need to pass additional parameters, for example, the selected quantity of goods on your site, then the link formula should look something like this: {upc}?quantity={quantity}

2) Affiliate links must be generated automatically from product parameters.

For example: you have a basic affiliate link, in which you only need to substitute the value of the product SKU or product code, then in the module settings in the Link field you need to write something like this: http://partner.shop/get_product?code={model}

3) One affiliate link for all products.

In this case, you just need to register this link in the module settings in the "Link" field and when you click on the Buy button, customers will be redirected to this link.


Module installation instructions:

  1. Upload the module in the admin panel in the "Extensions" : "Install".
  2. Go to the "Modifications" section and update the cache.
  3. Go to the "Extensions" : "Extensions" : "Modules" and enable the module.
  4. Edit module. Enable the status of the module and adjust all its options to your needs and save the settings.
  5. Check module operation.
  6. Bingo!


Screenshots of Referral links on "Add to cart" button

  • Add custom link to button buy - Screenshot 1
  • Add custom link to button buy - Screenshot 2
  • Add custom link to button buy - Screenshot 3

Changelog Referral links on "Add to cart" button

  • v1.0.1 (01 February 2023) - Added the option "How to open a link" - in the same window or in a new window

FAQ: Referral links on "Add to cart" button

Why does the link from the product list not open in a new window?

Because the ocmod modification cannot change js files, and the "Add to cart" button in the list of products works through a script located in js files. You need to open the catalog/view/javascript/common.js file (or if you have a custom template this file can be in the catalog/view/theme/template/js/common.js template folder). Find the first counter line there: location = json['redirect']; replace it with: window.open(json['redirect']); Save the file. Update browser cache.

How to add a product to the cart of another site on OpenCart?

If you have two sites on OpenCart, but one of them is an affiliate and the other is the main site, the buyer can add the product to the basket of the main site and proceed to checkout with one click on the Buy button on the affiliate site. To do this, you need to install the extension on the receiving site, which will process links and add the product to the cart.
Then when you click on the "Buy" button on one site, you add the product to the cart on another site and proceed to checkout.

Why is the link truncated or incomplete?

If you write a link in the standard product fields Model, SKU, UPC, EAN, JAN, MPN, ISBN, Location - it may be truncated when saving, it may not be saved completely. This is because each of these fields has a character limit. To increase this limit, you need to open the database control panel, edit the oc_product table and change the limit value for the desired field.
Length of OpenCart fields
You must be logged in to view the files!
Write a review
Facebook Google
Note: HTML is not translated!
   Bad      Good

flowershouse 07 February 2022

модуль топчик работает как часики. подтягивает ссылки из поля юпс а имено это мне и нужно было... спасибо.


More OpenCart Extensions
OpenCart Show pdf invoice on order

$20.00

OpenCart Events

$15.00

Audio player on product page

$20.00

Ukrainian order receipt

$15.00

Products on map

$15.00

Multilanguage sitemap OpenCart

$15.00

Auto sending a request to Bing

$20.00

Read Our Blog