Post by richardstock1 » Fri May 31, 2019 10:21 am

Hi there,

I am looking to activate my affiliate program but have gone to activate it and am getting this error " PHP Notice: Undefined property: Affiliate::$load in /var/www/web/Store/vqmod/vqcache/vq2-system_library_affiliate.php on line 57"

This only happens when you are trying to log in, registation works and it appears in the admin section.
I have looked athe various plugins I have installed and messed around to see if they are causing an issue but cannot see that anything that would effect the affiliate module.

Any suggestions on what this issue could be?

I am running 2.0.3.1

Newbie

Posts

Joined
Mon Jul 06, 2015 5:33 am

Post by ocmta » Fri May 31, 2019 6:01 pm

It for sure is caused by some vqmod modification that you have, error message shows that there is a code that modifies system/library/affiliate.php and introduces the error. You should look for "system/library/affiliate.php" in your vqmod/xml files.

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


Active Member

Posts

Joined
Mon Mar 12, 2012 11:21 am


Post by richardstock1 » Fri May 31, 2019 6:30 pm

ocmta wrote:
Fri May 31, 2019 6:01 pm
It for sure is caused by some vqmod modification that you have, error message shows that there is a code that modifies system/library/affiliate.php and introduces the error. You should look for "system/library/affiliate.php" in your vqmod/xml files.
Many thanks for that, I have checked my vqmod XML files for system/library/affiliate.php and have found one XML file which seems to be referencing that file. It is part of a Logger extention, which is used to log what the admin users do when in the admin screen. Not sure why it would cause issues though, everything else works fine ???

Sorry I am not very good at all this stuff, I am willing to try and learn though.

This is the code in the XML,

"<file name="system/library/affiliate.php">
<operation>
<search position="after" index="2"><![CDATA[
if ($affiliate_query->num_rows) {
]]></search>
<add><![CDATA[
$this->load->model('logger/admin');
$this->model_logger_admin->logEvent(array("email" => $email) ,"Affiliate","Affiliate logged in success");
]]></add>
</operation>
<operation>
<search position="after" index="2"><![CDATA[
} else {
]]></search>
<add><![CDATA[
$this->load->model('logger/admin');
$this->model_logger_admin->logEvent(array("email" => $email) ,"Affiliate","Affiliate logged in failed");
]]></add>
</operation>
<operation>
<search position="after"><![CDATA[
public function logout() {
]]></search>
<add><![CDATA[
$this->load->model('logger/admin');
$this->model_logger_admin->logEvent(array("affiliate_id" => $this->session->data['affiliate_id']) ,"Affiliate","Affiliate logged out");
]]></add>
</operation>"

Newbie

Posts

Joined
Mon Jul 06, 2015 5:33 am

Post by ocmta » Fri May 31, 2019 6:39 pm

This is all wrong and can't work with system/library/affiliate.php . You should either remove this whole section from xml (from <file name="system/library/affiliate.php"> to </file>) , or contact extension developer to fix it.

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


Active Member

Posts

Joined
Mon Mar 12, 2012 11:21 am

Who is online

Users browsing this forum: No registered users and 254 guests