- Posts: 11
Shop / e-Commerce Integration
XMLRPC on Hikashop hook
- gvitry
- Topic Author
- Offline
- New Member
-
Less
More
8 years 4 months ago #1
by gvitry
XMLRPC on Hikashop hook was created by gvitry
Following some recent upgrades something which use to work up to february the 8th no longer do.
Our moodle version is Moodle 3.3.3+ (Build: 20171214)
Joomla is 3.8.5
HikaShop is 3.1.1
Joomdle is 1.1.4 and the Moodle WS plugin is up to date.
PHP version is 7.1.13
When an order is confirmed in hikashop the user is created in Moodle and enrolled in the corresponding course. It still works as before. However, if you manually change the order status from created to confirmed, you'll get an error message saying :
It seems to be produced by the call_method_fgc in the administrator/components/com_joomdle/helpers/content.php file
I've commented the "die" instruction and set $response = null; around line 110. The reason is that it prevent any other hikashop plugin hooked to onAfterOrderUpdate to run. And we have such a plugin to register our customers to the Zoom webinar tool we use.
Actually, Moodle is giving back a bad answer to a request. Apparently the 'multiple_enrol_to_course_and_group' method is triggered with wrong data and fails. These data seem to be produced in the orderUpdated function in plugins/system/joomdlehikashopgroups/joomdlehikashopgroups.php file around line 100.
It seems that it consider that the first characteristic is a groupID without verifying the word "groupID" thus triggering the method. But we have never used the Moodle Group of students feature. This table is empty in Moodle. However we use to have at least one characteristic in all our hikashop products. Since the beginning. It is related to the kind of subscriber (individual, company, university, etc..) with differents prices.
So it seems that something has changed. Either the way the Hikashop characteristic is coded or the way moodle answer to such a request... However the error itself does not disturb us a lot as we don't use this feature and the buyer is enrolled in the right course.
But the problem is the "die" instruction in case of such errors. You should provide a mechanism to report the error either in Joomla enqueue method or in a log file and follow or abort safely the process in order to let the other Hika plugin run.
Do you have any idea of what could have changed there ?
Our moodle version is Moodle 3.3.3+ (Build: 20171214)
Joomla is 3.8.5
HikaShop is 3.1.1
Joomdle is 1.1.4 and the Moodle WS plugin is up to date.
PHP version is 7.1.13
When an order is confirmed in hikashop the user is created in Moodle and enrolled in the corresponding course. It still works as before. However, if you manually change the order status from created to confirmed, you'll get an error message saying :
It seems to be produced by the call_method_fgc in the administrator/components/com_joomdle/helpers/content.php file
I've commented the "die" instruction and set $response = null; around line 110. The reason is that it prevent any other hikashop plugin hooked to onAfterOrderUpdate to run. And we have such a plugin to register our customers to the Zoom webinar tool we use.
Actually, Moodle is giving back a bad answer to a request. Apparently the 'multiple_enrol_to_course_and_group' method is triggered with wrong data and fails. These data seem to be produced in the orderUpdated function in plugins/system/joomdlehikashopgroups/joomdlehikashopgroups.php file around line 100.
It seems that it consider that the first characteristic is a groupID without verifying the word "groupID" thus triggering the method. But we have never used the Moodle Group of students feature. This table is empty in Moodle. However we use to have at least one characteristic in all our hikashop products. Since the beginning. It is related to the kind of subscriber (individual, company, university, etc..) with differents prices.
So it seems that something has changed. Either the way the Hikashop characteristic is coded or the way moodle answer to such a request... However the error itself does not disturb us a lot as we don't use this feature and the buyer is enrolled in the right course.
But the problem is the "die" instruction in case of such errors. You should provide a mechanism to report the error either in Joomla enqueue method or in a log file and follow or abort safely the process in order to let the other Hika plugin run.
Do you have any idea of what could have changed there ?
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7930
8 years 4 months ago #2
by Antonio Durán
Replied by Antonio Durán on topic XMLRPC on Hikashop hook
Hi. Thanks for all the info.
Please not that you need an active subscription in order to get support for 3rd party integration plugins.
That said, my question is: why are you using the joomdle hikashop group plugin if you don't use group? Just use standard Joomdle hikashop plugin instead. Maybe you installed all Hikashop related plugins in the first place, not noticing that you din't need them.
Please not that you need an active subscription in order to get support for 3rd party integration plugins.
That said, my question is: why are you using the joomdle hikashop group plugin if you don't use group? Just use standard Joomdle hikashop plugin instead. Maybe you installed all Hikashop related plugins in the first place, not noticing that you din't need them.
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7930
8 years 4 months ago - 8 years 4 months ago #3
by Antonio Durán
Replied by Antonio Durán on topic XMLRPC on Hikashop hook
Hi again. Sorry, I was in a rush yesterday.
> But the problem is the "die" instruction in case of such errors. You should provide a mechanism to report the error either in Joomla enqueue method or in a log file and follow or abort safely the process in order to let the other Hika plugin run.
Well, I've considered this before, but I am not so sure. There are times where you really want to know that things are not working*. Think of this like an "asset" in the code.
Intead, the plugin should be doing its work as you say, and don't call the service if parameters are not sane.
*For example: with this error you now know that you were using not needed plugins.
> But the problem is the "die" instruction in case of such errors. You should provide a mechanism to report the error either in Joomla enqueue method or in a log file and follow or abort safely the process in order to let the other Hika plugin run.
Well, I've considered this before, but I am not so sure. There are times where you really want to know that things are not working*. Think of this like an "asset" in the code.
Intead, the plugin should be doing its work as you say, and don't call the service if parameters are not sane.
*For example: with this error you now know that you were using not needed plugins.
Last edit: 8 years 4 months ago by Antonio Durán.
Please Log in or Create an account to join the conversation.
- gvitry
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 11
8 years 3 months ago #4
by gvitry
Replied by gvitry on topic XMLRPC on Hikashop hook
Hi Antonio,
Sorry for the late reply, we have been very busy. Thanks for your input. After disabling the plugin "group" we've retrieved our normal process. Meanwhile, we have :
updated our Joomdle sub status
updated Joomla, Moodle, joomdle to the very last release
We are now experiencing a new problem since. The users buying a course through HikaShop are created and synced into Moodle but no longer enrolled in the corresponding course.
BTW, looking at the previous students who were registred in this course before, they are all marked as manually enrrolled whereas we never did it. They were enrolled through the Joomdle process. However still marked as "manual" in Moodle.
I do not have error message elsewhere. Here are our plugins :
Would you have a suggestion from where to start to understand what is broken in our setup ?
Thansk
Sorry for the late reply, we have been very busy. Thanks for your input. After disabling the plugin "group" we've retrieved our normal process. Meanwhile, we have :
updated our Joomdle sub status
updated Joomla, Moodle, joomdle to the very last release
We are now experiencing a new problem since. The users buying a course through HikaShop are created and synced into Moodle but no longer enrolled in the corresponding course.
BTW, looking at the previous students who were registred in this course before, they are all marked as manually enrrolled whereas we never did it. They were enrolled through the Joomdle process. However still marked as "manual" in Moodle.
I do not have error message elsewhere. Here are our plugins :
Would you have a suggestion from where to start to understand what is broken in our setup ?
Thansk
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7930
8 years 3 months ago #5
by Antonio Durán
Replied by Antonio Durán on topic XMLRPC on Hikashop hook
Hi.
Did you upgrade Joomdle Hikashop plugin? With Joomdle 1.2, you need to upgrade this one:
www.joomdle.com/download/category/16-hik...=59:hikashop-profile
And then select Hikashop category in Joomdle configuration in Joomla.
> BTW, looking at the previous students who were registred in this course before, they are all marked as manually enrrolled whereas we never did it. They were enrolled through the Joomdle process. However still marked as "manual" in Moodle.
Joomdle uses the manual enrol method for enroling users, as it is always available, so this is correct.
Did you upgrade Joomdle Hikashop plugin? With Joomdle 1.2, you need to upgrade this one:
www.joomdle.com/download/category/16-hik...=59:hikashop-profile
And then select Hikashop category in Joomdle configuration in Joomla.
> BTW, looking at the previous students who were registred in this course before, they are all marked as manually enrrolled whereas we never did it. They were enrolled through the Joomdle process. However still marked as "manual" in Moodle.
Joomdle uses the manual enrol method for enroling users, as it is always available, so this is correct.
Please Log in or Create an account to join the conversation.
- gvitry
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 11
8 years 3 months ago #6
by gvitry
Replied by gvitry on topic XMLRPC on Hikashop hook
Indeed we are now using Joomdle 1.2.
System verification check is all good.
I've installed the plugin you indicated. Here the list of the joomdle plugin installed and version :
I can't select an hikashop category. The dropdown is empty. However, we have a special category in which all of you Moodle courses are. I'm pretty sure this field was set before. Now we have :
Finally, looking at the courses in the joomdle "shop" panel. I'm wondering what should be between the parentheses on front of each course's title ? The category ?
System verification check is all good.
I've installed the plugin you indicated. Here the list of the joomdle plugin installed and version :
I can't select an hikashop category. The dropdown is empty. However, we have a special category in which all of you Moodle courses are. I'm pretty sure this field was set before. Now we have :
Finally, looking at the courses in the joomdle "shop" panel. I'm wondering what should be between the parentheses on front of each course's title ? The category ?
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7930
8 years 3 months ago #7
by Antonio Durán
Replied by Antonio Durán on topic XMLRPC on Hikashop hook
I am sorry, I copied the wrong link. Correct one is:
www.joomdle.com/download/category/16-hik...shop-selling-courses
I see you need to upgrade, as you are running v1.0.2.
> Finally, looking at the courses in the joomdle "shop" panel. I'm wondering what should be between the parentheses on front of each course's title ? The category ?
It should be showing course shortnames.... not sure why it is not showing yours.
www.joomdle.com/download/category/16-hik...shop-selling-courses
I see you need to upgrade, as you are running v1.0.2.
> Finally, looking at the courses in the joomdle "shop" panel. I'm wondering what should be between the parentheses on front of each course's title ? The category ?
It should be showing course shortnames.... not sure why it is not showing yours.
Please Log in or Create an account to join the conversation.
- gvitry
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 11
8 years 3 months ago - 8 years 3 months ago #8
by gvitry
Replied by gvitry on topic XMLRPC on Hikashop hook
Congratulation ! That's did it. Many thanks.
Also solved the alias problem.
BTW, we have a lot of courses. Do you plan to filter the lists ? At least published/unpublished ones ?
Also solved the alias problem.
BTW, we have a lot of courses. Do you plan to filter the lists ? At least published/unpublished ones ?
Last edit: 8 years 3 months ago by gvitry.
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7930
8 years 3 months ago #9
by Antonio Durán
Replied by Antonio Durán on topic XMLRPC on Hikashop hook
Great, thanks for the feedback.
As for filtering: I think it is a good idea, so I will add it to my TODO list for next release. Thanks for the suggestion.
As for filtering: I think it is a good idea, so I will add it to my TODO list for next release. Thanks for the suggestion.
Please Log in or Create an account to join the conversation.