Magento_PurchaseOrder (Hyvä Checkout)
Magento Modules:
- Magento_PurchaseOrder
- Magento_CheckoutAgreementsPurchaseOrder
Adobe Commerce Packages
- magento/module-purchase-order
- magento/module-checkout-agreements-purchase-order
Repository
Note: this repo is only accessible with a Hyvä Enterprise license or as a contributor.
For more details, see: https://www.hyva.io/hyva-enterprise.html.
https://gitlab.hyva.io/hyva-enterprise/b2b/magento2-ee-hyva-enterprise-checkout-b2b
Features
All points are rated according to priority as P1 (critical), P2 (important), P3 (minor).
-
basic - does not break layout/design
Note: this issue is for features related to the checkout only. See #119 for details on Hyvä Theme compatibility.
Note: All below features assume output only if company accounts and purchase orders are enabled in Stores > Configuration:
btob/website_configuration/company_active
/btob/website_configuration/purchaseorder_enabled
along with purchase orders being enabled for the company.
Purchase Order Checkout Mode
Note: the 'purchase order checkout mode' refers to the main checkout, but when accessed via a company user when purchase orders are enabled. This means that all orders from the standard cart (quote) are initially placed as 'purchase orders', rather than standard orders.
Checkout Steps Navigation
-
[P3] Replace 'Review & Payments' with 'Review Purchase Order'- Will not be implemented at this time. See: https://gitlab.hyva.io/hyva-enterprise/b2b/magento2-ee-hyva-enterprise-checkout-b2b/-/issues/7
Note: this would only apply to a multi-step checkout layout and may not be worth implementing just to update the in-built two-step layout.
Payment Method Section
-
[P1] Support offline payment methods as normal -
[P1] Display (and allow) online payment methods but do not take payment - Display the following informational message instead of the payment options (e.g. card fields): 'You will be asked to enter your payment details after your Purchase Order has been approved.'
-
[P3] All 'Place Order' buttons are replaced with 'Place Purchase Order' - Being handled as part of: https://gitlab.hyva.io/hyva-enterprise/b2b/magento2-ee-hyva-enterprise-checkout-b2b/-/issues/6
Note: coupon codes, gift cards, store credit and reward points can be applied as normal
Note: the above example is using Braintree (sandbox), but should apply for any online payment method.
Order Placement
-
[P1] A purchase order is created, not a standard order (visible via /purchaseorder/purchaseorder/
)Note: along with the relevant items, the shipping address, shipping method and payment method should be selected at the checkout should be stored against the purchase order
-
[P1] The customer is directed to the purchase order success page ( /purchaseorder/purchaseorder/success/
)
Terms & Conditions Support
Note: All below features assume terms & conditions are enabled in Stores > Configuration (
checkout/options/enable_agreements
) and one or more agreements exists and is active under Stores > Terms and Conditions.
-
[P2] Checkout agreements (terms & conditions) can be used
Purchase Order Online Payment Method Place Order Mode (Apply Purchase Order / Replace Cart)
Note: this step is purely for purchase orders with online payment methods, where the purchase order has been approved, and the order can now be placed. This is usually initiated from the purchase order view page (
/purchaseorder/purchaseorder/view/request_id/{id}/
) by the user clicking the 'Place Order' button. For context, for offline payment methods, the order is created by the same action, but does not require going back to the checkout to complete (i.e. the order is automatically generated without further user input).
-
[P1] Purchase orders can be loaded into the checkout in place of the current cart contents - This is achieved in Luma by using a query parameter of
purchaseOrderId
with a value of the purchase order ID, e.g./checkout/index/index/purchaseOrderId/{id}/
- The regular checkout with any current cart items can still be accessed by removing the parameter at any time and multiple quotes can be loaded by using different quote IDs, i.e., the functionality never replaces the current standard quote (cart) at any time
- This is achieved in Luma by using a query parameter of
-
[P1] Only display the payment method section/step - Do not allow any way to edit the shipping address or method
-
[P1] Pre-select the payment method chosen when the purchase order was initially created -
[P2] Displaying and allowing payment with other available payment methods is still possible
Prohibit Adding Additional Discounts
Note: discounts applied during the original order placement can be used. It is only new discounts that cannot be applied at this stage (i.e. weren't agreed/applied during the purchase order phase).
-
[P2] Coupon codes cannot be applied (the coupon code field is removed from the checkout) -
[P2] Gift cards cannot be applied (the gift card section is removed from the checkout) - Luma bug: the section is not removed, but applying gift cards does not apply a discount (even though a success message is returned if the gift card is valid)
-
[P2] Store credit cannot be applied (the store credit section is removed from the checkout) - Luma bug: the section is not removed, but applying store credit does not apply a discount (even though a success message is returned)
-
[P2] Reward points cannot be applied (the reward points section is removed from the checkout) - Luma bug: the section is not removed, but applying reward points does not apply a discount (even though a success message is returned)
Order Summary Panel
-
[P1] Items displayed match items from the purchase order -
[P1] Items qtys displayed match qtys from the purchase order -
[P1] Items prices displayed match prices from the purchase order -
[P1] Order subtotal matches subtotal from the purchase order -
[P1] Order shipping total matches shipping total from the purchase order -
[P1] Tax matches tax from the purchase order (where applicable) -
[P1] Order total matches total from the purchase order -
[P1] Other totals output from purchase order - e.g. discounts, reward points, gift cards, store credit
-
[P2] Shipping address matches selected/locked address - Being handled as part of: https://gitlab.hyva.io/hyva-enterprise/b2b/magento2-ee-hyva-enterprise-checkout-b2b/-/issues/4
-
[P2] Shipping method matches selected/locked method - Being handled as part of: https://gitlab.hyva.io/hyva-enterprise/b2b/magento2-ee-hyva-enterprise-checkout-b2b/-/issues/4
Order Placement
-
[P1] A standard order is created (with payment added) Note: along with the relevant items, the shipping address, shipping method and payment method should be selected at the checkout should be stored against the purchase order
-
[P1] The customer is directed to the order success page ( /checkout/onepage/success/
)
Terms & Conditions Support
Note: All below features assume terms & conditions are enabled in Stores > Configuration (
checkout/options/enable_agreements
) and one or more agreements exists and is active under Stores > Terms and Conditions.
-
[P2] Checkout agreements (terms & conditions) can be used - Being handled as part of: https://gitlab.hyva.io/hyva-enterprise/b2b/magento2-ee-hyva-enterprise-checkout-b2b/-/issues/5
Additional Admin Screenshots (for guidance)
Purchase Orders default configuration
From navigation menu: Stores > Configuration
Purchase Orders per company configuration
From navigation menu: Customer > Companies
Contributors
Voting
Use