wg-build-test-release icon indicating copy to clipboard operation
wg-build-test-release copied to clipboard

In ecommerce, some currency symbols are hardcoded to "$"

Open regisb opened this issue 3 years ago • 8 comments

This issue was first reported here: https://discuss.overhang.io/t/currency-is-not-changing-on-e-commerce-course-administration/2422

There are several ecommerce templates where "$" or "USD" is hardcoded:

https://github.com/openedx/ecommerce/blob/2c2c13f541891af1c3641a542546972d54a2fd2c/ecommerce/static/templates/_course_seat.html#L6 https://github.com/openedx/ecommerce/blob/2c2c13f541891af1c3641a542546972d54a2fd2c/ecommerce/static/templates/_course_credit_seats.html#L24 https://github.com/openedx/ecommerce/blob/2c2c13f541891af1c3641a542546972d54a2fd2c/ecommerce/static/templates/honor_course_seat_form_field.html#L5 https://github.com/openedx/ecommerce/blob/2c2c13f541891af1c3641a542546972d54a2fd2c/ecommerce/static/templates/audit_course_seat_form_field.html#L5

According to the discussion above, there may also be some places in the payment MFE (with cybersource) where the "$" symbol is present.

regisb avatar Feb 04 '22 22:02 regisb

I'm a new contributor and I'd like to try fixing this issue. Do I need to be assigned or is it okay to just submit a PR once I've completed the work?

lxmmxl56 avatar Aug 18 '22 01:08 lxmmxl56

You can start working on it @lxmmxl56, I'll assign it to you.

BbrSofiane avatar Aug 22 '22 09:08 BbrSofiane

Is this still an open issue? I would be happy to take a stab.

If yes, what is the desired behavior here? The currency symbol should reflect the currency set in the yaml file? I don't have to worry about the prices themselves or anything right? Do I need to do something like this? Or is gettext('$') going to suffice?

If you point me to a template that had the desired behavior currently implemented, I can just copy that to the places where the values are hardcoded.

wasuregusa18 avatar Jan 06 '23 04:01 wasuregusa18

Thanks for volunteering @wasuregusa18! The currency symbol should reflect the value of the PAID_COURSE_REGISTRATION_CURRENCY and COURSE_MODE_DEFAULTS["currency"] Django settings. I am not quite sure if there are existing places in the code base that you could try to emulate. It seems to me that you could use the add_currency python utility function, but I am absolutely not 100% sure of that.

regisb avatar Jan 06 '23 12:01 regisb

I left a comment in the PR: https://github.com/openedx/ecommerce/pull/3891#issuecomment-1476302718

mariajgrimaldi avatar Mar 20 '23 14:03 mariajgrimaldi

This issue is blocked since the PR solving it has yet to be reviewed.

mariajgrimaldi avatar May 15 '23 16:05 mariajgrimaldi

Update: no movement in the PR.

mariajgrimaldi avatar Sep 05 '23 14:09 mariajgrimaldi