Skip to content

B2B - Hyvä Checkout - Upgrading to 1.0.0 (from 0.2.0 pre-release version)

Release 1.0.0 is the first stable release of the Hyvä Checkout module for Enterprise B2B (hyva-themes/magento2-ee-hyva-enterprise-checkout-b2b). It builds on the Hyvä Checkout flow and adds support for the Adobe Commerce B2B add-on payment journeys (Company Credit, Negotiable Quote and Purchase Order).

This upgrade guide covers notable changes from the previously released early access version: 0.2.0 along with any notable differences to Luma.

Prior changes are not covered (i.e. 0.1.x and lower).

Notable news

Feature parity with Luma

This release focuses on bringing the Purchase Order checkout flow in line with Luma.

  • Purchase Order: shipping information in the order summary
    • The order summary shown during the Purchase Order checkout flow now includes the selected shipping information (the Ship To address and Shipping Method).
    • The Purchase Order checkout does not inherit the default checkout, so the shipping summary block that the default checkout normally adds was missing. A new layout file (Hyva_EnterpriseCheckoutB2b::view/frontend/layout/hyva_checkout_ee_default_purchase_order.xml) adds the checkout.shipping-summary block to the checkout.quote-summary.section container.
    • For fully virtual carts the shipping summary (and shipping total) is removed again, via a hyva_checkout_default_virtual update gated by if="is_virtual" on the payment step (see src/etc/hyva_checkout.xml).
  • Purchase Order: terms and conditions
    • Store terms and conditions (checkout agreements) are now rendered on the Purchase Order review step and must be accepted before the purchase order can be submitted.
    • Implemented by moving the checkout.section.quote-actions element (which contains the agreements) into the main column on the review step (see src/view/frontend/layout/hyva_checkout_ee_default_purchase_order_payment.xml).
  • Purchase Order: auto-approval rules aligned to the Luma flow
    • Purchase order placement now delegates to the core payment-information service, \Magento\PurchaseOrder\Api\PurchaseOrderPaymentInformationManagementInterface::savePaymentInformationAndPlacePurchaseOrder(), instead of calling \Magento\PurchaseOrder\Model\ProcessorInterface::createPurchaseOrder() directly.
    • This routes the purchase order through the same create + determineStatus() flow as Luma. determineStatus() runs the approval-rule validator (placePoValidatorComposite), which auto-approves the purchase order when the company has no approval rules configured.
    • Previously, calling createPurchaseOrder() directly skipped that step and left the purchase order stuck in STATUS_PENDING.

Bug fix: redirect payment methods (PSPs) on purchase order placement

When placing a purchase order the id returned is a purchaseOrderId, not a sales-order id. Redirect PSPs (e.g. Mollie) would attempt to load it as an order and throw NoSuchEntityException. The redirect handling in PlacePurchaseOrderService was changed from afterGetRedirectUrl to aroundGetRedirectUrl to bypass the PSP redirect entirely and send the customer to the purchase order success page (purchaseorder/purchaseorder/success).

Developer note

\Hyva\EnterpriseCheckoutB2b\Plugin\Hyva\Checkout\Model\Magewire\Payment\PlaceOrderServiceInterface\PlacePurchaseOrderService gained an optional PurchaseOrderPaymentInformationManagementInterface constructor dependency (resolved via ObjectManager when not injected, so the change is backwards compatible). The online payment method blocks remain replaced with an informational block during the Purchase Order flow - the customer enters payment details only after the purchase order has been approved. See also \Hyva\EnterpriseCheckoutB2b\ViewModel\Checkout\Payment\Method\PurchaseOrder.

Deprecated code removed

Nothing was removed in this release. The changes are additive (shipping summary, terms and conditions) plus the purchase order placement/approval and redirect fixes described above.

Info

If you are not upgrading from 0.2.0, please also review the changes in the earlier pre-release versions (i.e. 0.1.x and 0.0.x) within the module.

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.