Purchasable entities need to belong to stores.
AddToCartForm has the following code:

// @todo Add getStores() to the PurchasableEntityInterface.
$stores = $entity->getProduct()->getStores();

To make the form work with any purchasable entity, we should add getStores() to PurchasableEntityInterface, implement it in ProductVariation (by returning the product's stores).

Comments

bojanz created an issue. See original summary.

  • bojanz committed 9a4dc97 on 8.x-2.x
    Issue #2788649: Add getStores() to PurchasableEntityInterface
    
bojanz’s picture

Status: Active » Fixed

Done.

Status: Fixed » Closed (fixed)

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