Shop / e-Commerce Integration

Multiple Data Sources mapped to Moodle?

More
10 years 1 month ago #1 by ACM
Hi,

Joomla 3.5.1, Joomdle 1.0.5, Hikashop 2.6.2, Easy Profile 1.4.

I love your product and am working on profile integration between Joomla/Hikashop/EasyProfile and Moodle. I have a situation similar to that discussed here: www.joomdle.com/forum/shop-e-commerce-in...ng-help-needed#18346

I would like to map Hikashop address fields to the Moodle profile AND map Easy Profile fields to the Moodle profile.

Are multiple data sources allowed, or just one additional data source?

First, I have a production Hikashop currently taking orders and address fields are filled in by the visitors when they register...if they don't buy something, we have captured this data. If they buy, then all is well with the world as the address data is mapped to my custom user fields in Moodle.

But I need more info.

I have added Easy Profile to force a course customer to enter extended demographic information based on the product purchased and give the user the ability to view and edit this info each time they login to Joomla/Shop. I tested, and when Easy Profile is selected as the additional data source, then it's possible to map it's data with custome Moodle profile fields.

But if Easy Profile is the data source, then I'm no longer able to map the Hikashop address data. Is there something I'm missing here or is only one additional data source allowed?

If Easy Profile is the data source, I map and then when I list the data mappings the Hikashop fields are listed but don't show as mapped. If Hikashop is the data source, then the EP fields show mapped to basic Joomla field ID's.

I have considered collecting the extended demographic info as the first Moodle course activity.....through a Database Activity.
Has anyone done that, and would this give the student the ability to view and edit the info similar to having the info in the Moodle profile?

Thanks a million for your product AND support...it takes courage to be involved in all these integrations and plugins!

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

More
10 years 1 month ago #2 by Antonio Durán
Replied by Antonio Durán on topic Multiple Data Sources mapped to Moodle?
Hi. Thanks for your kind works, we really appreciate it.

As for your question: right now there is no way to do what you want, as you can only have one additional data source.

That said, I remember at one point in the past I created a new plugin for a client to be able to sync from a different data source, aside from the main one configured in Joomdle.
I think I never got to release it, as there was no demand for it at the time, and I guess I forgot about it.
So, what I will do is try do dig that up this weekend, and see how much work could it take to have a working solution, and get back to you.

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

More
10 years 1 month ago #3 by ACM
Replied by ACM on topic Multiple Data Sources mapped to Moodle?
Hi Antonio,

Thanks for the offer to look into a possible solution! If you didn't have a chance to look into it this past weekend, do you have an estimate on when you'd have an answer for us, one way or another? Many thanks!

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

More
10 years 1 month ago #4 by Antonio Durán
Replied by Antonio Durán on topic Multiple Data Sources mapped to Moodle?
Hi.

Sorry for the slow reply, I could not look into it last weekend.
I have done it now, and it seems you could have what you need, even if it is not perfect yet.

I am attaching the new plugin to select an extra data source.

File Attachment:

File Name: plg_user_j....0.0.zip
File Size:1.99 KB


In order to make it work, yo would need to:
- Install and enable, and configure to use Easyprofile
- Select Easyprofie in Joomdle general configuration, additional data source, for a little bit. This will let you create the Easyprofile mappings in Joomdle->Mappings
- Once you have created the mappings, set it back to Hikashop
- Edit the Joomdle-Easyprofile profle plugin
File: plugins/joomdleprofile/joomdleeasyprofile/joomdleeasyprofile.php
Function: integration_enabled ()
You need to put this at the start of the function:
return true;
This is because we use this function to only execute plugin when it is configured, and so it would not execute in your case once you set Hikashop as the "normal" additional data source.

Please test and let us know how it goes.

If everything works fine, I could work on some more changes to make this more user friendly, and release the plugin:
- Allow creation of mappings with any of the data sources configured in Joomdle general config, or in this new plugin
- Allow for the execution of the profile plugins when they are selected in this new plugin

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

More
9 years 7 months ago #5 by Eric vanBok
Replied by Eric vanBok on topic Multiple Data Sources mapped to Moodle?
Did anyone ever get this to work?

I too would like to map fields between Easy Profile, HikaShop, and Moodle. I am essentially looking for a solution that will allow someone to add items the cart as a guest, get to checkout in HikaShop and then register for an account in HikaShop, populating the fields needed in Moodle and Easy Profile.

Would your plugin allow this to happen?

