Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Barry Fogarty 493 posts 1129 karma points
    Jun 04, 2018 @ 09:55
    Barry Fogarty
    0

    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?

  • Barry Fogarty 493 posts 1129 karma points
    Jun 06, 2018 @ 12:40
    Barry Fogarty
    0

    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.

  • Maria 2 posts 72 karma points
    Sep 13, 2018 @ 05:00
    Maria
    0

    Hi Barry,

    Did you manage to find a solution to this issue? I'm encountering the same one and I would appreciate your help.

  • Barry Fogarty 493 posts 1129 karma points
    Sep 13, 2018 @ 09:17
    Barry Fogarty
    0

    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.

Please Sign in or register to post replies

Write your reply to:

Draft