Latest Articles
So far this was never an issue, there were problems with uploading modules via the installer because of the ftp connection but you could allways install ocmods without any issue. However, some .. Read More
People had this issue so many times I thought I would write a bit about it. The  types of issues with opencart's 2.x modification system that I identified so far are: 1. Old Vqmod .. Read More
This small tutorial will show you how to manually add custom links to the default top menu in opencart. If you dont want to go trough all the hustle and would like to be able to completly customize.. Read More
To enable seo urls in opencart navigate in admin to system > settings , edit the store and on the server tab of the store settings you will find "Use SEO urls", set it to yes. So far e.. Read More
All Articles

Show affiliate earning on opencart product page

Having affiliates is a great way to boost your sales, so this article will help you atract more affiliates to your website by displaying somewhere on the product page how much an affiliate wil make by making a sale of that viewed product.

For that you would have to modify 2 files catalog/controller/product/product.php and catalog/view/theme/yourtheme/template/product/product.tpl.

First on the product.php file find the line:

if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {

and above it add the following code:

$earning = $this->tax->calculate($product_info['price'], $product_info['tax_class_id'], $this->config->get('config_tax')) * $this->config->get('config_commission') / 100;

$this->data['youearn'] = "By promoting this product you could earn on a sale " .  $this->currency->format($earning);

And then in product.tpl wherever you want the text to appear add the code:

<?php echo $youearn; ?>

That is it and now your affiliates or potential affiliates will know how much they could make on selling that product.

Posted by Flo

Related Articles

Having a good communication with your clients is essential for your business. If you know how to create the proper marketing strategies and if you know when to send promotions, you will boost your sales in no time. Even though in OpenCart 1.5x you have a special feature for sending e-mails many of us do not use it. This is one of the first mistakes that you can make as an online store manager. You can send notifications, promotions, contests and release of new products. In order to be able to send e-mails you have to log into your account. From the Administration Panel you click on Sal..
0 comments on this article - view comments
As you can all see , in the new opencart 1.5.5 a new module was added called 'Filter' and can be seen in admin by navigating to extension > modules. I saw in the development discussion that a filter module will be added in this new version but I did not look into it so I was assuming it will be filtering the products by attributes. Well I was wrong, because the new filter module came with a brand new filters system. The new filters system even if it implies a little more work I think is a great ideea and will give customers better accuracy in their search. Inserting Filters ..
13 comments on this article - view comments

0 Comments To "Show affiliate earning on opencart product page"

Write a comment

Your Name:


Enter the code in the box below:

Your Comment:
Note: HTML is not translated!