We're updating the issue view to help you get more done. 

Remove shoppingcart from edx-platform

Description

Shoppingcart has been almost deprecated for quite some time. As near as it can be determined, the only remaining use of it on edx.org is to handle donations from the dashboard after registering for a course. There are several steps required to complete this removal.

 

Open Questions

 

  • Do we need to show old shoppingcart orders to learners? Do we do this with Ecommerce?

  • Do we care about old unpaid shoppingcart orders? We have gates to keep people from seeing courses they have unpaid orders for, but those orders are now several years old.

  • Are there tests that rely on shoppingcart that we want to keep?

  • The DonationConfiguration mode will need to be moved or deleted, it is referenced in a handful of external places (notably the student dashboard). There is also a site configuration option "ENABLE_DONATIONS" that overrides it, can we use that everywhere instead?

  • What external repositories still reference shoppingcart?

Outline of Work

  1. Move existing functionality to either Ecommerce, or a custom PayPal button. Right now the main blocker to doing this seems to be donations for courses. Functionality to support this exists in Ecommerce, but is currently not being used. Other donations on edx.org use a PayPal button, perhaps we can customize this to pass in a course id that will allow us to recognize the partner revenue in reports.

  2. Once traffic stops flowing, archive the existing shoppingcart database tables in the data warehouse for compliance and reporting needs.

    1. We may need to keep these tables / models around in LMS instead - see Open Questions

  3. Create a PR to remove external references to shoppingcart and replaces the functionality as necessary (see “External Code References”).

  4. Create a migration that removes the shoppingcart tables from edx-platform databases, most shoppingcart code, templates, js, css, etc. and dependent code, but leaves the shoppingcart app itself intact (so migrations can be run).

    1. Determine if the tables are large enough that this migration needs to be faked in production, and those table trickle-deleted. If so create the appropriate DevOps tickets and get their buy-in before merging.

    2. Again, this is only if we don’t need to keep the data around. Either way we should be able to delete almost all of the code inside shoppingcart itself.

  5. Release the initial PR, taking whatever steps are necessary to drop the tables, if necessary.

  6. Create a secondary PR to remove the shoppingcart app and any remaining code / references.

  7. Update the documentation for the next OpenEdx release.

Deletion

Code to be deleted is spread across all of edx-platform, mostly in tests. There is CyberSource configuration in lms/envs that can probably be deleted as part of this, as well as supporting data in the various configuration repositories.

URLs removed would be everything under /shoppingcart/:

  • postpay_callback/

  • receipt/

  • donation/

  • csv_report/

  • /

  • clear/

  • remove_item/

  • add/course/

  • register/redeem/

  • use_code/

  • update_user_cart/

  • reset_code_redemption/

  • billing_details/

  • verify_cart/

  • payment_fake

/instructor/ has a number of URLs that may also be removed if we can confirm they are no longer being used. Mostly reports that only reference shoppingcart, with no ecommerce functionality.

One dependency is listed as belonging to shoppingcart in lms/envs/base.in: "pdfminer.six".

Replacement

Most shoppingcart functionality has been replaced by Ecommerce. As mentioned above, moving the dashboard-based donations will need to happen by either resurrecting the Ecommerce flow or creating a new PayPal flow for course donations.

Target Dates

Accepted (deadline for comments before acceptance): TBD
Removed: TBD
First named release without it: TBD

Risks

It is possible that end-to-end tests against Stage may need to be updated as well. It is currently unknown if any shoppingcart data is being used in other parts of the app, especially in regards to certificates and content gating.

 

Status

Assignee

Unassigned

Reporter

Brian Mesick

Labels

None

Removal Date

None

Deprecation Proposal Accepted Date

None

Priority

Unset