need help, coupon doesnt really work on my site :(


  • Default avatar
    bonbin    
     4 years ago
    0

    hi seyi, first of all i want to say thank you for your great component ever

    but after my site running a couple of week, i found some problem in here which is


    1.the coupon doesnt work for new registered member, but it works perfectly for old registered member
    2. i need the coupon also work for unregistered member so when they didnt log on yet, they can still get the discount without login in

    but, i cant let the coupon for some shopper category, lets say for a wholesale group, since they will have a different pricing already
    so i set the coupon work for -default- and -anonymous- , which registered user will become -default- shopper category

    but with that settings, when user didnt login yet, and they put the items into their cart then they didnt see any discount, and even they are login in right before checkout they wont get the discount as well (i believe its because im using your auto trigger coupon which triggering when they put an item into their cart)

    is there any solution for this like the coupon will work for unregistered and registered as default? or maybe triggering when they do login?

    also is there a solution for the coupon doesnt work for new registered member? since its work perfectly for old registered member, but i dont know why it doesnt work for new registered member :(
    fyi : i have 2 account first is the old registered before i use awo coupon, the second is the fresh registered member


    i'll really appreciate for any help


    thanks
    Robin
  • Default avatar
    bonbin    
     4 years ago
    0

    another information :

    its work pefectly for both new registered and old registered member when the coupon didnt have a specific shopper groups


    the question is, how can i limit the coupon for some shopper groups without having a problem on my previous post?


    thanks
    Robin
  • Your avatar
    seyi    
     4 years ago
    0

    If all your customers are required to create an account (or log in) before completing an order, then I think the easiest solution is to just inform the user. In awocoupon->configuration->error messages, you can customize the message for the shopper group error to say something like 'please log in to use this coupon code'.

    The reason log in is required is because the coupon functionality has no way of telling what shopper group the user is in until they are logged in. And even if the coupon is accepted first with the intention of checking it after the user logs in, the problem is the coupon function is not necessarily called when the customer logs in. And in some stores logging in is not required which is another problem.
  • Default avatar
    bonbin    
     4 years ago
    0

    dear seyi,

    yes my customers need to login for checkout, even if i tell them to login first before checkout
    once they put the item into cart, even after they login they wont get the discount , since im using ur auto triggering plugins, so none of my customers know what my discount coupon is
    basicly, i need the auto triggering to trigger the coupon when they are login before checkout

    but, all of that, that doesnt really an important matter, i can put an message for them to always login before adding items to their cart

    the most important matter in here is, when i set the coupon to work only for specific virtuemart shopper groups (in my case is for -default- and -anonymous-)
    my new registered member cant use the coupon, even if i try to input the coupon code manually
    i double check their shopper group, and they are already on -default- shopper group
    which the coupon work perfectly for my old registered account , do you have any idea why this happened? or is there someone else has facing the same issue like me before?


    i found the problem is virtuemart doesnt really add them into -default- group, which is i saw them already in -default- on my virtuemart backend
    but when i login in the front end the shopper group is blank :(
  • Your avatar
    seyi    
     4 years ago
    0

    I did some testing, and getting the exact same behavior, Virtuemart is not putting the user into a shopper group upon sign up. The easiest thing to do is if the user is not in a shopper group, then assume they are in the default shopper group. This will be fixed on the next version of AwoCoupon Pro, but for now, here is a fix you can implement. Assuming you are using the latest, 2.0.9,
    in www/administrator/components/com_awocoupon/helpers/estore/virtuemart/couponhandler.php around line 436 is this code
    <?php
    $sql 
    'SELECT virtuemart_shoppergroup_id FROM #__virtuemart_vmuser_shoppergroups WHERE virtuemart_user_id='.$user_id;
    $db->setQuery($sql);
    $shopper_group_id $db->loadResult();
    ?>


    right after that, add this
    <?php
    if(empty($shopper_group_id)) {
        
    $db->setQuery('SELECT virtuemart_shoppergroup_id FROM #__virtuemart_shoppergroups WHERE published=1 AND `default`=1');
        
    $shopper_group_id $db->loadResult();
    }
    ?>

  • Default avatar
    bonbin    
     4 years ago
    0

    hi seyi

    the hack above does the trick, but somehow , i cant limit the coupon usage to some other shopper group now

    for example, i set the coupon work for default shopper group
    i have another shopper group, lets say wholesale , and i cant let this shopper group using the coupon since they already have a wholesale prices
    (i set the pricing through taxes and calculation)

    the only way to stop them from using coupon is to check the "Exclude Products on Special" option
    but if i use this trick, it will makes my default shopper group cant use the coupon as well when they have a product on "sale" category in their cart
    which the product on sale category already have a discount through price override
  • Your avatar
    seyi    
     4 years ago
    0

    It is working for everybody because there is an error in the code I gave you above, sorry.

    I have fixed the code, the only thing you need to fix is change shoppger_group_id to shopper_group_id
  • Default avatar
    bonbin    
     4 years ago
    0

    ok thanks its work perfectly now :)
  • Default avatar
    andreas5    
     4 years ago
    0

    Does this also work for version 1.4.6?

    Thanks.
  • Your avatar
    seyi    
     4 years ago
    0

    no, this is a virtuemart 2 problem only.

    If you are having problems with virtuemart 1 and shopper groups, take a look at the user_guide.html that came your download of awocoupon at section 5.2.1 Shopper Group