Please post all pre-sales questions of all products on this forum

iDevAffiliate plugin

  • Frédéric Bianchi
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 10 months ago - 3 years 10 months ago #135372 by Frédéric Bianchi
iDevAffiliate plugin was created by Frédéric Bianchi
Hello,

i make some test to make working iDevAffiliate with Membership Pro.
iDev have a plugin for MP. As i understand, this plugin make 2 things :

1. it store the IP address and the order ID in a database additional.
2. it get the different data and compile it. After that, it send the data in an url, with the IP address, product name, etc etc.
That make the commission in my iDev admin panel.

All of that work fine, but... I want more control on my commissions. Actually, with iDevAffiliate, you cant define easily different percentage of commission amount depending of different plan.

But, i can override the data passed to the url to force the amount i want to commission.
So for do that, i want use the PHP plugin of Membership pro.
Normally, i can perform the 2 thing that the actual idev plugin do.

So i have tested that in a dev site, and i cant make it work. Honnestly, i thing i dont put the code correctly in the 2 php filed of Membership Pro.
So my question is can you please take a look at the plugin code and tell me how i have to cut it and past in the 2 Membership pro field ?

Because if i can make it work, i could make commission by plan, and dont use the iDev plugin anymore.

I attach the php code of the plugin in zip because i cant write it here (firewall).

Regards,
Frédéric
Attachments:
Last edit: 3 years 10 months ago by Frédéric Bianchi.

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

  • Frédéric Bianchi
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 10 months ago #135376 by Frédéric Bianchi
Replied by Frédéric Bianchi on topic iDevAffiliate plugin
Hello,
the first step is OK now, for storing in the database. I have replace the code to $row like indicate in your doc. Rest the second part now. I continue testing.

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

  • Frédéric Bianchi
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 10 months ago #135379 by Frédéric Bianchi
Replied by Frédéric Bianchi on topic iDevAffiliate plugin
OK, me again :)

The second step almost work. I have replace the code with $row too.
Now it is just for the order id, i dont know what is the right $row ?

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

More
3 years 10 months ago #135382 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic iDevAffiliate plugin
Not looking at the code yet but for order Id, I guess you can use $row->id;

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

  • Frédéric Bianchi
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 10 months ago #135385 by Frédéric Bianchi
Replied by Frédéric Bianchi on topic iDevAffiliate plugin
It is OK !

I missed a $data in my code => replace by $row and it work fine.

So i have made question and answer... I hope help somebody.

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

More
3 years 10 months ago #135387 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic iDevAffiliate plugin
OK. Congratulations ! But in the future, please post your topic on right forum. This is of course, not a pre-sales questions :D

Tuan

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

  • Frédéric Bianchi
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 10 months ago #135389 by Frédéric Bianchi
Replied by Frédéric Bianchi on topic iDevAffiliate plugin
Ho yes, sorry, did not see that...

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

More
3 years 10 months ago #135403 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic iDevAffiliate plugin
No problem :).

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

  • Frédéric Bianchi
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 9 months ago - 3 years 9 months ago #135408 by Frédéric Bianchi
Replied by Frédéric Bianchi on topic iDevAffiliate plugin
Hello again,
i have put the code now on my production site, but it dosent work...
This is the same site, same server, same configuration.

The first step is good, it store the IP address and order number in database, but the second step dont work. It seem that not sending the request at active registration. If i test with a POST request with Postman for example, it work.

Is there a way to be sure that Membership Pro send the request at active registration ? Because i dont understand why it work on my test site and not in my production site.

EDIT : The post function work, if i put directly the right formated url in the script. So i have to find what is wrong in my script. But strange, because same as test site...
Last edit: 3 years 9 months ago by Frédéric Bianchi.

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

  • Frédéric Bianchi
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 9 months ago - 3 years 9 months ago #135416 by Frédéric Bianchi
Replied by Frédéric Bianchi on topic iDevAffiliate plugin
I can't figure out why it's not working.
It's exactly the same code on both sites.
Same server, same installation (copy/past of the sites).
Same php version 7.3 (dont know if change anything).
Same Joomla version and MP version.

I'm attaching the code I placed in the "script on membership activation" field.
I really don't understand.

If you can take a look, it will be appreciated.
And if you want move this post on the right forum...

Regards,
Frédéric
Attachments:
Last edit: 3 years 9 months ago by Frédéric Bianchi.

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

Moderators: Tuan Pham NgocGiang Dinh TruongMr. Dam