If so I can start testing it to see if I can indeed get it to work this way. Let me know if there is a newer version of this plugin out there to test.

Thank you.

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

More
9 years 7 months ago #6 by Antonio Durán
Replied by Antonio Durán on topic Multiple Data Sources mapped to Moodle?
> populating the fields needed in Moodle and Easy Profile.

No, that's not possible.
What this plugin allows is to map fields from Hikashop and Easyprofile to Moodle, not syncing between Hikashop and Easyprofile.

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

More
9 years 5 months ago #7 by ACM
Replied by ACM on topic Multiple Data Sources mapped to Moodle?
Hi Antonio,

My test platform: Joomla 3.6.5, Joomdle 1.0.8, Hikashop 2.6.3, Easy Profile 2.2.3, Moodle 3.2.1

I've finally had a chance to return to this and run some tests, so thanks for everyone's patience!

Following your instructions, I successfully created the mappings, set data source back to Hikashop, and edited the Joomdle-Easyprofile profle plugin with your "return: true;" mod.

If Hikashop is selected as the data source, then edits to any extended EasyProfile fields (on the Joomla site by a logged-in visitor) are NOT changed in Moodle, even though they are mapped...this was expected.

If EasyProfile is selected as the data source then these edits ARE SUCCESSFULLY changed in Moodle automatically.

What we now need is for both data sources to be active at the same time where any changes to EasyProfile and/or Hikashop fields are changed in the Moodle profile without the need for switching in Joomdle Config, only the nice setup as you suggested for a new plugin.

We would be more than grateful if you could proceed with the changes required for best execution and user friendliness in a new plugin.

Thanks again for getting this test plugin out to us back in May, and you have my continued appreciation for a fine software product!

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

More
9 years 5 months ago #8 by Antonio Durán
Replied by Antonio Durán on topic Multiple Data Sources mapped to Moodle?
Hi .

Good timing here: I was working on a project with the same need just yesterday.

I found that latest Joomdle changes had made this plugin not to work fine. Also, I didn't like how it worked before, as it was not efficent.
So, to make this work you would:
- Install Joomdle latest release in Joomla and Moodle
- Disable/uninstall the additional data source, as it is no longer required
- Make a modification in Joomdle code, that will appear on next release:
File: administrator/components/com_joomdle/helpers/mappings.php
Function: get_user_info ()
Change:
Code:
$more_info = $info; break;
By:
Code:
$more_info = array_merge ($more_info, $info);

- Remeber you also need to modify Easysocial plugin manually as suggested in my second post. I shall think of a way to make this work without needing to modify files for a future release.


Please try and let us know.

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

More
8 years 7 months ago - 8 years 7 months ago #9 by ACM
Replied by ACM on topic Multiple Data Sources mapped to Moodle?
Hi Antonio,

I'm back on this again with updated software on the test platform and ready to resolve this solution with you.
Joomla 3.8.1, Joomdle 1.1.14, Hikashop 3.2.1, Easy Profile 2.4.7, Moodle 3.3.2, PHP 5.6.32. Not using PHP 7 yet.

I wanted to clarify your instructions again before proceeding with tests.

Disabled the plugin: Joomdlesource user plugin 1.0.0.
The manual edits to mappings.php was already done by you in the latest version. No edits by me.
Enabled plugin: Joomdleprofile - Joomdle Easyprofile profile 1.0.4.
Edited the File: plugins/joomdleprofile/joomdleeasyprofile/joomdleeasyprofile.php
Function: integration_enabled ()
return true; //at the beginning of the function.
Joomdle Configuration: Manually set add'l data source to Hikashop and then mapped fields.
Joomdle Configuration: Manually set add'l data source to Easy Profile and then mapped fields.

Please let me know if this looks good so far, and I'll proceed with testing.

Will I have to manually switch the data source back and forth between EasyProfile and Hikashop in Joomdle Configuration during my testing?

Thank you!
Last edit: 8 years 7 months ago by ACM.

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

More
8 years 7 months ago #10 by Antonio Durán
Replied by Antonio Durán on topic Multiple Data Sources mapped to Moodle?
Hi.

That sounds right. Only one more step:
Manually set add'l data source to Hikashop back again once you finish with mappings.

> Will I have to manually switch the data source back and forth between EasyProfile and Hikashop in Joomdle Configuration during my testing?
You should not need to.
That said, if it doe snot work as expected, first try testing each plugin alone to confirm it is working fine.

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