Use 'best' coupon only


  • Default avatar
    rytech123    
     9 years ago
    0

    I have the following setup on my site:

    1. 350SAVE15, overall
    This is a MANUAL coupon, where the user enters this code, they will get 15% off their entire purchase

    2. tenpercent , overall
    This is an AUTOMATIC dicsount of 10% off purcchase that is $1000 or more

    3. fivepercent, overall
    This is an AUTOMATIC discount of 5% off purchase that is $500 or more (but less than $1000)

    If a client enters 350SAVE15, then they should get 15% off no matter what the amount is that they spend...they should NOT receive the 5% or 10% off

    How do I set this up? If I setup a 'parent' then what sequence do I do this in? As all of the customers can use the tenpercent and fivepercent automatically. But only the customers with the code can do the 15%...

    thanks,
    Laura
  • Your avatar
    seyi    
     9 years ago
    0

    Hello,

    You can setup the coupon as exclusive:
    https://awodev.com/documentation/awocoupon-pro/coupons#category-tag
  • Default avatar
    rytech123    
     9 years ago
    0

    I added the tag: {exclusive} to this coupon...and to my automatic coupons.

    1. When I put in a $100 product, then enter the coupon, it works perfectly
    2. When I change the count of products to be $500 (which can qualify it for the other coupon) for some reason it is subtracting $96.40 (basically using the 5% off, then taking 15% off)?

  • Your avatar
    seyi    
     9 years ago
    0

    Hello,

    There is a problem with the exclusive tags working on automatic coupons.

    in www/administrator/components/com_awocoupon/helpers/estore/estorecouponhandler.php
    around line 450 is this
    <?php
                
    foreach($valid_auto_codes as $auto_codearray_unshift($coupon_rows,$auto_code); 
    ?>


    Change it to this
    <?php
                
    foreach($valid_auto_codes as $auto_code$coupon_rows = array($auto_code->id => $auto_code) + $coupon_rows
    ?>


    That should fix the problem.


  • Default avatar
    rytech123    
     9 years ago
    0

    no. I will not have any products with the price of 0.

    I upgraded to awo coupon pro 2.3.8
    we are using vm, 2.6.10
    joomla 2.5.27

    I think I need to setup a 'parent' coupon, but I'm not sure of the sequence...since :
    1. if the coupon is used, then the AUTO coupons should not happen
    2. if the coupon is not used, then the AUTO coupons SHOULD happen if it is in the price range.

    http://www.allinonesuppliers.com

    error:
    If I add a product to the cart and use the coupon, all is good
    If I increase the number of products in the cart it uses both discounts together...instead of just the 15% off.

    thanks,
    Laura
  • Default avatar
    rytech123    
     9 years ago
    0

    It looks like on June 9,2015, this .php file was adjusted...

    The line that you mention in the file, on my 'editor' is around line 901...

    $valid_auto_codes = array_reverse($valid_auto_codes);

    foreach($valid_auto_codes as $auto_code) array_unshift($coupon_rows,$auto_code);

    //printrx($coupon_rows);


    Is that the foreach line you want me to replace? I tried it, and the site went blank, so I'm assuming you meant somewhere else...

    thanks,
    Laura
  • Your avatar
    seyi    
     9 years ago
    0

    Hello,

    Yes, that is the right code. Maybe there are just double spaces now between each line, making the number of lines now twice as long?

    I have tested that code I sent you, it does work. Did you copy it without the lines?
  • Default avatar
    rytech123    
     9 years ago
    0

    ok, I just edited it directly via the filemanager, and it works perfectly with this fix. Thank you.

    I assume in future versions of awo coupon you will include this fix?

    thanks.
  • Your avatar
    seyi    
     9 years ago
    0

    yep