Closed pdpinch closed 2 years ago
While looking around this I didn't find any specific settings/feature flag to disable the upgrade of a button but there are other simpler ways that we can use as mentioned below:
Verified
course mode or the deadline of the Verified
course mode is in the past the upgrade button will hide automatically from the frontend.If possible, we'd like to hide the upgrade button, until we turn on the ecommerce system early next month
The upgrade button displays, even though we're not ready to start taking payments through mitxonline
Possible Solutions:
Verified
course mode set up for that in edX or we should set the upgrade_deadline
in the past if that is feasible.Verified
course mode, it might be a case where we want two services e.g. Micromasters & MITxOnline to use the same edX instance where Micromasters needs Verified
mode and MITxOnline doesn't. In this case even if there was a setting in edX that might not have been useful. In this case we might have to hide the upgrade button intentionally from our MITxOnline fork of https://github.com/mitodl/frontend-app-learning.When the learner clicks the button, it should take them to the mitxonline checkout page, with the correct course in their basket
It will start working when we setup our external-checkout-plugin in production as mentioned in https://github.com/mitodl/hq/discussions/227#discussioncomment-3517802
Unfortunately, the verified course mode is a requirement because the course team needs to do some authoring with cohorts -- they want to start working on the exam which should only be seen by learners in the verified mode.
I'll try setting the date into the past.
Ok, setting the start date in the past hides the button, but I've been reminded that we also want the upgrade date to display in the course Important Dates.
@mitodl/devops Can we set MARKETING_SITE_CHECKOUT_URL
to https://micromasters.mit.edu/dashboard/
only for the mitoxonline production open edX?
@arslanashraf7 devops tried setting MARKETING_SITE_CHECKOUT_URL
to https://micromasters.mit.edu/dashboard/
in production, but it didn't seem to work. They're not sure if it's set in the right place to be included in the Learning MFE build. Can you take a look?
@arslanashraf7 devops tried setting
MARKETING_SITE_CHECKOUT_URL
tohttps://micromasters.mit.edu/dashboard/
in production, but it didn't seem to work. They're not sure if it's set in the right place to be included in the Learning MFE build. Can you take a look?
Taking a look, Will keep you posted
MARKETING_SITE_CHECKOUT_URL
key is not part of edX setting it was added to support our own plugin.
So i was looking at it and below are the possible solutions:
If external checkout plugin is configured on production:
admin/commerce/commerceconfiguration
) - I suppose the value for Basket checkout page
is set to dashboard
in which case, to redirect this to external checkout plugin we need to set /checkout-external/
as value for Basket checkout page
. After setting this, it should redirect the user to MARKETING_SITE_CHECKOUT_URL
with a query param course_id
e.g. https://micromasters.mit.edu/dashboard/?course_id=course-v1%3AMIT%2BMIT_RR_1%2BR1
.If external checkout plugin is not configured on production:
MARKETING_SITE_CHECKOUT_URL
and the value would be https://micromasters.mit.edu
without the dashboard
. It would be appended from the ecommerce configuration value set through Django Admin which is already dashboard
i think.FYI, @pdpinch @blarghmatey
Follow up on my above comment:
@blarghmatey Just wanted to confirm something, This line means that the ol-openedx-external-checkout
plugin is installed in production too, Could you please confirm?
If the answer to the above is YES, We will need to do the following (I don't have production access to do the below):
admin/commerce/commerceconfiguration
in production and add a configuration with value of Basket checkout page=/checkout-external/
.SKU
value setWith the above changes, @blarghmatey 's This PR should start working and it should start taking the user to Micromasters with links that would look like https://micromasters.mit.edu/dashboard/?course_id=<course_id>
.
FYI, @pdpinch
Thanks for those details @arslanashraf7, you are correct that the ol-openedx-external-checkout
plugin is installed with the line that you linked.
@pdpinch let me know if you want me to do any of that admin setup, otherwise I'll assume that you're going to take it from here.
We fixed this today. The ol-infrastructure code will need to be updated again when we switch from micromasters to mitxonline for payment.
Steps to Reproduce
Expected Behavior
Actual Behavior