Errors with affiliation plugin

  • Posts: 104
  • Thank you received: 2
  • Hikamarket Multivendor Hikashop Business
10 years 10 months ago #138767

Hi

I recently purchased the Business addition

I am having a few problems with the affiliation program though
I get the following errors

1 - If you click on an affiliate Link
Warning: Creating default object from empty value in /home/m4706240/public_html/plugins/system/hikashopaffiliate/hikashopaffiliate.php on line 88

2 - If you register an account

Warning: Creating default object from empty value in /home/m4706240/public_html/plugins/system/hikashopaffiliate/hikashopaffiliate.php on line 263

Fatal error: Cannot use object of type stdClass as array in /home/m4706240/public_html/plugins/system/hikashopaffiliate/hikashopaffiliate.php on line 279

3 - If you check out an order

Warning: Creating default object from empty value in /home/m4706240/public_html/plugins/system/hikashopaffiliate/hikashopaffiliate.php on line 179

What could be causing this and how do I solve it.
For now I have disabled the affiliation plugin

Thank you

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
10 years 10 months ago #138813

Hi,

These warnings should not cause any problems on your website.
Changing the error reporting level in joomla will remove these warnings.

We will solve these warnings for the next release of HikaShop.
Thanks to give us the corresponding lines, it will help us to correct that.

Please Log in or Create an account to join the conversation.

  • Posts: 104
  • Thank you received: 2
  • Hikamarket Multivendor Hikashop Business
10 years 9 months ago #142412

Hi Xavier

I changed the error reporting settings and the messages disappeared, so I assumed that the problem was solved.
But clearly these warnings are causing problems.
For the past few weeks I have been trying to figure out why people when they register an account they don't activate it and why I don't receive mails telling me some one has registered on my site.
I have now register some demo users and then noticed that if some one registers they simply get a blank white screen which means they are never told to activate there account, and since I don't receive a mail I am unaware of the fact that some one has registered.

I now disabled the affiliation plugin and as soon as I did that the blank screen after registration disappeared and the correct registration message was displayed, I even received an email once again stating that a new user just registered .

Unfortunately this leads me to only one conclusion, that being that there is something seriously wrong with the plugin, which is a pity as the affiliation program is the main reason I upgraded to business version now it seems that instead of boosting sales it has cost me thousands in lost sales.

Please help I would like to use the plugin, if I can get it to work properly

Please Log in or Create an account to join the conversation.

  • Posts: 82823
  • Thank you received: 13370
  • MODERATOR
10 years 9 months ago #142449

Hi,
Please turn on the "debug mode" and "error reporting" options of the joomla configuration and try a registration again with the affiliate plugin activated.
It should display an error message which will help us understand your problem.

Please Log in or Create an account to join the conversation.

  • Posts: 104
  • Thank you received: 2
  • Hikamarket Multivendor Hikashop Business
10 years 9 months ago #142455

Hi

Thanks for the quick response

If error reporting is on, and affiliation plugin is active I receive the following errors when registering an account


Warning: Creating default object from empty value in /home/m4706240/public_html/plugins/system/hikashopaffiliate/hikashopaffiliate.php on line 263

Fatal error: Cannot use object of type stdClass as array in /home/m4706240/public_html/plugins/system/hikashopaffiliate/hikashopaffiliate.php on line 279

So basically all the same errors as in my initial post

Please Log in or Create an account to join the conversation.

  • Posts: 82823
  • Thank you received: 13370
  • MODERATOR
10 years 9 months ago #142549

Hi,

I think I found the problem.

Please replace the code:

if(empty($user->user_params->user_custom_fee)){
				$partner->user_params->partner_lead_fee = $config->get('partner_lead_fee',0);
				$partner->user_params->partner_fee_currency = $config->get('partner_currency',1);
			}else{
				$user->user_params->partner_lead_fee = $user->user_params->user_partner_lead_fee;
			}
with the code:
if(empty($partner->user_params->user_custom_fee)){
				$partner->user_params->partner_lead_fee = $config->get('partner_lead_fee',0);
				$partner->user_params->partner_fee_currency = $config->get('partner_currency',1);
			}else{
				$partner->user_params->partner_lead_fee = $partner->user_params->user_partner_lead_fee;
			}
in the file plugins/system/hikashopaffiliate/hikashopaffiliate.php and that should make it work properly.

