In the module uc_discounts, I am unable to add a discount.
When I try to add a discount at admin/store/uc_discounts/add my dev site just hangs. I have Backdrop v1.22.2 and the latest release of this module (1.x-2.0.1).
Update: I was using Chrome, but when using Firefox I get a little more information and this is logged in the site reports:
LOCATION xxx/admin/store/uc_discounts/add REFERRER xxx/admin/store/uc_discounts MESSAGE Notice: Array to string conversion in date_limit_format() (line 1171 of xxxxx/web/core/includes/date.inc). SEVERITY notice
and
LOCATION xxx/admin/store/uc_discounts/add REFERRER xxx/admin/store/uc_discounts/list MESSAGE Warning: strtr() expects parameter 1 to be string, array given in strtr() (line 1186 of xxxxx/web/core/includes/date.inc).
Hopefully that gives a clue as to where I might look?
@nattyweb, I think you can string together some things to make this work. Within the module, you could use the "Qualification by Role" discount, creating a role (e.g., "OECD DC") that receives the discount. Then you would need to give that role to qualifying users.
For that, you might be able to accomplish it with Rules (you'll need to enable the Rules UI module), creating rules that add or remove the role from a user if their country is in your specified list.
If that doesn't work, it could be done with a fairly simple module that uses update hooks to do the check and add/remove of role when a user account is created or modified.