Can't figure this out


  • Default avatar
    kstruck    
     14 years ago
    0

    I am getting the Coupon Not Found error.

    I tried editing the file basket.php and that did not work.

    My coupon is set for :

    Function Type: Coupon
    Fucntioon Type 2: Product
    Coupon Code: 55678
    Published: Published
    Percent or Amount: Amount
    Discount Type: Specific
    Value: $300.00
    Number of uses: blank (also tried as 0)
    Min Value: blank
    Expiration: blank

    No customers selected
    One Product select

    I do not want to have users logged in in order to use the coupon. The should enter the coupon, fill out the Billing information and then head off to PayPal.

    Want am I doing wrong?
  • Default avatar
    kstruck    
     14 years ago
    0

    When I make the change to this file, the user goes through the checkout process, gets all the way to the confirm order page, adn the coupon field never shows up. The next step in the process is PayPal.






    [code]
    /* 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' );
    }

    }
    }

    ?>
    [code]
  • Your avatar
    seyi    
     14 years ago
    0

    Hi, your settings look fine to me. I assume before using the coupon you are selecting the product. One thing you can do to figure out the exact error is on the dashboard, go to the configuration screen and change the default errors to something more specific, and that error will be displayed instead of the default virtuemart error.
  • Your avatar
    seyi    
     14 years ago
    0

    yes, that would happen if the user is not logged in. And from your previous post, you dont want the user to have to log in.

    for that, you need to change
    <?php
    if(!empty($auth['user_id'])) {
    $basket_html .= $tpl->fetch'common/couponField.tpl.php' );
    }
    ?>


    to
    <?php
    $basket_html 
    .= $tpl->fetch'common/couponField.tpl.php' );
    ?>



    The
    <?php
    if(!empty($auth['user_id'])) {
    ?>

    statement checks to see if the user is logged in before displaying the coupon field.
  • Default avatar
    kstruck    
     14 years ago
    0

    Still not working, get the no coupon found message. Maybe I am missing something, does this look correct.: I also changed the error codes and still get Coupon Code not Found.

    <?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    
     14 years ago
    0

    hmm, on the awocoupon dashboard, can you look at the "installation check" page. do you see any red or not installed?
  • Default avatar
    kstruck    
     14 years ago
    0

    Thanks. That is weird, when I installed, they were all ok. I even used a test coupon successfully, although I was logged.

    When I went to check that this time, they were ALL red. Had to intsall all of them, which took less than 2 seconds to do. Not sure what happened but I will now know to check that if something goes wrong.

    Thank you for your help and for providing a great product.