B2B - Hyvä Checkout - Upgrading to 1.1.0
Release 1.1.0 adds Hyvä Checkout 3 compatibility for the Purchase Order and Negotiable Quote checkout flows, and fixes several Negotiable Quote regressions.
The module now requires Hyvä Checkout 1.3.15 or later, or Hyvä Checkout 3.x.
The metapackage's existing ~1.1.0 constraint on the Adobe Commerce checkout also installs its
1.1.1 release, which adds Hyvä Checkout 3 compatibility to the base
Adobe Commerce checkout features.
Notable news
Hyvä Checkout 3 compatibility
- Purchase order and negotiable quote checkouts now work on both Hyvä Checkout 1.3.15+ and Hyvä Checkout 3.
- The purchase order or negotiable quote ID is now carried in the server memo of every checkout component, via a new
serverMemoDataConfigitem (Hyva\EnterpriseCheckoutB2b\Model\Magewire\ServerMemoConfig\CheckoutQuoteReference). Previously only some components carried it, so checkout updates (such as entering a new address) could be saved to the wrong quote.
Negotiable quote layout handles moved to hyva_checkout.xml
The hyva_checkout_negotiable_quote and hyva_checkout_negotiable_quote_locked layout handles are no longer added by
an observer. They are now applied as step updates in src/etc/hyva_checkout.xml, gated by two new custom conditions:
is_negotiable_quote- true while a negotiable quote is checked outis_negotiable_quote_address_locked- true when the seller has set a shipping method on a non-expired quote
Step updates are evaluated for the page and for every Magewire update, which fixes the following:
- Coupon code, store credit and reward points are removed from the negotiable quote checkout again
- Shipping addresses set by the seller are locked in checkout again
- Going back to the shipping step with a locked address no longer fails
The address lock is now determined once per checkout page, mirroring the Luma flow.
The updates are registered for the default (shipping and payment steps), mobile (summary step) and onepage
checkouts.
Custom checkouts
If your project defines its own checkout, it only receives the negotiable quote handles if it declares
parent="default". Otherwise, add the same updates to its steps:
<checkout name="my_checkout">
<step name="shipping">
<update handle="hyva_checkout_negotiable_quote" if="is_negotiable_quote"/>
<update handle="hyva_checkout_negotiable_quote_locked" if="is_negotiable_quote_address_locked"/>
</step>
<step name="payment">
<update handle="hyva_checkout_negotiable_quote" if="is_negotiable_quote"/>
</step>
</checkout>
Template changes
Hyva_EnterpriseCheckoutB2b::checkout/address-view/address-list/locked-address.phtmlnow has a single root<div>, because it replaces the template of the address list Magewire component. If you override this template in your theme, wrap its contents in a single root element.
Deprecated code removed
Hyva\EnterpriseCheckoutB2b\Observer\Frontend\NegotiableQuoteand itshyva_checkout_layout_process_beforeobserver registration inetc/frontend/events.xmlwere removed. If you added a plugin to or preference for this observer, move the customisation to the custom conditions above.
Developer note
The following constructors changed. Update any preferences, plugins or subclasses that rely on them:
Hyva\EnterpriseCheckoutB2b\Model\Request\Magewire\NegotiableQuoteValidatorandPurchaseOrderValidatorno longer read and unserializephp://inputthemselves. They now take a newHyva\EnterpriseCheckoutB2b\Model\Request\Magewire\ComponentMemodependency, which reads the component memo from both Magewire 1 and Magewire 3 requests. TheSerializerInterfacedependency was removed.Hyva\EnterpriseCheckoutB2b\ViewModel\Checkout\NegotitableQuoteLockedAddressno longer depends on the actionContext, which built a second application view and broke the layout generated during step navigation. It now takesUrlInterfaceandRequestInterfaceinstead.
Changelogs
The changelog is available here.
Tooling
Please refer to the Hyvä Enterprise upgrade docs for helpful information on how to upgrade.
Known Issues
Please check the GitLab issue tracker for known issues.