- Issue created by @ts.ag
Fixed missing CommerceSettings param in ProductVariationTypeForm constructor.
Added user data override for config, now there's an "override for me" option besides the global setting.
From a dev/admin/editor multitab workflow perspective, redirects can be a pain when adding or repeatedly saving something while also checking the outcome in separate tabs.
Attached is a patch that introduces a config form at /admin/commerce/config/settings
with an option to toggle the new OFF (default) or ON, which will enable or disable the redirects towards the collection or canonical URL from the add/edit forms of the majority of the Commerce entity forms.
To make this work, circumventing Drupal core's use of the destination
query parameter is also needed, so path processors have been added to each Commerce module to toggle it from the query string of their respective relevant outbound paths, depending on the newly introduced setting.
Redirects that can now be toggled towards edit-form
with Multitab Workflow:
CheckoutFlowForm
- instead of collection
NumberPatternForm
- instead of collection
OrderTypeForm
- instead of collection
OrderItemTypeForm
- instead of collection
PaymentGatewayForm
- instead of collection
CurrencyForm
- instead of collection
ProductAttributeForm
- instead of collection
, if the entity is NOT newProductTypeForm
- instead of collection
ProductForm
- instead of canonical
, when selecting "Save" as opposed to "Save and add variations"ProductVariationTypeForm
- instead of collection
ProductVariationForm
- instead of collection
for the parent Product
PromotionForm
- instead of collection
, when selecting "Save" as opposed to "Save and add coupons"CouponForm
- instead of collection
for the parent Promotion
StoreTypeForm
- instead of collection
StoreForm
- instead of collection
TaxTypeForm
- instead of collection
The other existing redirects are left as persistent, most notably:
OrderForm
- towards canonical
ProductForm
- towards ProductVariation
's collection
for this Product
, when selecting "Save and add variations"PromotionForm
- towards PromotionCoupon
's collection
for this Promotion
, when selecting "Save and add coupons"One redirect has been changed but also remains persistent:
OrderUnlockForm
- from collection
to canonical
, to match the other Order
formsNeeds review
2.0
Developer experience
Fixed missing CommerceSettings param in ProductVariationTypeForm constructor.
Added user data override for config, now there's an "override for me" option besides the global setting.