Coupon Recipient Name & Code In Hikashop Notification Emails


  • Default avatar
    a2zcs    
     5 years ago
    0

    I've a client that wants to receive the gift certificate recipient's name (collected at time of purchase) and the AWOCoupon code in the Hikashop order notification email when it is applied to a purchase. Is this possible, if so how can I make it happen for them?

    Joomla 3.9.1
    Hikashop 4.0.1
    AWOCoupon 2.5.9.3
  • Your avatar
    seyi    
     5 years ago
    0

    AwoCoupon gift certificate functionality is processed when onAfterOrderCreate is called.  As you can see in hikashop code, classes/order.php
    <?php
                $send_email 
    $this->sendEmailAfterOrderCreation;
                $app->triggerEvent('onAfterOrderCreate', array(&$order, &$send_email));
    ?>

    The onAfterOrderCreate trigger is called after sending the confirmation email.  So AwoCoupon code does not exist when the email confirmation is sent.
  • Default avatar
    a2zcs    
     5 years ago
    0

    Hi,
    Thanks for the quick response. I'm referring to the order notification email when the coupon amount is applied to the purchase of an item. So by that time the AWOCoupon code must exist as it is entered into the shopping cart when being redeemed. The value of the coupon is removed from the balance fine, just would like additional information included in that email.

  • Your avatar
    seyi    
     5 years ago
    0

    Ok, you want the information of a used coupon in an order.  You can pull the info from:

    table: #__awocoupon_history

    And search using column order_id.  Can be multiple rows if you have multiple coupons enabled in AwoCoupon.