openedx / wg-build-test-release

Open edX Build / Test / Release Working Group
25 stars 15 forks source link

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

Open regisb opened 2 years ago

regisb commented 2 years ago

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.

lxmmxl56 commented 2 years ago

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?

BbrSofiane commented 2 years ago

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

wasuregusa18 commented 1 year ago

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.

regisb commented 1 year ago

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.

mariajgrimaldi commented 1 year ago

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

mariajgrimaldi commented 1 year ago

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

mariajgrimaldi commented 1 year ago

Update: no updates in the PR.

mariajgrimaldi commented 2 weeks ago

E-commerce repos will be archived after Sumac: https://github.com/openedx/public-engineering/issues/22

So, I'm not sure how we can move this forward before that happens because there is no maintainer for the e-commerce repos who can merge or review the PR. I left a comment in the PR asking what we could do before Sumac.

I'll close this issue after Sumac is released.