The concept of cart item plugins would replace the "module" key of the cart item data, and let core and contrib specify and extend behaviours for different types of cart item. The cart item plugin lifecycle would begin at the add to cart form and end when the cart item is converted into an ordered product. Core should provide a minimum of product and product_kit cart items. Ideally this would also allow us to extend cart items to entities other than nodes - so a custom product entity, or a previous order (for recurring payments), could be added to the cart.

Methods on the plugin should provide modern replacements for the following:

  • add to cart form alters
  • hook_uc_add_to_cart
  • hook_uc_add_to_cart_data
  • hook_uc_cart_display
  • hook_uc_update_cart_item
  • hook_uc_order_product_alter

Comments

longwave’s picture

Issue summary: View changes
TR’s picture

Bump.

longwave’s picture