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?
Show available GCs in cart? And then URL to apply to order?
- 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 balanceThen you can use the balance module to show the balance and trigger using it in the cartFor 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]
- 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]?
- If you have multiple coupons enabled, you can enter multiple in the cart text box with a semi colon:code1;code2;code3It does not work in the url, because it assumes its a single couponindex.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.phpfunction onfrontendload_check_coupon_from_linkOr write your own system plugin using the above function as a starting point, so it does not get overriden on update.
- OK.. thanks for a great starting point!