Shopping Cart
Maintained by
Wunderbyte GmbH, David Bogner
This is a complete shopping cart system for Moodle. Plugins that want to sell items via the shopping cart have to implement a callback function. But you can use the booking plugin in order to sell courses, events and other items. For payments the Moodle payment gateway is used.
Price option: Free
Supports Moodle 4.0-5.1
See all versions
Latest release: 1 week ago
Installations: 125
Downloads (last 90 days): 224
Frankenstyle name:
local_shopping_cart
Plugin type:
Local plugins
Versions
Current version
2.1.0 (2026070300)
Moodle 4.5, 5.0, 5.1
Uploaded on Thursday, 9 July 2026 at 09:45 (GMT+0)
2.1.0
Plugin type: Local plugins
Frankenstyle component name: local_shopping_cart
Version build number: 2026070300
Version release name: 2.1.0
Maturity: Stable
Supported Moodle versions: 4.5, 5.0, 5.1
Repository URL (Git): https://github.com/Wunderbyte-GmbH/moodle-local_shopping_cart
Repository branch:
Repository tag: v2.1.0-stable
Issue/bug tracker URL: https://github.com/Wunderbyte-GmbH/moodle-local_shopping_cart/issues
Version 2.1.0 (2026070300)
- Improvement: If optional VAT number is clicked it gets mandatory.
Version 2.0.9 (2026060300)
- Improvement: Add Apple Pay (AP) and Google Pay (GP).
- Improvement: Detailed user feedback for vat checker.
- Bugfix: Persists checkbox of voluntarily vat number.
- Bugfix: Prevent usage of bfcache to avoid doublebookings.
- Bugfix: Also prevent bfcache with JS.
- Bugfix: Before checkout, make sure identifier has items in shopping cart history.
Version 2.0.8 (2026043000)
- Improvement: Improved vat gb checker.
- Improvement: Disallow buying with system vat number.
- Improvement: replaced modal factory with core modal (for Moodle 5.2 compatibility).
- Improvement: add UK back to the VAT Number helper.
- Bugfix: Add missing default for roundrefundamount.
Version 2.0.7 (2026032600)
- New feature: Show canceluntil in shopping cart history.
- Improvement: Get rid of legacy code for moodleversionminfourtwo CSS stylings.
- Improvement: Show count label so we can reset filters in cash report.
- Bugfix: Do not load any deleted, suspended or unconfirmed users.
- Bugfix: Fix several bugs with cancelation fee (also fixed rounding issues).
- Bugfix: Fix broken export of filtered cash report if setting 'downloadcashreportlimit' is applied.
Version 2.0.6 (2026030200)
- Bugfix: Make sure most recent history item actually returns most recent history item.
- Improvement: Better error message when no account is present.
- Bugfix: Blank paymentprovider list.
Version 2.0.5 (2026022500)
- Improvement: Add security to increase and decrease items.
- Improvement: Only cashiers can search_users.
- Improvement: Fix wrong language string.
- Improvement: Add cashier to fulltextsearch.
- Bugfix: Fix problem with collapsible sections in shopping cart history shortcode [shoppingcarthistory].
- Bugfix: Don't allow deleting of other addresses.
- Bugfix: Fix logic problem when fetching history items.
- Bugfix: Verify paymentgateway string.
- Bugfix: Make sure we use component and area in combination with itemid.
Version 2.0.4 (2026021000)
- Improvement: The new option 'Round the refund values' has been added to the settings.
- Improvement: Show if final value to refund is rounded based on 'roundrefundamount' settings.
- Improvement: Add a hint which makes user aware when rounding the refund amount is enabled.
- Improvement: Put the interface names in alphabetical order.
- Bugfix: Add area to the query condition to prevent fetching multiple records.
- Test: Fixed Behat test based on new logic.
- Test: Update the Behat tests to reflect the changes related to rounding the refund value.
Version 2.0.3 (2026020500)
- Bugfix: Remove GB & Northern Ireland from list of European countries.
- Bugfix: Increase wunderbyte table dependency (for security hotfix).
- Bugfix: Fix unit test.
Version 2.0.2 (2026010700)
- New feature: Make sure cashier and user have same cart store (cashier can set down payment for user).
- Improvement: Fix incorrect values in the discount field when the cashier attempts to apply a new discount value.
- Improvement: Better margin for shopping cart items in cashier view.
- Bugfix: Never round the price when calculating the refund value.
- Bugfix: Never round the displaying the refund priceto user.
- Bugfix: Make sure sorting of history items does not produce warnings.
Version 2.0.1 (2025121000)
- Improvement: Display the target user's name on the button.
- Improvement: Various adjustments for Bootstrap 5 readiness.
- Improvement: Make sure cart items of user does not contain items of buy for user.
- Bugfix: Remove items from the cart after payment confirmation on the cashier page.
Version 2.0.0 (2025120101)
- Improvement: Now supporting Moodle 4.5+ (skipped support for Moodle 4.1 - 4.4).
Version 1.0.25 (2025120100)
- New feature: Add header and footer to receipts with
and - Improvement: Check whether the user has the cashier capability when trying to get prices for others.
- Improvement: Retrieve the userid from the URL parameters and use it for the get_price external service.
- Improvement: Store and retrieve the user ID using the $_POST and $_GET superglobals.
- Improvement: Call buy_for_user in a separate external class to ensure the user ID is available during the request.
- Improvement: Get paramforuserid as an argument from shortcode to get user ID from URL.
- Improvement: Set the user ID instead of -1 in the reinit() function on the cashier page after applying a discount.
- Improvement: Use actforuser::get_foruserid to cover getting userid from argument or optional param.
- Improvement: Use actforuser::get_foruserid to render the shopping cart history of a user and add a security check.
Version 1.0.24 (2025111000)
- Improvement: Separate template for installments, so it can be reused at other places.
- Bugfix: If for some reason cmid is empty, we re-create the option settings from DB.
- Bugfix: Fix exception when tax not enabled, but prices and installments are.
Version 1.0.23 (2025103100)
- New feature: Bugfix: New VAT checker in checkout process.
- Improvement: Implemented new user-flow, using conditional vatnumber checker.
- Improvement: Moodle 5 - Fix background color for icons on the cashier page.
- Improvement: Fix left join of ledger and schistory and add number of items to cash report.
- Bugfix: Fix errors in shopping cart history list (items were lost because of faulty timestamp conversions).
Version 1.0.22 (2025101400)
- Improvement: Display Payment Pluginnames in cash report table and history list
- Bugfix: Add userstocancel to potential booking event
Version 1.0.21 (2025101300)
- Bugfix: Correctly interpret serviceperiodend for rebookings
- Bugfix: Correctly sort schistory items
- Linting: as per 2025-10 Moodle standards update
Version 1.0.20 (2025100100)
- Improvement: Make Feedback on checkout page more granular
- Bugfix: Revert wrong implementation of service period check
- Bugfix: Avoid unwanted rebooking possibility to rebook
- Bugfix: Fix customer and address creation in ERPNext
- Bugfix: Fix VAT problems for ERPNext invoice
- Bugfix: Fix cashier page with shortcodes
- Bugfix: Display correct info about mandatory VAT checker
- Bugfix: Fix get_history_items webservice
Version 1.0.19 (2025091900)
- Improvement: Show real number of items (also multipliable).
- Bugfix: Set book for user on each iteration of price bookforuser.
- Bugfix: Take out buyforuser singleton.
- Bugfix: Remove duplicated setting expirationtime.
Version 1.0.18 (2025091700)
- Improvement: Improve Javascript performance.
- Improvement: Avoid unnecessary rendering of shortcode.
- Improvement: Code quality - remove multiple empty lines.
- Improvement: Use reinit() instead of removing button node, also use already existing return_item_from_history function.
- Improvement: Performance: Improve buy for user
- Improvement: Update version to support Moodle 5.
- Bugfix: Clean null values in upgrade.php before changing field precision and setting to notnull.
- Bugfix: Add missing setType for name.
- Bugfix: Make sure that a cancelled purchase cannot be rebooked anymore.
- Bugfix: Don't allow cancellation during rebooking process.
- Bugfix: Moodle 5: manual processing controls on the cashier page.
- Tests: Create SoapClientMock class to solve Moodle 5.0/phpunit 11 issues.
- Tests: Fix PHPUnit tests and namespaces for Moodle 5.0.
- Tests: Create separate github action to support Moodle 5.
Version 1.0.17 (2025090400)
- Improvement: Localize prices with format_float.
- Improvement: Use format_float in cash report and improve code quality.
- Improvement: Add [[nritems]] placeholder to receipt.
- Improvement: Add multipliable items.
- Improvement: Apply localized number formatter in convertPricesToNumberFormat.
- Improvement: Static method shopping_cart::save_used_installments_state().
- Improvement: No amount, if only one item or no booking option.
- Improvement: Harden code for sorting date for shopping cart history sections.
- Bugfix: No "item deleted" alerts when increasing or decreasing number of items.
- Bugfix: Fix invoice for format_float.
- Bugfix: PHP 7.4 compatibility.
- Bugfix: Make sure the increase–decrease works correctly with the component callbacks (booking).
- Bugfix: Shopping cart price multiplication fix.
Version 1.0.16 (2025081900)
- Improvement: Add new fields to make items multipliable
Version 1.0.14 (2025072800)
- Bugfix: Fix collapsibles of new structured shopping cart history list feature.
- Bugfix: Fixed annual (yearly) sections in new shopping cart history list collapsible sections feature.
- Bugfix: ERPNext invoice creation
Version 1.0.13 (2025072400)
- Improvement: Add addressbreaks placeholder to receipt
- Bugfix: convert strings to floats in receipt
Version 1.0.12 (2025072100)
- New feature: enable safer pay provider
- Improvement: user experience during checkout process
Version 1.0.11 (2025071600)
- Improvement: Termsandcondition clickable for mobile.
- Bugfix: Newly introduced values of history items (timecreated, timemodified, serviceperiodstart, serviceperiodend) were missing in execute_returns() function of get_history_items webservice.
- Bugfix: Replace hardcoded strings.
- Bugfix: Localize country names.
- Bugfix: Remove addfont roboto.
- Bugfix: Fix json encoding for ERPnext invoices.
Version 1.0.10 (2025071300)
- New feature: Structure shopping cart history into dynamic sections (quarterly, semi-annually...),
including new settings for collapsible sections in shoppingcarthistory shortcode. - New feature: Placeholders for company, total gross, total net and vat.
- Improvement: New function to get company name.
- Improvement: Introduce new error type: LOCAL_SHOPPING_CART_CARTPARAM_PAYMENTACCOUNT.
- Bugfix: Avoid permanent fallback on hardcoded receipt.
- Bugfix: Don't print error in check_for_ongoing_payment when not in debug mode.
- Bugfix: Replace hardcoded values in error message.
- Bugfix: Prevent accessing nonexistent objectkey.
- Bugfix: Add empty check for serviceperiod.
- Bugfix: Require to avoid Exception - Warning: Undefined array key "itemname" for unprivileged roles.
- Bugfix: No paymentaccountid being saved on form submit.
Version 1.0.9 (2025060400)
- Improvement: Accessibility - Remove alt texts for decorative images in shopping cart - as they should not appear in screen readers.
- Improvement: Fix ERPNext invoice creation.
- Bugfix: Address ids & vat number were stored in history but not ledger table.
- Bugfix: Fix unique identifier check and vatnr field precision.
- Bugfix: Fix country name transfer to ERPNext.
- Bugfix: Add context_helper class with fix_page_context function to fix page context for shortcodes.
- Bugfix: Check for empty vatnumber instead of null to fix test.
Version 1.0.8 (2025052102)
- Bugfix: Fix faulty upgrade logic.
Version 1.0.7 (2025052101)
- Improvement: Switch to reusable moodle-plugin-ci.yml workflow.
- Bugfix: Deal with textarea profile fields in receipt.
- Bugfix: When payments are ongoing, we avoid mixing up our payables via the check_for_onfoign_payments.
Version 1.0.6 (2025052100)
- Bugfix: Fix bug when required no identifier being issued properly.
- Tests: Fix broken tests.
Version 1.0.5 (2025052000)
- Improvement: Add Tax countrycode to vatid number
- Improvement: Add company to address, make adress editable
- Improvement: Change vat number to precision 24
- Bugfix: Fix task names
- Bugfix: Billing address needs to be linked after creating new customer
- Bugfix: Fix settings and remove duplicate code
- Bugfix: Avoid users seening checkouts of other users
- Bugfix: Reintroduce check_for_ongoing_payment function on checkout page
- Bugfix: Fix Moodle Code Checker errors
- Bugfix: Fix upgrade and install.xml
- Tests: Temporarily take out failing unit tests
Version 1.0.4 (2025050800)
- Bugfix: Fix Erp Transmission
Version 1.0.3 (2025050500)
- Bugfix: Make sure rebookingfee can never be rebooked.
- Bugfix: Prevent missing context when using format_string in webservice.
- Bugfix: Adding workaround for grunt stale issue.
Version 1.0.2 (2025040400)
- Bugfix: Fixed a bug where modal form did not open because description was null.
Version 1.0.1 (2025032700)
- Bugfix: Fixes for extra receipts in shopping cart history.
Version 1.0.0 (2025032000)
- Improvement: Use persistent storage to harden the checkout process
Version 0.9.59 (2025031200)
- Improvement: Make sure that cancelling is not possible for items marked for rebooking.
- Bugfix: Correctly apply consumption
- Bugfix: Make sure that missing terms and conditions do not break the checkout process.
- Bugfix: Also fix additional terms and conditions.
- Tests: Include time_mock class and first test which makes use of it (rough draft, to be cleaned)
Version 0.9.58 (2025030501)
- Bugfix: Add new reservations table for persistant cart
Version 0.9.57 (2025030500)
- Bugfix: Make sure userid is applied correctly for cashier checkout.
Version 0.9.56 (2025030400)
- Improvement: userinfocard now supports aliases userinfo and userinformation.
- Improvement: Add payment area to shopping cart.
- Improvement: Userinfocard shortcode for shopping cart.
- Bugfix: Global $USER uses id (not userid).
- Bugfix: Fix get_user_data and test.
- Bugfix: Fix tests for Moodle 4.2.
- Bugfix: No button for cancel confirmation if only one item in cart was cancelled.
- Bugfix: Make sure that delete_item task is only scheduled backwards and cart expiration time is set accordingly.
- Test: delete redundant test.
- Test: Next step to fix address tests, but still not working.
- Test: add mocking of soap client to the tests.
Version 0.9.55 (2025021700)
- Improvement: use modal factory checkout manager.
- Improvement: apply taxes if owncountry.
- Bugfix: Display credit bookings correctly even when tax is enabled.
- Bugfix: Make sure combination of vat & taxes is applied correctly.
- Bugfix: Avoid error on empty itemlist.
- Bugfix: Fix some errors in vat checker.
- Bugfix: use cartstore cache for saving values for tax & vat calculation.
- Bugfix: fix option values external classes.
- Bugfix: Add addresses to ledger in all cases.
- Bugfix: Add missing params variable when creating invoice.
- Bugfix: zero price is correctly attached when switching between prepages.
- Bugfix: Fix reload_history webservice by making properties optional.
- Test: finalize behat adjustments to the new UI.
- Test: adjust behat (delays).
- Test: adjust betah to updated UI of vatnr form.
- Test: an attempt to adjust shopping_cart_taxes_VAT_addresses.feature to the UI changes.
- Test: an attempt to fix behat in the shopping_cart_taxes_VAT.feature.
Version 0.9.54 (2025021102)
- Improvement: strings localized, mandatory icon.
- Improvement: Clean checkout template.
- Improvement: deselect address after deleting.
- Improvement: Show terms and conditions optionally.
- Improvement: Delete address.
- Improvement: Refactored class structure.
- Improvement: Body process implementation.
- Improvement: Add missing language string for cachedef.
- Improvement: vatnrchecker get cached data.
- Improvement: Cache address data.
- Improvement: vat nr checker update.
- Improvement: New item setup.
- Bugfix: No error on empty item_list.
- Bugfix: Render checkout manager page when not address is there.
- Bugfix: checkout button, render order.
- Bugfix: only with vat number setting.
- Bugfix: Avoid missing userid message when only showing success.
- Bugfix: Don't use $componentname when it's not defined.
- Bugfix: Make sure that task delete_item is not duplicated involuntarily.
- Bugfix: Don't delete items by duplicated task when we extend expiration time.
- Bugfix: Fix return value for verify purchase.
- Bugfix: Fix sorting of shopping cart history items on cashier.php.
- Bugfix: Don't apply usercredit when input was changed in last moment.
- Bugfix: Show correct items in checkout page.
- Test: setup test environment.
Version 0.9.53 (2025021100)
- Bugfix: Show correct items in checkout page.
Version 0.9.52 (2025020700)
- Improvement: Improvement: Add setting to always return status 1 in verify purchase
- Improvement: Add credit changes to shopping cart history for individual users #125
Version 0.9.51 (2025012900)
- Improvement: Show cancel confirmations in shopping cart history. #124
Version 0.9.50 (2025012200)
- New feature: Cancel confirmations in cash report (#122).
- Improvement: Allow to increase price MUSI-573 #112
- Improvement: Enable cashier to change value of downpayment MUSI-590 #113
- Improvement: Linting (php 7.4 compatibility).
- Bugfix: Don't use implicit int conversion #121
- Bugfix: Missing entity name could create a problem.
- Tests: new behat Scenario: Shopping Cart cashier: use installment and change downpayment (#121)
- Tests: adjust behat to test downpayment along with discount (#121)
- Tests: Add new unit test to test purchase and cancelation with discounts (to be extended).
- Tests: Fix behat and PHPDoc.
Version 0.9.49 (2025011500)
- Improvement: When no credits, it's 0 instead of empty in invoice.
- Improvement: Do not hide receipts for cancelled items. #119
- Bugfix: Fix erpnext.yml.
- Bugfix: Correctly display time in receipt
Version 0.9.48 (2024122000)
- Improvement: Add possibility to differentiate between receipts and extra receipts.
- Improvement: Add default html for extra