Applying rewards to cart


  • Default avatar
    simon82    
     4 months ago
    0

    We would like to create apply the rewards to the cart purchases automatically for a user.

    Now Having looked into the controller.php we'd need to create a plugin to make a call to the payout_cart function if we wanted to do this correct?

  • Your avatar
    seyi    
     4 months ago
    0

    payout_cart converts the points to a coupon code and then adds the coupon code to the cart.  If that is what you are after, then yes, calling that should suffice.
  • Default avatar
    simon82    
     4 months ago  last edited 4 months ago
    0

    okay, we could do that, in fact that sounds like exactly what we want to do, however is there anything else we could do to get it in the cart you might recommend us doing instead?
  • Your avatar
    seyi    
     4 months ago
    0

    If you are using AwoCoupon pro, you could take advantage of the customer balance in the front end by automatically converting points to customer balance in AwoCoupon.  This is then credit in the store that can be used as credit without converting to a coupon.  Also this solution assumes no restrictions on what the points can be used for.
  • Default avatar
    simon82    
     4 months ago
    0

    Okay, what would we need to do to convert the points to customer balance?
  • Your avatar
    seyi    
     4 months ago
    0

    in aworewards->configuration->coupon payout auto, you can set it up there.
  • Default avatar
    simon82    
     4 months ago  last edited 4 months ago
    0

    Thanks. That'll really be helpful.
    Okay, Looking at our configuration. It seems that we have our automatic payout set to awoCoupon balance. All we need then is an auto apply plugin for what we need to do.
  • Your avatar
    seyi    
     4 months ago
    0

    Yep, the code to apply can be found in www/components/com_awocoupon/controller.php
  • Default avatar
    simon82    
     4 months ago
    0

    okay then. Good to know.