Shopping Cart

Enrolment ::: enrol_cart
Maintained by MohammadReza PourMohammad
This is a complete shopping cart plugin for Moodle that adds a "Cart" enrolment method to courses, allowing users to add courses to their cart and complete the payment using the available payment methods in Moodle.
Latest release:
40 sites
90 downloads
6 fans
Current versions available: 1

Moodle Cart Enrolment Method

This is a complete shopping cart plugin for Moodle that adds a "Cart" enrolment method to courses, allowing users to add courses to their cart and complete the payment using the available payment methods in Moodle.

Users can view their shopping cart using the cart icon in the top navigation bar and see their purchase history through the "My Purchases" option in the user menu. Additionally, users can add courses to their cart before logging in, with the cart information stored in a cookie. After logging in, the cart is transferred from the cookie to the database, allowing the user to complete the payment.

This plugin allows the admin to set a discount amount or percentage for each course. Additionally, by implementing the enrol_cart\local\object\coupon_interface class and setting the coupon_class in the cart enrollment settings, users can use discount coupons during checkout.

Key Features

  • Shopping Cart Enrolment Method:
    Adds a "Cart" enrolment method to courses, enabling users to easily add one or more courses to their shopping cart and complete payment using Moodle's available payment gateways.

  • User-Friendly Cart Management:
    Users can access their shopping cart through the cart icon in the top navigation bar and review their purchase history via the "My Purchases" option in the user menu.

  • Seamless Shopping Experience:
    Users can add courses to their cart even before logging in. The cart information is stored in a cookie and automatically transferred to the database once the user logs in, allowing them to complete their purchase without losing any items.

  • Discount Management:
    Administrators can set discount amounts or percentages for individual courses. The plugin also supports discount coupons, which can be used during checkout by implementing the enrol_cart\local\object\coupon_interface class and setting the coupon_class in the cart enrolment settings.

Screenshots

Screenshot #0
Screenshot #1
Screenshot #2
Screenshot #3
Screenshot #4
Screenshot #5
Screenshot #6
Screenshot #7
Screenshot #8

Contributors

MohammadReza PourMohammad (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

הצגת הערות
  • Plugins bot
    12/10/2024, 22:10
    Approval issue created: CONTRIB-9715
  • Tetrafact Team
    20/01/2025, 07:06
    guest checkout doesn't work even if "Allow guests to add and remove courses from cart" was selected
  • MohammadReza PourMohammad
    21/01/2025, 03:37
    Guest users can only add or remove courses from the cart. To proceed with checkout and complete the purchase, they need to log in to the site.
  • Tetrafact Team
    27/01/2025, 09:10
    is there any transactions spreadsheet? and in order to see description on my Paypal Transactions i had to change in payment.php $description = $CFG->wwwroot . ' - ' . reset($cart->items)->course->title;
  • The transactions section is separate from the cart section, but the shopping cart report plugin will be released soon.
  • Nyasha Mukura
    5/03/2025, 06:27
    I'm having this error message when I try to pay for cart items using PayPal: "Exception - enrol_cart\local\helper\payment_helper::is_payment_gateway_valid(): Argument #1 ($gatewayname) must be of type string, null given, called in [dirroot]/enrol/cart/payment.php on line 88"
  • MohammadReza PourMohammad
    24/04/2025, 13:28
    What Moodle version are you using?
Please login to post comments