Rewards ONLY for default shopper group


  • Default avatar
    zorigo    
     3 years ago
    0

    On our site we have both registered (default shopper group) and guest checkout (guest shopper group).  I have set up a rule to immediately send a gift certificate worth 10% of the total order to the the shopper.  In the rule I have selected Default Shopper Group under the user setting.  However, the gift certificate emails are still being sent to those shoppers who use guest checkout.  Any idea how to allow ONLY default shopper group to get the GC?
  • Your avatar
    seyi    
     3 years ago
    0

    Hello,

    Here is the fix.  In the file www/administrator/components/com_aworewards/helper/estore/virtuemart/class-aworewards-helper-estore-virtuemart-reward.php, around line 510 is this:
    <?php
            $test 
    AR()->db->get_value'SELECT virtuemart_shoppergroup_id FROM #__virtuemart_shoppergroups WHERE published=1 AND `default`=1 AND virtuemart_shoppergroup_id IN (' $rule->usergroups ')' );
    ?>

    Please change it to this:
    <?php
            $test 
    AR()->db->get_value'SELECT virtuemart_shoppergroup_id FROM #__virtuemart_shoppergroups WHERE published=1 AND `default`=2 AND virtuemart_shoppergroup_id IN (' $rule->usergroups ')' );
    ?>


  • Default avatar
    zorigo    
     3 years ago
    0

    Thx.  I have implemented this.  Just waiting for an order now to see if it works correctly.