Followup to #2506163: Complete the initial product architecture.

For the add to cart form we need a way to get all enabled variations of a product.

This means getting the variation ids referenced by the product, loading only the enabled ones (status = TRUE), then running an event on them (COMMERCE_PRODUCT.FILTER_VARIATIONS) to get the final list.

This should be implemented in a VariationManager (using the variation storage and the entity dispatcher as dependencies), with a getEnabledVariations($product) method. This will allow the logic to be easily swappable.

Comments

  • cbanman committed f29359e on 8.x-2.x
    Issue #2511252 by cbanman: Create a service for getting enabled product...
  • bojanz committed fe74f62 on 8.x-2.x
    Merge pull request #224 from crbanman/8.x-2.x
    
    Issue #2511252 by cbanman...
bojanz’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.