I am using the marketing system so customers can redeem offers - however after they are applied to the basket (which works fine) nothing is inserted to the 'merchOfferRedeemed' table to record the redemption. Therefore no constraints that limit redemptions are working.
I have tested on the FastTrack example site and it seems to record redemptions just fine. I'm not getting any errors in the log. Is there something I need to do to fire recording of redemptions? Or if not, what can I do to attempt to debug the issue?
Using Merchello v2.4 and for now just using the standard Merchello action methods to apply discounts during checkout.
UPDATE: After much further investigation, it seems when I am capturing payment via the custom PayPal Express payment provider, the payment is not being finalized, thus the coupon redemption event handler is not being fired. I cannot work out how to invoke the CheckoutPaymentManagerBase.Finalizing event manually in my code. Any ideas?
FYI The core problem here is that if you use the AuthorizePayment and CapturePayment extension methods of Invoice, rather than calling them via the basket checkout manager, you cannot fire the finalizing events which (among other things) persists redeemed offers. I tried numerous things including subclassing the BasketCheckoutPaymentManager and implementing my own extended version via the Pluggable interface, but nothing worked (other component would not work without the original BasketCheckoutPaymentManager type).
Basically we need a way to trigger the event that persists redeemed offers another way. I'll try a PR if I can, but would appreciate any input on the best approach.
Basically I changed the checkout code to use the AuthorizePayment and CapturePayment extension methods of CheckoutManager rather than invoice. That triggers the private events that finalize the saving of offers to the database. It's not ideal but this is the simplest way if your checkout can use the inbuilt CheckoutManager.
Offer Redemption not being recorded in DB
I am using the marketing system so customers can redeem offers - however after they are applied to the basket (which works fine) nothing is inserted to the 'merchOfferRedeemed' table to record the redemption. Therefore no constraints that limit redemptions are working.
I have tested on the FastTrack example site and it seems to record redemptions just fine. I'm not getting any errors in the log. Is there something I need to do to fire recording of redemptions? Or if not, what can I do to attempt to debug the issue?
Using Merchello v2.4 and for now just using the standard Merchello action methods to apply discounts during checkout.
UPDATE: After much further investigation, it seems when I am capturing payment via the custom PayPal Express payment provider, the payment is not being finalized, thus the coupon redemption event handler is not being fired. I cannot work out how to invoke the
CheckoutPaymentManagerBase.Finalizing
event manually in my code. Any ideas?FYI The core problem here is that if you use the
AuthorizePayment
andCapturePayment
extension methods of Invoice, rather than calling them via the basket checkout manager, you cannot fire the finalizing events which (among other things) persists redeemed offers. I tried numerous things including subclassing theBasketCheckoutPaymentManager
and implementing my own extended version via the Pluggable interface, but nothing worked (other component would not work without the originalBasketCheckoutPaymentManager
type).Basically we need a way to trigger the event that persists redeemed offers another way. I'll try a PR if I can, but would appreciate any input on the best approach.
Hi Barry,
Did you manage to find a solution to this issue? I'm encountering the same one and I would appreciate your help.
Hi Maria,
Basically I changed the checkout code to use the AuthorizePayment and CapturePayment extension methods of CheckoutManager rather than invoice. That triggers the private events that finalize the saving of offers to the database. It's not ideal but this is the simplest way if your checkout can use the inbuilt CheckoutManager.
is working on a reply...