Skip to content
This repository has been archived by the owner on Jan 15, 2020. It is now read-only.

Subscription Management: Support Bundle Types #222

Closed
manospsyx opened this issue Nov 2, 2017 · 8 comments
Closed

Subscription Management: Support Bundle Types #222

manospsyx opened this issue Nov 2, 2017 · 8 comments

Comments

@manospsyx
Copy link
Member

manospsyx commented Nov 2, 2017

Sub-Tasks

#238
#240
#241

Description

Initially filed as a pair of long-term tasks in https://github.com/Prospress/woocommerce-subscribe-all-the-things/wiki/Roadmap

To make this a bit clearer, here's a breakdown into Tasks:

Level 1 - Deleting Content -- #238

Add support for grouped Product Types:

  • Prevent child PB/CP/MnM items from being deleted and
  • Delegate child item deletions to their parent item (remove everything along with the parent).

Level 2 - Adding Content -- #240

  • Make it possible to Add to Subscription apart from Add to Cart or Sign up.

Still at the design stage. Will need to be done for core types before looking into a bundle-types implementation. See #239.

I think the best place to do it would be in the single-product page itself. Depending on the billing details of the chosen scheme, we could populate a list of Subscriptions and let the user add the product to one of them. Later on, this could be done in the cart page as well, when the user is now prompted to choose a cart subscription. All ideas welcome :)

Level 3 - Editing Content (Switching) -- #241

Add support for grouped Product Types:

  • Basically replicate the Product Bundles Cart Editing UX. Instead of Update Cart, the user will see an Update Subscription button and the rest should be handled automagically.

It's not clear to me yet exactly what should happen when new items are added to a subscription object, but my impression is that in some cases no extra steps should be necessary to "complete" this, e.g. an order. Need to look into WCS switching in detail.

CC @thenbrent @helgatheviking

@manospsyx
Copy link
Member Author

Working on deleting items first seems like the obvious place to start. Allowing deletions of PB/CP/MnM child items is technically a bug right now, so we need to sort this out first.

Eventually, when SATT gets merged into WCS the deletions logic will probably need to be moved into the corresponding extensions.

However, the editing/adding bit is more a "feature" than anything else and SATT could be a good place to keep it -- even long term.

@helgatheviking
Copy link

I agree that the deletion issue is a "bug" at the moment. I am half way through that: preventing child item deletion individually. Need more eyes on the parent deletes it's children (which is weird to write) process.

@manospsyx manospsyx changed the title Subscription Content Switching/Management Subscription Content Management Nov 2, 2017
@manospsyx
Copy link
Member Author

Pushed 0f1babe -- UI tweak in working order: https://cl.ly/1i2a3a3S160Q

Would rather prevent removal of child items application-wide, e.g. throw an exception with a helpful notice when trying to remove a child item directly via REST API, custom code, entering URL manually, or whatever.

manospsyx added a commit that referenced this issue Dec 5, 2017
@manospsyx
Copy link
Member Author

Would rather prevent removal of child items application-wide, e.g. throw an exception with a helpful notice when trying to remove a child item directly via REST API, custom code, entering URL manually, or whatever.

See https://github.com/Prospress/woocommerce-subscriptions/issues/2423#issuecomment-349257237

We actually need hooks inside the maybe_remove_or_add_item_to_subscription view handler to:

  • support "un-doing" of removals and
  • be able to add order notes in the right sequence.

Later on I'd like to circle back to this and work on syncing removals/modifications at a deeper level, however:

  • WC and WCS are not ready for it.
  • Complex types such as Bundles + Composites do not support such a thing in vanilla orders anyway.

I'm not sure if we should enforce something like this to other developers globally -- yes, it will be nice if we can use a lower-level hook to do this, but we'll need to cherry pick specific contexts where this behavior should be enforced (I'd vote for REST API removals/modifications).

For now, I'd love to move on with both L2 and L3 here with what we have in WC / WCS -- and if that proves insufficient, see if we can make tiny meaningful additions that we can roll out in a WCS fix release.

@manospsyx
Copy link
Member Author

For now, I'd love to move on with both L2 and L3 here with what we have in WC / WCS -- and if that proves insufficient, see if we can make tiny meaningful additions that we can roll out in a WCS fix release.

Re-grouping after chatting to @thenbrent --

The final solution will utilize the hooks that will be built for https://github.com/Prospress/woocommerce-subscriptions/issues/2224

In the meanwhile, I'm scoping what's needed for L3 here -- and working on #233 as an interim step to understand how sub switching works. We'll likely bump onto more issues there.

@manospsyx manospsyx changed the title Subscription Content Management Subscription Content Management of Bundle Types Dec 7, 2017
@manospsyx
Copy link
Member Author

After scoping this one and starting work here, I think it makes sense to break this up in 3 parts based on the L1/L2/L3 definitions.

This will allow us to assign the different "levels" to milestones. Let's see how many of those we can confidently add to the 2.1 milestone.

@manospsyx manospsyx changed the title Subscription Content Management of Bundle Types Subscription Content Management: Bundle Types Dec 7, 2017
@manospsyx manospsyx changed the title Subscription Content Management: Bundle Types Subscription Management: Support Bundle Types Dec 7, 2017
@manospsyx
Copy link
Member Author

Pending: #241

Moved to the APFS repository.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants