Magento_GiftCard (Hyvä Checkout)
Magento Modules:
- Magento_GiftCard
- Magento_GiftCardAccount
Adobe Commerce Packages
- magento/module-gift-card
- magento/module-gift-card-account
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/commerce/magento2-ee-hyva-enterprise-checkout
Features
All points are rated according to priority as P1 (critical), P2 (important), P3 (minor).
-
basic - does not break layout/design -
All built-in checkout layouts supported (default, one page, mobile)
Note: this issue is for features related to the checkout only. See #30 for details on Hyvä Theme compatibility.
Purchasing Gift Cards
Note: it is not expected that any customisations are needed here, but is included for testing/thoroughness. Gift cards are added to checkout in the same way as other complex products, i.e. they become quote items with additional options.
Note: the below features assume one or more gift card products have been created and are purchasable. Testing for the below should cover all gift card types:
- Virtual
- Physical
- Combined
Shipping Address/Method Sections
-
[P1] These sections are not displayed/required when checking out with a virtual gift card only (or alongside other virtual items only)
Order Summary Panel
-
[P2] Cart price rules (including coupon codes) cannot be applied specifically to gift card products -
[P2] Gift card items correctly render with their relevant details: name, image, options, qty and price
Virtual Gift Card Summary Example

Order Placement
-
[P1] Carts including gift card items can be ordered successfully -
[P1] Virtual/combined type gift cards are emailed to their designated recipient
Note: gift cards are sent on either order placement or invoice creation (payment). This is determined in 'Stores > Configuration' (
giftcard/general/order_item_status
). Again this action occurs away from the checkout process, so should not be affected, and is included purely for testing/thoroughness.
Redeeming Gift Cards
Note: the below features all assume gift card accounts have been created/sent and are redeemable - configured globally in 'Stores > Configuration' (
giftcard/general/is_redeemable
) and per gift card account in 'Marketing > Gift Card Accounts'. It is also recommended that 'Zero Subtotal Checkout' payment method is enabled in order for the full order amount to be covered by store credit (solely or alongside other discounts).
Order Summary Panel
-
[P1] A gift cards section should sit under/alongside the existing coupon code section (if enabled) - This should be collapsed/unfolded on page load (like coupons) with the heading 'Apply Gift Card'
-
[P2] Add a 'Stores > Configuration' setting within the Hyvä Checkout section to hide/show the gift card section - Again, see coupon code functionality for replication
-
[P2] Gift card balance can be checked by inputting the gift card code and clicking/tapping the 'See Balance' button - This returns the current balance and outputs this alongside the gift card code
-
[P1] Gift cards can be applied by inputting the gift card code and clicking/tapping the 'Apply' button - Unlike coupon codes, multiple gift cards can be applied
-
[P1] If the gift card code is not valid an error message should appear: - 'The gift card code couldn't be added. Verify your information and try again.'
-
[P1] If the gift card code is valid a success message should appear: - 'Gift Card {code} was added.'
-
[P1] Once applied the gift card displays as a discount row in the totals - Displaying the amount and the gift card code, along with a 'Remove' link
- Each applied gift card is it's own totals row/entry
-
[P1] If the gift card balance is less than the remaining order total, then the full gift balance is applied -
[P1] If the gift card balance is more than the remaining order total, then the value of the remaining order is applied -
[P1] Gift cards can be removed by clicking the 'Remove' link alongside the total and displays a success message - 'Gift Card {code} was removed.'
Future enhancement / UX consideration: in Luma & Hyvä Checkout, the coupon code is persisted in the field and the button updates to read 'Cancel Coupon'. However, as noted above, multiple gift cards can be applied so this is not feasible. A solution could be to list the active gift cards under the input field with remove links/icons (e.g. trash can) alongside. This means the 'remove' link could be removed from the totals.
Future enhancement / UX consideration: the gift card field could be combined with the coupon code field to reduce output (would likely require additional controller to handle, or multiple buttons, and 'see balance' consideration would also be needed).
Gift Cards Applied (with balance displayed)

Gift Card Message (can't apply error)

Gift Card Message (removal)

Payment Method Section
-
[P3] The total amount of gift cards applied to the order is displayed at the bottom of each payment method (only visible when selected)- 'Gift Card amount applied to order: {amount}'
This has been marked as not required as adds no real value

Payment Method Section
Note: it is not expected any customisations are needed here, but is rather included for testing/thoroughness.
-
[P1] If the gift card total (with or without other discounts) covers the cost of the entire order then the 'Zero Subtotal Checkout' method should replace all other methods
Order Placement
Note: it is not expected any customisations are needed here, but is rather included for testing/thoroughness.
-
[P1] The order is placed with the selected gift cards and their amounts are correctly applied to the grand total -
[P1] The balance and status are updated correctly for each applied gift card
Contributors
Voting
Use