Post by AndreaW » Fri Oct 07, 2011 11:09 pm

The affiliate program is good - very simple. But the only issue is it links to single "products" and there does not seem to be an option that could take people to the Home Page first, so that someone can read the sales letter and choose what product they want. Any thoughts or help as to how to do this?

Newbie

Posts

Joined
Fri Oct 07, 2011 11:05 pm

Post by uksitebuilder » Sat Oct 08, 2011 1:01 am

Affiliates tracking code will be picked up wherever they land on your site, so going to www.yoursite.com/?tracking=99999 (your home page) will set a cookie and track whatever they buy

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by AndreaW » Sat Oct 08, 2011 2:07 am

Hi Simon, thanks for the reply. Not sure what you mean though. The affiliate program only allows you to type in a product and then generates the link that goes to that products 'buy page' rather than the home page.

Newbie

Posts

Joined
Fri Oct 07, 2011 11:05 pm

Post by uksitebuilder » Sat Oct 08, 2011 2:20 am

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

open: catalog/controller/affiliate/tracking.php
find

Code: Select all

		$this->data['text_code'] = $this->language->get('text_code');
add after

Code: Select all

		$this->data['text_homelink'] = $this->language->get('text_homelink');
find

Code: Select all

    	$this->data['code'] = $this->affiliate->getCode();
add after

Code: Select all

    	$this->data['homelink'] = str_replace('&', '&', $this->url->link('common/home', 'product_id=' . $result['product_id'] . '&tracking=' . $this->affiliate->getCode()

open: catalog/view/theme/default/template/affiliate/tracking.tpl
find

Code: Select all

  <p><?php echo $text_code; ?><br />
    <textarea cols="40" rows="5"><?php echo $code; ?></textarea>
  </p>
add after

Code: Select all

  <p><?php echo $text_homelink; ?><br />
    <textarea cols="40" rows="5"><?php echo $homelink; ?></textarea>
  </p>
open: catalog/language/english/affiliate/tracking.php

find

Code: Select all

$_['text_code']        = '<b>Your Tracking Code:</b>';
add after

Code: Select all

$_['text_homelink']        = '<b>Homepage Link With Your Tracking Code:</b>';

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by spitos » Thu Oct 20, 2011 10:13 pm

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

find

Code: Select all

    	$this->data['code'] = $this->affiliate->getCode();
add after

Code: Select all

    	$this->data['homelink'] = str_replace('&', '&', $this->url->link('common/home', 'product_id=' . $result['product_id'] . '&tracking=' . $this->affiliate->getCode()

This seems to be incorrect and resulted in an error on the site.

Adding this instead seems to work:

Code: Select all

$this->data['homelink'] = str_replace('&', '&', $this->url->link('common/home', '&tracking=' . $this->affiliate->getCode()));

Image
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


User avatar
Active Member

Posts

Joined
Mon May 23, 2011 6:19 pm
Location - UK

Post by AndreaW » Mon Oct 24, 2011 4:33 am

Thanks!

Newbie

Posts

Joined
Fri Oct 07, 2011 11:05 pm

Post by kim.portrait » Tue Nov 15, 2011 11:05 pm

Wow! Thanks :-)
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?

User avatar
Newbie

Posts

Joined
Tue Feb 22, 2011 7:00 pm

Post by ddac84 » Thu Aug 02, 2018 7:15 pm

I know this is an old post, but any idea how to do this on OC3?

Newbie

Posts

Joined
Wed Nov 30, 2016 9:16 pm

Post by straightlight » Thu Aug 02, 2018 8:03 pm

ddac84 wrote:
Thu Aug 02, 2018 7:15 pm
I know this is an old post, but any idea how to do this on OC3?
In catalog/controller/account/tracking.php file,

find:

Code: Select all

$data['code'] = $affiliate_info['tracking'];
add below:

Code: Select all

$data['homelink'] = str_replace('&amp;', '&', $this->url->link('common/home', 'tracking=' . $affiliate_info['tracking'], true));
Then, in catalog/language/<your_lang_code>/account/tracking.php file, add at the bottom:

Code: Select all

$_['entry_homelink']        = '<b>Homepage Link With Your Tracking Code:</b>';
Then, in catalog/view/theme/<your_theme>/template/account/tracking.twig file,

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>
add below:

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 %} 
This should resolved the issue.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by ddac84 » Fri Aug 03, 2018 9:07 pm

;D ;D ;D Thank you so so much! You are an absolute star! :yahoo: :banana:

Newbie

Posts

Joined
Wed Nov 30, 2016 9:16 pm

Post by gavinjua » Thu Aug 20, 2020 10:44 am

This 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.

Newbie

Posts

Joined
Mon Jun 15, 2020 2:00 pm


Post by johnp » Thu Aug 20, 2020 5:22 pm


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


User avatar
Active Member

Posts

Joined
Fri Mar 25, 2011 10:25 am
Location - Surrey, UK

Post by gavinjua » Sun Aug 23, 2020 11:42 pm

johnp wrote:
Thu Aug 20, 2020 5:22 pm
Try this:

https://www.opencart.com/index.php?rout ... load_id=36
extension is for opencart 1 and 2. I am using opencart 3. I tried but throws error.. ;D ;D ;D

Newbie

Posts

Joined
Mon Jun 15, 2020 2:00 pm


Post by johnp » Mon Aug 24, 2020 1:07 am

Ok. But your post is in the 1.5 forum. You could always pay a pro to convert the extension for you.

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


User avatar
Active Member

Posts

Joined
Fri Mar 25, 2011 10:25 am
Location - Surrey, UK

Post by straightlight » Mon Aug 24, 2020 10:47 pm

gavinjua wrote:
Thu Aug 20, 2020 10:44 am
This 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.
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.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: Amazon [Bot] and 98 guests