[Resolved] Proble with one use per customer codes


  • Default avatar
    Andrew-Watson    
     11 years ago
    0

    I have a simple problem.

    I put into AWO a code with one use per person only. It works perfectly but the problem is it does not work until you have signed in even though the coupon box appears BEFORE you sign in. This means customers try the code and then find it does not work.

    A simple solution would be to hide the coupon box before the customer signs in. It would work to change the following code and instead of making the conditon about the coupons being enabled (they always will be for me), change the "if" condition to be: if-'logged on' then.... I'm sorry, but I don't know any PHP, so I would love it of you either had a more elegant solution or could tell me how to change the current code:

    <?php
    /* Input Field for the Coupon Code */
        
    if( PSHOP_COUPONS_ENABLE=='1'
            
    && !@$_SESSION['coupon_redeemed']
            
    //&& ($page == "shop.cart" )
        
    ) {
            
    $basket_html .= $tpl->fetch'common/couponField.tpl.php' );
        }
    ?>
  • Your avatar
    seyi    
     11 years ago
    0

    For somebody that knows no php, you found the right place :)

    Here is the solution:
    https://awodev.com/forum/awocoupon/help-section/it-possible-have-code-used-set-number-times-without-users-lo#comment-85
  • Default avatar
    Andrew-Watson    
     11 years ago
    0

    Awesome. Simply awesome.

    Thanks again!