- First commit to issue fork.
- 🇨🇭Switzerland luksak
I took a first stab at this.
There is an incompatibility with commerce_stock_enforcement. There are errors when clicking one of the actions in the success dialog. The happen because the form state is missing, but we're still extending the
AddToCartForm. Here is the error:TypeError: commerce_stock_enforcement_get_context(): Argument #1 ($entity) must be of type Drupal\commerce\PurchasableEntityInterface, null given, called in /app/web/modules/contrib/commerce_stock/modules/enforcement/commerce_stock_enforcement.module on line 160 in commerce_stock_enforcement_get_context() (line 317 of modules/contrib/commerce_stock/modules/enforcement/commerce_stock_enforcement.module).So I tried to still call
parent::buildForm(), but hide the elements. That works for me so far.I haven't looked into the "Out of stock" button behaviour of commerce_stock so far. I'm using a quite customized add to cart form.
- Merge request !6Issue #3212365: Fixing incompatibility with commerce_stock_enforcement → (Open) created by luksak