Please Log in or Create an account to join the conversation.

  • Posts: 104
  • Thank you received: 2
  • Hikamarket Multivendor Hikashop Business
10 years 9 months ago #142563

Hi Nicolas

Thanks, I replaced the coding in the hikashopaffiliate.php file with the new coding and saved it, I then reactivated the plugin and error reporting and Unfortunately the problem has not gone away I still get the same errors and if error reporting is off still the same blank screen

Please Log in or Create an account to join the conversation.

  • Posts: 82823
  • Thank you received: 13370
  • MODERATOR
10 years 9 months ago #142581

Hi,

Please also replace the code:

$user = $userClass->get($user['id'],'cms');
				$user->user_cms_id = $user['id'];
				$user->user_partner_id = $partner_id;
				$user->user_partner_price = @$partner->user_params->partner_lead_fee;
				$user->user_partner_currency_id = $partner->user_currency_id;
				$userClass->save($user);
to:
$userData = $userClass->get($user['id'],'cms');
				$userData->user_cms_id = $user['id'];
				$userData->user_partner_id = $partner_id;
				$userData->user_partner_price = @$partner->user_params->partner_lead_fee;
				$userData->user_partner_currency_id = $partner->user_currency_id;
				$userClass->save($userData);
in that same file. Then it will be ok.

Please Log in or Create an account to join the conversation.

  • Posts: 104
  • Thank you received: 2
  • Hikamarket Multivendor Hikashop Business
10 years 9 months ago #142756

Hi Nicolas

I replaced the coding with the new coding, If I try to register a account, I now get this

Error

Unknown column 'id' in 'field list' SQL=UPDATE `tflwc_hikashop_user` SET `user_cms_id`='1037',`user_email`='test@abcdef2.com',`user_partner_email`='',`user_params`='',`user_partner_id`='141',`user_partner_price`='5',`user_partner_paid`='0',`user_created_ip`='41.151.222.192',`user_unpaid_amount`='0.00000',`user_partner_currency_id`='144',`user_created`='1391706145',`user_partner_activated`='0',`id`='1037',`name`='abcdef2',`username`='abcdef2',`email`='test@abcdef2.com',`password`='f2341fa89c3d136e10413817a8046b87:5VGrgEw2YEfpK8cfVLAIYODHgTmJtbQC',`block`='1',`sendEmail`='0',`registerDate`='2014-02-06 17:02:25',`lastvisitDate`='0000-00-00 00:00:00',`activation`='3bb7259c2d1bc421d4bcb22e7928187e',`params`='{\"site_language\":\"en-GB\",\"language\":\"en-GB\"}',`lastResetTime`='0000-00-00 00:00:00',`resetCount`='0' WHERE `user_id`='193'

Warning: Creating default object from empty value in /home/m4706240/public_html/plugins/system/hikashopaffiliate/hikashopaffiliate.php on line 263

Please advise

Please Log in or Create an account to join the conversation.

  • Posts: 82823
  • Thank you received: 13370
  • MODERATOR
10 years 9 months ago #142760

Change that same code to

$userDataInDb = $userClass->get($user['id'],'cms');
				$userData = new stdClass();
				$userData->user_id = $userDataInDb->user_id;
				$userData->user_cms_id = $user['id'];
				$userData->user_partner_id = $partner_id;
				$userData->user_partner_price = @$partner->user_params->partner_lead_fee;
				$userData->user_partner_currency_id = $partner->user_currency_id;
				$userClass->save($userData);
in order to avoid that new error.

The following user(s) said Thank You: SnoozeULooze.co.za

Please Log in or Create an account to join the conversation.

  • Posts: 104
  • Thank you received: 2
  • Hikamarket Multivendor Hikashop Business
10 years 9 months ago #142792

Hi Nicolas

Thank it seems to now be fixed, the only error that now remains is the one when you click an affiliation link, but as for the rest it works perfectly.

Please Log in or Create an account to join the conversation.

  • Posts: 82823
  • Thank you received: 13370
  • MODERATOR
10 years 9 months ago #142974

Yes, it's not really an error. Just a warning. If you deactivate the error reporting option of the joomla configuration you won't see it. We'll fix it for next version.

Please Log in or Create an account to join the conversation.

Time to create page: 0.098 seconds
Powered by Kunena Forum