sebsoftnl / moodle-enrol_gwpayments

Other
2 stars 3 forks source link

support coupon check in different localizations #5

Closed vicencarlos closed 2 years ago

vicencarlos commented 2 years ago

When check the coupon to use, it has problems if the localization is not in english.

In some countries we use the ',' instead of '.' to separate decimals.

vicencarlos commented 2 years ago

Sorry Roger. I only want to pull the first commit. The other commits are work in progress. Please reject my pull request.

About the problem with the localization happens in the moment that you check a coupon, and you are in spanish language. The price doesn't refresh.

There is another bug in the javascript. If you chose not to show coupon box in the buy, there is a javascript error in module.js. I solved this way: export const init = () => { if(document.querySelector(SELECTORS.input) !==null) { document.querySelector(SELECTORS.input).addEventListener('blur', performCheck); document.querySelector(SELECTORS.action).addEventListener('click', performCheck); } };

rogiervandongen commented 2 years ago

Hi Carlos,

Before you do all kinds of work, can you please start with posting issues in the issue tracker? Your javascript check/fix should have been done on a different level. The issue is correct, but the javascript should have never been included in the first place when you don't use/show a payment button. I've filed this bug for you under #6.

vicencarlos commented 2 years ago

OK. Please reject de pull request, i'll create the tickets and a different pull request for each correction,

Thanks

rogiervandongen commented 2 years ago

Thanks, Carlos.

Still, I highly advise you to not just start work on your own without consulting and filing issues in the tracker for each error/bug/feature request. We are very actively developing on this plugin and github is only a final push of code that was deemed ready. The main development doesn't take place in github but an intermediate system. This is why it's not advised to "just start your own work" and create pull requests but rather to file reports for everything you find (it's not that your work isn't appreciated, but when it interferes with our own work it's destined to get rejected).

vicencarlos commented 2 years ago

OK no problem. Could you tell me if some of the features that i need for my project are already in your roadmap in order to not maintain my own fork?

These are my needs, and i think may be yours, because i think there are enforced by EU regulations. -Posibility of generating an invoice to the customer with all the mandatory data enforced by EU regulations. -Posibility of generating a return invoice to the customer if the customer ask for unenrollment and the course is not started. In our laws there is a 'right of withdrawal' in online purchases. If the consumer buy something and the service is not yet offered, (f,e, the registration to course happens beffore the start date of the course), he has the right to refund the money. -Posibility of show a legal agreement that must be accepted before the buy, with all the buy conditions and right of the customers.