Further theme support for ECOMMERCE_* settings - #11966
Conversation
|
Thanks for the pull request, @e-kolpakov! It looks like you're a member of a company that does contract work for edX. If you're doing this work as part of a paid contract with edX, you should talk to edX about who will review this pull request. If this work is not part of a paid contract with edX, then you should ensure that there is an OSPR issue to track this work in JIRA, so that we don't lose track of your pull request. To automatically create an OSPR issue for this pull request, just visit this link: https://openedx-webhooks.herokuapp.com/github/process_pr?repo=edx%2Fedx-platform&number=11966 |
|
jenkins run js, please |
9ad15ec to
150ced3
Compare
|
jenkins run python |
| """ Check if the user is activated, if the service is enabled and that the site is not a microsite. """ | ||
| return (user.is_active and self.config.checkout_on_ecommerce_service and not | ||
| helpers.is_request_in_themed_site()) | ||
| return user.is_active and self.config.checkout_on_ecommerce_service |
There was a problem hiding this comment.
@e-kolpakov -- I think if we were to merge this line in, all microsites would begin using the Otto checkout process, correct? This seems like something that we should avoid at the present time because we are not ready to enable Otto for the microsites running on edx.org. I discussed with @mjfrey and @douglashall, and we are thinking that this should be a separate PR to master. Alternatively, we could add a site_id to the commerce configuration model and that would allow for multiple microsites to control their own setups. Thoughts?
There was a problem hiding this comment.
@mattdrayer Right, I missed that commerce config is per-instance as well, not per-microsite. I believe the best course of actions would be to push for model-backed site configuration, but if it's not something we could achieve within the time bounds we have (i.e. before the WL-analytics launch), adding site_id would be an appropriate solution.
Alternatively, this setting can live in microsite config as a separate flag ("USE_OTTO") or as an implicit switch (i.e. if ECOMMERCE_PUBLIC_URL_ROOT is set).
There was a problem hiding this comment.
@mattdrayer ok, than I believe it is safe to close this PR (I'll do that) and just wait for the SiteConfiguration PR to land and implement it in a proper way.
Description: Expands https://github.com/edx/edx-platform/pull/11954 to support checkout on Otto for themed sites/microsites and allows themed site/microsite config to override ECOMMERCE_API_URL and ECOMMERCE_API_SIGNING_KEY