Multiple coupons without semi-colon


  • Default avatar
    edouard    
     4 years ago
    0

    Hello Awo !

    I've not updated your component for a while and discover all his new functionalities : great :

    Concerning :
    Allow multiple coupons, one per submit, instead of forcing the customer to input all coupons at once separated by a semi-colon

    If I enter one coupon, the field disapear ... how is it support to work ?

    Thanks in advance for your help
    Ed
  • Your avatar
    seyi    
     4 years ago
    0

    Hello,

    In Virtuemart 2, the box does not disappear. In Virtuemart 1 it does. On the installation check page of AwoCoupon, you can change that.
  • Default avatar
    g j f2    
     4 years ago
    0

    Same problem. Using virtuemart1

    I tried to install the coupon field in the installation check page but got this:

    PERSISTENT COUPON FIELD: COULD NOT FIND POSITION TO ADD/DELETE CONTENT

    What code I have to ad and where in administrator/components/com_virtuemart/html/basket.php?

    Thanks
  • Your avatar
    seyi    
     4 years ago
    0

    Here it is, around the very end of the file, change this:
    <?php
    if($_SERVER['HTTPS']){ 
        if( 
    PSHOP_COUPONS_ENABLE=='1' 
            
    && !@$_SESSION['coupon_redeemed'
            
    //&& ($page == "shop.cart" ) 
        
    ) { 
            
    $basket_html .= $tpl->fetch'common/couponField.tpl.php' ); 
        } 

    ?>

    to this
    <?php
    if($_SERVER['HTTPS']){ 
        if( 
    PSHOP_COUPONS_ENABLE=='1' 
            
    /*&& !@$_SESSION['coupon_redeemed']*/ # awocoupon_code COMMENT OUT 
            //&& ($page == "shop.cart" ) 
        
    ) { 
            
    $basket_html .= $tpl->fetch'common/couponField.tpl.php' ); 
        } 

    ?>
  • Default avatar
    g j f2    
     4 years ago
    0

    The code in my file was. I think it was different because off a litle hack before? (I don't remember...)

    /* Input Field for the Coupon Code */
    if( PSHOP_COUPONS_ENABLE=='1'
    && !@$_SESSION['coupon_redeemed']
    //&& ($page == "shop.cart" )
    ) {
    if(!empty($auth['user_id'])) {
    $basket_html .= $tpl->fetch( 'common/couponField.tpl.php' );
    }
    }
    }
    ?>

    I only comment out as you stated above.
    The field is stil there after the first code, so that is ok.
    But when i give in the second code after the first one, the second one is not substracted.
    ,
    If I try the codes seperate so one by one they work, so no problem with the coupons
    Max coupons in config = 2

    Any idea?
    Thanks
  • Default avatar
    edouard    
     4 years ago
    0

    Thanks AWO, did not check your installation page (where is it on your site by the way ?)

    Does the field disappear if multiple coupon is disabled ?
  • Your avatar
    seyi    
     4 years ago
    0

    its in awocoupon pro admin screen, from the dashboard go to installation check page. The field does not disappear if multiple coupons is disabled. You can do that through the installation check page.
  • Your avatar
    seyi    
     4 years ago
    0

    no idea what the problem could be. maybe you can give details of how you set up the coupon so i can try and reproduce it.
  • Default avatar
    g j f2    
     4 years ago
    0

    Here you go:

    Coupon A:
    Buy 3 get 1 free x/y
    percentage 100%
    lowest price
    per cusumer, 1 time
    min order 50
    max 5 items free
    date until 1 august

    Customer: Myself

    X
    number 2, type vendor, include

    Y
    number 1, type vendor, include


    Coupon B:
    Parent coupon including 6 coupons
    The included coupons are all on (1) different categorie
    some are excluding products on special some are including product on special
    al the included coupons are on specific shopper groups some also on the default shoppergroup

    Coupon A and coupon B are working fine if you use them seperate with the good product in the basket

  • Your avatar
    seyi    
     4 years ago
    0

    Ok, there is a problem with parent coupon usage in multiple coupons. If you enter the parent coupon first and then the buy-xy, it should work. But if you enter the buy-xy first and then the parent coupon, the parent coupon will not be taken. Not an easy fix, will be looking over the code to try to get this resolved in the next week.
  • Your avatar
    seyi    
     4 years ago
    0

    Ok, this should be fixed in the latest AwoCoupon 1.5.0.