check a online-shop after user login

check a online-shop after user login

by Sven Mendler -
Number of replies: 1

hello,

i want to link a online shop to moodle.

the user use the moodle login to connect to moodle. before the user can work with moodle a new script check in the oscommerce whether the user has ordered and paid the course.

in the shop database exists a field which defined the status of the order. if the status is defined as "paid" then the user can use the course.

if there is no order where these user has ordered these course then opened a new window with the shop. the course (is like a product in the shop) is placed into the basket.

my question:

in which login file and where into these file i have to include my check functions ?

thanks for your help !!

sven

Average of ratings: -
In reply to Sven Mendler

Re: check a online-shop after user login

by Sven Schneider -

Hello Sven,

nice to meet you here wink

I would suggest to implement a enrolment-plugin wink. Look in your Moodle-folder, there is a folder named "enrol" (as far as I know you have Moodle 1.4.1). There you can create a directory for your plugin, write a class enrolment_plugin, which extends the "enrolment_base" (see enrol.php in moodle/enrol) and overwrite the functions as you want. How this is done, you can see in the other enrolment-plugins...

For example overwrite "check_entry()" to look, if the user has paid, in "print_entry" you could inform your students that he has to pay for the course and put a link to your shop...

Hope that helps,

Sven Schneider