Include Name Of Buyer In HTML email


  • Your avatar
    seyi    
     5 years ago
    0

    Hi

    Is it possible to include the name of the buyer in the html email that is sent upon confirmation?

    For Example:

    You have received a gift certificate from {name_of_buyer}

    Thanks!
  • Your avatar
    seyi    
     5 years ago
    0

    Hi,

    This is not possible currently, but you can add it.

    In www/administrator/components/com_awocoupon/assets/ps_awo_giftcert.php, around line 150ish is this line
    <?php
    $message 
    str_replace(array('{website}'),array(URL), $message);
    ?>


    change it to
    <?php
    $sql 
    'SELECT first_name,last_name FROM #__'.VM_TABLEPREFIX.'_order_user_info WHERE order_id='.$d['order_id'];
    $database->setQuery$sql );
    $customer $database->loadObject();
    $message str_replace(array('{website}','{first_name}','{last_name}'),array(URL,$customer->first_name,$customer->last_name), $message);
    ?>


    Then within your email, use {first_name} and {last_name} to get the customer name.
    Note, this is untested code, but it should work. I will make sure customer first/last name is in the next release.