Setono / SyliusGiftCardPlugin

Sell gift cards on your Sylius store and let users use them in the checkout process
MIT License
44 stars 40 forks source link

Disable buying of gift cards with gift cards #236

Open markbeazley opened 2 years ago

markbeazley commented 2 years ago

At the moment it seems that it is kind of possible to order a gift card with another gift card, the customer can complete the checkout process and the old card is shown as used, but as the order has no payment it seems it doesn't enable the new card. This could allow for a user to refresh a gift card that is due to expire, although it would require an admin/staff user to manually enable to new card, its still not the best user experience. I can think of two possible solutions:

  1. Catch this at the point the user tires to add the gift cart, and reject applying the card if their cart contains a gift card, then anytime the cart is updated remove any applied gift cards from teh order if the cart now contains a gift card.
  2. Don't include the cost of gift cards when calculation the cost to use from the gift card, this would allow the customer to buy a new gift card and buy non gift card products in the same order whilst allowing them to use another gift card to pay for the non gift card products.

I think 2 might be the better solution, especially if it included a message/alert explaining that gift cards can't be used against gift cards.

loevgaard commented 2 years ago

Oftentimes the simplest solution proves to be the best solution. Could you make a PR for option 1? :)