Myddleware and Magento

Re: Myddleware and Magento

by Eric Messick -
Number of replies: 4

Hi Stéphane.


I thought I'd check to see if I could help with the Moodle connector. I'm not a developer. I taught myself how to use Unix, Moodle, and set up a server. So I might not be very useful to you.

The main thing I am wanting is for the connector to enrol people into a Moodle course when they buy it in Magento.

You mentioned that you had to manually enter fields for the connector...I'm happy to do this if I can get some direction from you on what to do.

Thanks.
Eric

In reply to Eric Messick

Re: Myddleware and Magento

by Stéphane Faure -

Hi Eric,

Thanks for using Myddleware.

The file to add fields in Magento is src\Myddleware\RegleBundle\Solutions\magento.php

The function to be changed is get_module_fields

However, the best way to modify Myddleware is to redefined class in the custom directory. But it will be a bit tricky if you are nit a developer. Could you tell me what field you need to add ?

Thanks.

Best regards


In reply to Stéphane Faure

Re: Myddleware and Magento

by Eric Messick -

Hi. Forgive my lack of developer skills. I hope I don't waste your time. I was able to get Myddleware to create new students in Moodle when they were added as customers in Magento (see earlier in this thread).

So I THINK that what I'm now trying to figure out is if the magento.php and moodle.php files contain the fields needed so that I can map course purchases in Magento to course enrolments in Moodle. Is that right?

In those php files are the field names directly from the MySQL database fields?

In moodle.php I see the fields for courses. It has 'idnumber' and 'id' I'm not sure the difference?--I can check the database to see if that is the way to figure it out.

It seems like the way to map Magento purchases to Moodle courses is for Magento purchases to have a field that contains the Moodle Course ID number? So that field then maps directly to the Moodle course id field via Myddleware. Does that sound right?

So I think that the 'id' field or the 'entity_id' field under "case 'orders':" in magento.php might be the fields that could contain the Moodle course ID #?

I'm happy to keep going if this is useful. Otherwise, will wait for somebody else to work on it. Thanks!!

In reply to Eric Messick

Re: Myddleware and Magento

by Stéphane Faure -

Hi Eric,

You don't waste our time. It always very interesting to have the feedback from Myddleware users.

If I understand your needs, I guess that you have products in Magento which correspond to courses in Moodle. If yes, I guess you want the Moodle user (which is a Magento customer) be enrolled in a Moodle course (which is a Magento product) each times the customer buy a product in Magento.

We have already done that with Prestashop but not with Magento. We have to improve Magento connector to be able to do the same. Indeed we have to add 2 modules in Magento connector : "Order Items" to get the products bought by the customer and "Products" to get the product catalog.

With the 2 new modules, you will be able to create 2 others rules :

  • Magento products (catalog) to Moodle courses
  • Magento products puchaise to Moodle enrolment

Is that really what you need ?

Have a nice day,

Stéphane