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:
Upload the module in the admin panel in the "Extensions" : "Install".
Go to the "Modifications" section and update the cache.
Go to the "Extensions" : "Extensions" : "Modules" and enable the module.
Edit module. Enable the status of the module and adjust all its options to your needs and save the settings.
Check module operation.
Bingo!
Screenshots of Referral links on "Add to cart" button
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.
You must be logged in to view the files!
flowershouse
07 February 2022
модуль топчик работает как часики. подтягивает ссылки из поля юпс а имено это мне и нужно было... спасибо.
Over the years of working with various OpenCart and SEO projects, we have developed five cool modules for them that provide the fastest and most noticeable result in improving search positions.
We will show you how to update OpenCart 3 to ensure its compatibility with PHP 8. There are several ways to do this: cloning files from a newer version of OpenCart, updating libraries through composer, or creating a new website.
This website uses cookies 🍪 to provide you with the convenience of working with its functions, based on the Privacy Policy