Problem/Motivation

For a website currently on prod with Commerce 2.x, I would like to add support for gift cards, which can be seens as "prepaid cart" which should be available in the form of coupons.
This new type of promotion should work just the same as coupons, ie via the CouponRedemption pane (at #2792653: Checkout coupon pane implementation).

To each coupon of this promotion type, a total fixed amount of money should be configurable. Thus when user enters the coupon (say the coupon worth 135$), 135$ will be off his total price (as an adjustment). If the total price is only 35$, then nothing is left to pay and the coupon now worth 100$.
Of course, gift card should be purchasable too, with the user deciding how much he want to credit his coupon when added to cart.

The question is : how to best achieve this ? What can be done via Commerce 2.x core, what needs custom module. In the second case, how to best architecturize it ? There is no notion of coupon types that we could add a 'value' field, should I create a totally different promotion-like entity, but then what about CouponRedemption pane compatibility ?

Please could you provide architectural help and advice, I am willing to develop this as a contrib module if needed.

Comments

Dom. created an issue. See original summary.

FiNeX’s picture

Hi, you should check the following module: https://www.drupal.org/project/commerce_account_balance
Not exactly a solution but it could be a starting point :-)

mglaman’s picture

Status: Active » Closed (outdated)

I'm going to close this for the following planning issue: #3109691: [META] Gift cards.

The issue summary describes how gift cards were handled in the 1.x ecosystem. We'd like to improve that. Architecture, requirements gathering, and discussion will go there.