Display Coupon in Sales Reciept.


  • Default avatar
    chetanmadaan    
     13 years ago
    0

    Hi,

    we have been using a hack to display coupon code used in virtuemart sales receipt.
    we have been using the code:

    // Print the coupon code when available
    if( $db->f("coupon_code") ) { ?>

    <?php
     
    echo $VM_LANG->_('PHPSHOP_COUPON_COUPON_HEADER'
    ?>
    :

    <?php
     $db
    ->p("coupon_code"); 
    ?>



    now as we are using Awocoupon... this code is no longer working... please let us know what would be the right code to pull so that the AwoCoupon used should be displayed.

    Thanks.
  • Your avatar
    seyi    
     13 years ago
    0

    Hi, this was a problem in the first version of awocoupon. If you downloaded 1.0.1 you should not have this problem. I just retested and the coupon code shows up in the order details.

    Do you have access to the database? If so can you look and see if the coupon_code field in jos_vm_orders is being populated? This is where the piece of code you mentioned is getting it from.
  • Default avatar
    chetanmadaan    
     13 years ago
    0

    so you are saying that if i should just use the same code itself. it should work now :)

    Thanks
  • Default avatar
    chetanmadaan    
     13 years ago
    0

    yes we are using 1.0.0. is there a upgrade path we should follow. because we have a lot of coupons right now which we don't want to recreate.

    thanks.

    thanks.

    Josh.
  • Your avatar
    seyi    
     13 years ago
    0

    if you just install awocoupon 1.0.1 through the admin screen, it will overwrite the files and not touch the database, which is what you want. As a precaution, be sure to back up your database before installing.