Closed semteacher closed 8 months ago
Obviously, this should not occur, but we believe it's linked to faulty entries in DB which should not be created anymore.
Best way seems to reinstall shopping cart. you could also truncate your payment table.
@georgmaisser Issue was in the list of parameters for get_records() method
Fixed by @semteacher
After upfate to the version 2024031401 (and at least 1 previous), the followitn debug message appears in control pane OR on the "checkout" page:
Additionally, on the "checkout" page the following debug message appears
Did you remember to make the first column something unique in your call to get_records? Duplicate value '0' found in column '?column?'. line 1066 of /lib/dml/pgsql_native_moodle_database.php: call to debugging() line 1512 of /lib/dml/moodle_database.php: call to pgsql_native_moodle_database->get_records_sql() line 1463 of /lib/dml/moodle_database.php: call to moodle_database->get_records_select() line 1645 of /local/shopping_cart/classes/shopping_cart.php: call to moodle_database->get_records() line 52 of /local/shopping_cart/classes/shopping_cart_credits.php: call to local_shopping_cart\shopping_cart::get_latest_currency_from_history() line 110 of /local/shopping_cart/classes/shopping_cart_credits.php: call to local_shopping_cart\shopping_cart_credits::get_balance() line 702 of /local/shopping_cart/classes/shopping_cart.php: call to local_shopping_cart\shopping_cart_credits::prepare_checkout() line 71 of /local/shopping_cart/checkout.php: call to local_shopping_cart\shopping_cart::local_shopping_cart_get_cache_data()
Amount of debug messages are equal to the amount of items in the shopping cart history.