A client of mine wants to migrate the gift cards data to a third party. To keep things simple, my thoughts would be to create a custom Gift Card provider, similar to how payment processors are done.
The provider would need to:
check the validity (expiry, balance remaining, is active)
update balance (on order finalize)
create gift card
query gift card(s)
Is this at all possible? Is there an interface that can be used to override the OOTB Vendr version inside the DI container?
There is an IGiftCardService but it's not currently configured in the DI container in a way to be replaced as I wasn't really expecting anyone to want to swap out that implementation.
The UI for the gift cards section is very much tied to our implementation too.
Best option I could think would be to maybe use Umbraco extension points to potentially hide the default gift cards tree node and inject your own which renders your own list view / edit screen and manages the third party API via some custom API controllers.
The management of deducting from gift cards could be done via event handlers listening for orders to finalize, and applying the gift cards could be done by implementing your own AmountAdjuster in the same way the built in gift cards do.
It's all pretty heavily custom though so would involve a fair bit of hacking.
Custom Gift Card provider
A client of mine wants to migrate the gift cards data to a third party. To keep things simple, my thoughts would be to create a custom Gift Card provider, similar to how payment processors are done.
The provider would need to:
Is this at all possible? Is there an interface that can be used to override the OOTB Vendr version inside the DI container?
Hey Sam,
There is an
IGiftCardService
but it's not currently configured in the DI container in a way to be replaced as I wasn't really expecting anyone to want to swap out that implementation.The UI for the gift cards section is very much tied to our implementation too.
Best option I could think would be to maybe use Umbraco extension points to potentially hide the default gift cards tree node and inject your own which renders your own list view / edit screen and manages the third party API via some custom API controllers.
The management of deducting from gift cards could be done via event handlers listening for orders to finalize, and applying the gift cards could be done by implementing your own AmountAdjuster in the same way the built in gift cards do.
It's all pretty heavily custom though so would involve a fair bit of hacking.
Matt
is working on a reply...