Show available GCs in cart? And then URL to apply to order?


  • Default avatar
    zorigo    
     14 days ago
    0

    We have a program using AWO Rewards and AWO Coupon that, using a rule, automatically sends the shopper a GC worth 10% of their order once the status is "confirmed".  I also built a custom module that shows the user all of their "rewards" on a single page.  However, I was wondering if there was a way (maybe through a URL?) to allow the shopper to see the reward in the cart and then click a link to apply it to their order?
  • Your avatar
    seyi    
     13 days ago
    0

    Hello,

    By GC, you mean gift certificate? So you create a rule that sends them a coupon when the order is confirmed?  If the gift certificate is non restrictive, then maybe you should consider taking another approach.  For this, you would:
    - update the rule to send points to the user
    - in aworewards > configuration > automatic payment tab, set payment type to awocoupon balance
    Then you can use the balance module to show the balance and trigger using it in the cart

    For your specific question of showing the list of coupons in the cart, there is nothing for this.  You already created a custom module, so you could use module positions to show it in the shopping cart.

    You can trigger a coupon in the cart with the link:
      /index.php?addcoupontocart=[code]
  • Default avatar
    zorigo    
     13 days ago
    0

    Thx!  This works perfectly..  follow up question.. is it possible to add multiple codes to the cart at one time?  Maybe something like /index.php?addcoupontocart=[code1]&addcoupontocart=[code2]&addcoupontocart=[code3]?
  • Your avatar
    seyi    
     13 days ago  last edited 13 days ago
    0

    If you have multiple coupons enabled, you can enter multiple in the cart text box with a semi colon:
        code1;code2;code3

    It does not work in the url, because it assumes its a single coupon
        index.php?addcoupontocart=[code1]%3B[code2]%3B[code3]

    You would probably have to modify this function to test each individually:
    www/administrator/components/com_awocoupon/awocoupon/library/class-awocoupon-library-helper.php
    function onfrontendload_check_coupon_from_link

    Or write your own system plugin using the above function as a starting point, so it does not get overriden on update.
  • Default avatar
    zorigo    
     13 days ago
    0

    OK.. thanks for a great starting point!