That way they can share your home page and get commission from any products purchased
open: catalog/controller/affiliate/tracking.php
find
Code: Select all
$this->data['text_code'] = $this->language->get('text_code');
Code: Select all
$this->data['text_homelink'] = $this->language->get('text_homelink');
Code: Select all
$this->data['code'] = $this->affiliate->getCode();
Code: Select all
$this->data['homelink'] = str_replace('&', '&', $this->url->link('common/home', 'product_id=' . $result['product_id'] . '&tracking=' . $this->affiliate->getCode()
find
Code: Select all
<p><?php echo $text_code; ?><br />
<textarea cols="40" rows="5"><?php echo $code; ?></textarea>
</p>
Code: Select all
<p><?php echo $text_homelink; ?><br />
<textarea cols="40" rows="5"><?php echo $homelink; ?></textarea>
</p>
find
Code: Select all
$_['text_code'] = '<b>Your Tracking Code:</b>';
Code: Select all
$_['text_homelink'] = '<b>Homepage Link With Your Tracking Code:</b>';
This seems to be incorrect and resulted in an error on the site.uksitebuilder wrote:But you could edit the template file and put the home page link in too
That way they can share your home page and get commission from any products purchased
findadd afterCode: Select all
$this->data['code'] = $this->affiliate->getCode();
Code: Select all
$this->data['homelink'] = str_replace('&', '&', $this->url->link('common/home', 'product_id=' . $result['product_id'] . '&tracking=' . $this->affiliate->getCode()
Adding this instead seems to work:
Code: Select all
$this->data['homelink'] = str_replace('&', '&', $this->url->link('common/home', '&tracking=' . $this->affiliate->getCode()));
Google Analytics Expert - Advanced e-commerce tracking, Product & options reporting, transaction/conversion reporting, Google Adwords conversion & profit reporting, goal & funnel reporting, event tracking, site search tracking, multi-store compatibility, EU Cookie Law compliance and works with any theme or checkout! Easy vqmod install. Get it here
Links from individual products do seem to work for the whole site just fine, but offering a homepage affiliate link too is rather logical.
Does anyone know if there is a time limit on affiliate links? Or how to set this up?
In catalog/controller/account/tracking.php file,
find:
Code: Select all
$data['code'] = $affiliate_info['tracking'];
Code: Select all
$data['homelink'] = str_replace('&', '&', $this->url->link('common/home', 'tracking=' . $affiliate_info['tracking'], true));
Code: Select all
$_['entry_homelink'] = '<b>Homepage Link With Your Tracking Code:</b>';
find:
Code: Select all
<div class="form-group">
<label class="col-sm-2 control-label" for="input-code">{{ entry_code }}</label>
<div class="col-sm-10">
<textarea cols="40" rows="5" placeholder="{{ entry_code }}" id="input-code" class="form-control">{{ code }}</textarea>
</div>
</div>
Code: Select all
{% if homelink %}
<div class="form-group">
<label class="col-sm-2 control-label" for="input-code">{{ entry_homelink }}</label>
<div class="col-sm-10">
<textarea cols="40" rows="5" placeholder="{{ entry_homelink }}" id="input-code" class="form-control">{{ homelink }}</textarea>
</div>
</div>
{% endif %}
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
By the way, I have created multiple stores and am just wondering if there is a way to have a single affiliate link to all the stores' homepage.
I am using Opencart 3 with multi-store setup.
Opencart 1.5.6.5/OC Bootstrap Pro/VQMOD lover, user and geek.
Affordable Service £££ - Opencart Installs, Fixing, Development and Upgrades
Plus Ecommerce, Marketing, Mailing List Management and More
FREE Guidance and Advice at https://www.ecommerce-help.co.uk
Opencart 1.5.6.5/OC Bootstrap Pro/VQMOD lover, user and geek.
Affordable Service £££ - Opencart Installs, Fixing, Development and Upgrades
Plus Ecommerce, Marketing, Mailing List Management and More
FREE Guidance and Advice at https://www.ecommerce-help.co.uk
The problematic with this request is, by default, only one store can be associated with the customers' / affiliates' account. In order to force the store ID to match the current store tracked by the browser, the customer ID would need to match all relevant store IDs where the customer will be validated into. In order for that to happen, multiple store IDs would need to be used for all customers upon registration or when store admins edit customers' accounts.gavinjua wrote: ↑Thu Aug 20, 2020 10:44 amThis topic is very useful and i am glad there are technical guys who are here to help.
By the way, I have created multiple stores and am just wondering if there is a way to have a single affiliate link to all the stores' homepage.
I am using Opencart 3 with multi-store setup.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Users browsing this forum: No registered users and 102 guests