Skip to content
This repository has been archived by the owner on Jun 7, 2022. It is now read-only.

Onboarding: Update product slugs to product IDs in product types #2666

Closed
joshuatf opened this issue Jul 17, 2019 · 3 comments · Fixed by #2841
Closed

Onboarding: Update product slugs to product IDs in product types #2666

joshuatf opened this issue Jul 17, 2019 · 3 comments · Fixed by #2841
Assignees

Comments

@joshuatf
Copy link
Contributor

Seems like the product IDs will be a safer option to both grab products from the WCCOM API and also pre-fill the WCCOM cart later on based on the discussion in https://github.com/Automattic/woocommerce.com/issues/6067.

https://github.com/Automattic/woocommerce.com/pull/6131 adds in the ID to the response from WCCOM so we can use that to determine prices and product descriptions in the profiler in get_allowed_product_types().

@joshuatf joshuatf added this to wc-admin Backlog 🔙 in Isotope via automation Jul 17, 2019
@dwainm
Copy link
Member

dwainm commented Jul 17, 2019

Posting for visibility:

The proposed API:

https://woocommerce.test/cart/?wccom-cart=390890,27147&wccom-site=https://biz.test&wccom-back=https://biz.test/admin

Product ids => wccom-cart=390890,27147
Site so we know where they are coming from => wccom-site=https://biz.test
Back so we know where to take them to => wccom-back=https://biz.test/admin

PR for adding this new endpoint:
https://github.com/Automattic/woocommerce.com/pull/6134

@psealock psealock moved this from wc-admin Backlog 🔙 to Onboarding Backlog 🔙 in Isotope Jul 23, 2019
@dwainm
Copy link
Member

dwainm commented Aug 15, 2019

@joshuatf After some chats in our team we've settled on this final url structure:

https://woocommerce.test/cart/?wccom-replace-with=1907128,1922995,1822936,1822936,1770503

The comma can be URL encoded to %2c.

Note that this is limited to the cart page and will redirect the user to the checkout after adding n number of products.

@dwainm
Copy link
Member

dwainm commented Aug 19, 2019

We are having multiple issues bundles and are thinking about possibly re-architecting the way they work. For this reason, bundles will not be supported by the initial version of this API.

cc @alanabweinstein @mattyza @haszari

@joshuatf joshuatf self-assigned this Aug 26, 2019
Isotope automation moved this from Onboarding Backlog 🔙 to Done Sprint 24 (August 27 - September 9) Aug 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants