I would like to know how to change the the affiliate product tracking link's autocomplete from name to model.
Most of my product name is the same and I use model to differentiate them. Therefore I want my affiliates to search a product by model to get the product affiliate link.
Please help.
Thanks in advance.
Onnets
To see model instead of name in suggestions, you should do the following:
in catalog/controller/affiliate/tracking.php find this line:
Code: Select all
'name' => strip_tags(html_entity_decode($result['name'], ENT_QUOTES, 'UTF-8')),
Code: Select all
'name' => strip_tags(html_entity_decode($result['model'], ENT_QUOTES, 'UTF-8')),
Extensions for affiliates (openCart 1, 2, 3):
Advanced Multi Level Affiliate System
Customer and Affiliate Accounts Combined into one Account
Affiliate Tracking with Coupons
Discount for Referred Customers - Order Total
Type Tracking Code
Mass Pay
Affiliate Transactions for openCart 3
Affiliate Pack X - all modules with 40% discount
Extensions for affiliates (openCart 1, 2, 3):
Advanced Multi Level Affiliate System
Customer and Affiliate Accounts Combined into one Account
Affiliate Tracking with Coupons
Discount for Referred Customers - Order Total
Type Tracking Code
Mass Pay
Affiliate Transactions for openCart 3
Affiliate Pack X - all modules with 40% discount
Did not modify anything except adding a homepage link into it.
But I manage to find out the problem. I am using my mouse to paste the model number. That is why it did not show. I don't know much about how autocomplete works but when I type in or paste using ctrl + v, it shows.
Plus when typing the name for example bodycon, a list of products contain the word shows up. BUT when typing the model number for example 112, nothing show up until you finish typing the entire model number.
** Do you know why there are 2 symbol for the tracking?
The symbol & and ? - will both works?
my homepage link is http://www.bolomie.com/&tracking=stenno
my product link is http://www.bolomie.com/1129284507?tracking=stenno
By the way, planing to buy your account and affiliate combine into one. But need to see how it actually works. I have tried your demo but stuck at adding the commission.
Thanks
For this you need to change 1 line in catalog/model/catalog/product.phpOnNets wrote:
Plus when typing the name for example bodycon, a list of products contain the word shows up. BUT when typing the model number for example 112, nothing show up until you finish typing the entire model number.
This is line 106:
Code: Select all
$sql .= " OR LCASE(p.model) = '" . $this->db->escape(utf8_strtolower($data['filter_name'])) . "'";
Code: Select all
$sql .= " OR LCASE(p.model) LIKE '" . $this->db->escape(utf8_strtolower($data['filter_name'])) . "%'";
? must be in the beginning of query string and & used to add more variables, not the first one.** Do you know why there are 2 symbol for the tracking?
The symbol & and ? - will both works?
my homepage link is http://www.bolomie.com/&tracking=stenno
my product link is http://www.bolomie.com/1129284507?tracking=stenno
http://www.bolomie.com/&tracking=stenno is incorrect but most likely will still work
http://www.bolomie.com/1129284507?tracking=stenno is correct
What is the problem with adding commission? This module doesn't do anything with commissions, except the feature to transfer earnings to customer account as store credits.By the way, planing to buy your account and affiliate combine into one. But need to see how it actually works. I have tried your demo but stuck at adding the commission.
Extensions for affiliates (openCart 1, 2, 3):
Advanced Multi Level Affiliate System
Customer and Affiliate Accounts Combined into one Account
Affiliate Tracking with Coupons
Discount for Referred Customers - Order Total
Type Tracking Code
Mass Pay
Affiliate Transactions for openCart 3
Affiliate Pack X - all modules with 40% discount
Thank you for the code. Now there is another problem :This is line 106:replace it with:Code: Select all
$sql .= " OR LCASE(p.model) = '" . $this->db->escape(utf8_strtolower($data['filter_name'])) . "'";
Code: Select all
$sql .= " OR LCASE(p.model) LIKE '" . $this->db->escape(utf8_strtolower($data['filter_name'])) . "%'";
As you can see there are some blank space between the products. I think those are products that have been disable. How to code it to remove just like typing the name?
Can you teach me how to code it correctly? I know where the files is and I copy from http://forum.opencart.com/viewtopic.php ... 37#p210597. Since you say it is incorrect, can you teach me?? must be in the beginning of query string and & used to add more variables, not the first one.
http://www.bolomie.com/&tracking=stenno is incorrect but most likely will still work
http://www.bolomie.com/1129284507?tracking=stenno is correct
Actually I have create a test account with the name 'abc aaa'. I have bought an item from the tracking link with a guest checkout. In the admin, I can see from the order that there is a $5.00 commission. but I cannot add it to proceed to the next step. What I want to see is that the function of transfer earnings to customer account as store credits. If you know what I mean.What is the problem with adding commission? This module doesn't do anything with commissions, except the feature to transfer earnings to customer account as store credits.
One more thing, do you know how to code the tracking code to use the affiliate's first name instead of randomly?
Thanks.
I don't think these are disabled products. I think these are product which have something wrong with their name, like empty name or name embeded into html tags or something.As you can see there are some blank space between the products. I think those are products that have been disable. How to code it to remove just like typing the name?
Basically first character in query string should be ?, and all other separators must be &, e.g. example.com/?a=b&c=d&e=f.Can you teach me how to code it correctly? I know where the files is and I copy from http://forum.opencart.com/viewtopic.php ... 37#p210597. Since you say it is incorrect, can you teach me?
http://www.bolomie.com/&tracking=stenno should be http://www.bolomie.com/?tracking=stenno
You can use any other affiliate account with positive balance. Password is demo for all accounts with @example.com in emails.Actually I have create a test account with the name 'abc aaa'. I have bought an item from the tracking link with a guest checkout. In the admin, I can see from the order that there is a $5.00 commission. but I cannot add it to proceed to the next step. What I want to see is that the function of transfer earnings to customer account as store credits. If you know what I mean.
This is rather complicated stuff for the forum, but anyway, you can try:One more thing, do you know how to code the tracking code to use the affiliate's first name instead of randomly?
admin/model/sale/affiliate.php
catalog/model/affiliate/affiliate.php
in both files find the line with public function addAffiliate in it
You'll see the next line after that is quite long line starting with $this->db->query
So after that line with $this->db->query you should insert the following code (in both files)
Code: Select all
$_res = $this->db->query("SELECT * FROM " . DB_PREFIX . "affiliate WHERE email = '" . $this->db->escape($data['email']) . "'");
$affiliate = $_res->row;
if($affiliate['firstname']) {
$new_code = html_entity_decode($affiliate['firstname'], ENT_QUOTES, 'UTF-8');
$old_locale = setlocale(LC_CTYPE, '0');
if(strtolower($old_locale) == 'c' || strtolower($old_locale) == 'posix') {
setlocale(LC_CTYPE, 'en_US');
} else {
$old_locale = false;
}
$new_code = iconv('UTF-8', 'ASCII//TRANSLIT', $new_code);
if($old_locale !== false) setlocale(LC_CTYPE, $old_locale);
$new_code = preg_replace("/[^a-z0-9]+/", '', strtolower($new_code));
$__i = 0;
$new_code_src = $new_code;
while(true) {
$_res = $this->db->query("SELECT affiliate_id from " . DB_PREFIX . "affiliate WHERE `code`='" . $this->db->escape($new_code) . "'");
if($_res->num_rows < 1) break;
$__i++;
$new_code = $new_code_src . $__i;
}
$affiliate['code'] = $new_code;
$this->db->query("UPDATE " . DB_PREFIX . "affiliate SET `code`='" . $this->db->escape($new_code) . "' WHERE affiliate_id='" . (int)$affiliate['affiliate_id'] . "'");
}
Extensions for affiliates (openCart 1, 2, 3):
Advanced Multi Level Affiliate System
Customer and Affiliate Accounts Combined into one Account
Affiliate Tracking with Coupons
Discount for Referred Customers - Order Total
Type Tracking Code
Mass Pay
Affiliate Transactions for openCart 3
Affiliate Pack X - all modules with 40% discount
Thank you for the code.
For your Customer and Affiliate Accounts Combined into one Account,
1. can you add a username for tracking so that affiliate can choose their tracking name instead of random tracking? (not username for login to account or affiliate. It is the tracking username to determine their tracking code)
2. On the signup page for both customer and affiliate, include the tracking username for affiliate?
3. Once they choose the tracking username, they cannot rename or edit it.
Please quote my a price including this modification.
Thank you
Extensions for affiliates (openCart 1, 2, 3):
Advanced Multi Level Affiliate System
Customer and Affiliate Accounts Combined into one Account
Affiliate Tracking with Coupons
Discount for Referred Customers - Order Total
Type Tracking Code
Mass Pay
Affiliate Transactions for openCart 3
Affiliate Pack X - all modules with 40% discount
Thanks for your extension. It works great.
Now I am figuring out how to make the affiliate from http://www.bolomie.com/&tracking=onnets to http://www.bolomie.com/?tracking=onnets.
& is not working and when I change the site to ? it works. The problem is I don't know how to code it. I copy from the controller
Code: Select all
str_replace('&', '&', $this->url->link('product/product', 'product_id=' . $result['product_id'] . '&tracking=' . $this->affiliate->getCode()))
Thanks
There are 2 possible ways:
Code: Select all
str_replace('&', '&', $this->url->link('common/home', 'tracking=' . $this->affiliate->getCode()))
Code: Select all
HTTP_SERVER . '?tracking=' . $this->affiliate->getCode()))
Extensions for affiliates (openCart 1, 2, 3):
Advanced Multi Level Affiliate System
Customer and Affiliate Accounts Combined into one Account
Affiliate Tracking with Coupons
Discount for Referred Customers - Order Total
Type Tracking Code
Mass Pay
Affiliate Transactions for openCart 3
Affiliate Pack X - all modules with 40% discount
Users browsing this forum: Semrush [Bot] and 102 guests