Copied to clipboard

Flag this post as spam?

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


  • Rouben Muradyan 23 posts 173 karma points
    Jun 10, 2016 @ 12:08
    Rouben Muradyan
    0

    Merchello coupon code redeem

    Hey there . I'm just started to use Merchello plugin . Can someone explain me how to implement coupon redemption ? Is there any service or method to call something like GetCouponByName and check if offer code exist or available , if yes then add to my order review page and apply to total price . Please share snippet or give some hints . Thanks for attention .

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Jun 11, 2016 @ 08:42
    Rusty Swayne
    100

    Redeeming a coupon can be done through the CheckoutManger. The CheckoutManager tries to apply (checks the constraints) and then stores the offer until the invoice is generated.

    You can see how it is done in the Fast Track starter kit here:

    https://github.com/Merchello/Merchello/blob/merchello-dev/src/Merchello.Web/Controllers/CheckoutDiscountControllerBase%7BT%7D.cs#L106

  • Rouben Muradyan 23 posts 173 karma points
    Jun 11, 2016 @ 16:34
    Rouben Muradyan
    0

    Thank you Rusty , it works fine . By the way , when i'm generating invoice from basket then go back to basket and add couple items and then trying to generate new one , my invoice does not change . It still show me the previous invoice . Should i use ItemCacheService to manually delete stored data ?

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Jun 13, 2016 @ 15:00
    Rusty Swayne
    0

    Hey Ruben,

    Are you using the

    var invoice = checkoutManager.Payment.PrepareInvoice();
    

    method?

  • Rouben Muradyan 23 posts 173 karma points
    Jun 13, 2016 @ 22:13
    Rouben Muradyan
    0

    Hi Rusty . I solved the problem . That was my fault . Anyway , thank you for help .

Please Sign in or register to post replies

Write your reply to:

Draft