Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cbildstein created an issue. See original summary.

cbildstein’s picture

Patch for using the variation SKU if it's available.

wengerk’s picture

Many thanks for your contribution.

It seems the change break our tests (which is good - it means we cover the case).
May you update the tests strategy in the patch ?

wengerk’s picture

Status: Active » Needs work
Issue tags: +Needs tests
smccabe’s picture

smccabe’s picture

Re-roll against specifically against alpha2 as well, if anyone is using this patch currently.

cbildstein’s picture

Aerzas’s picture

Version: 8.x-1.x-dev » 8.x-2.x-dev
Status: Needs work » Needs review
Issue tags: -Needs tests
FileSize
11.15 KB

Here is an update of the patch against the `8.x-2.x-dev` branch:
- Removed the condition as the `sku` is required for a product variation to be valid
- Updated unit, kernel and functional tests

agoradesign’s picture

+1 for this change!

The premium solution would make this behaviour configurable, making it easier to stay BC (however we're in beta version, so we don't have to worry too much about this). But one thing that would be nice: firing a dedicated Drupal/Symfony event for altering the ID key (for products and any other purchasable entity), if any custom solution is needed. Right now we could do this with AlterEventDataEvent, but this can be a little bit cumbersome, as we only have the GTM event data there without any context