Gift Card product purchase, no email to gift recipient


  • Default avatar
    opt2bout    
     5 years ago
    0

    This had been working before, but I also realize we've had a major update since that last purchase.

    The details of the card are stored in the Hikashop order...and are viewable.  But the gift recipient didn't receive their email.

    Is there a way to debug this and test it?  I can't even find the gift card in the history in Awo.  The order is confirmed (which is how Awo is configured as well).
  • Default avatar
    opt2bout    
     5 years ago  last edited 5 years ago
    0

    I have read another post where there was the need to copy the media/images for the giftcert folder over to a new location because the update didn't do this automatically.  (https://awodev.com/forum/awocoupon/help-section/recipients-email-not-firing-out-coupons-not-created).

    I did that just in case.  But the gift card isn't even being created, let alone emailed to the recipient.  I am getting:

                       
    2018-12-06 23:03:23 MESSAGE
    order[13427]
    cannot send profile email

    In the debug for Configuration + Gift Certificates

    If I try to Email a coupon using the Send Voucher function, I just get an Error sending email.
  • Default avatar
    opt2bout    
     5 years ago  last edited 5 years ago
    0

    And yet I think I've got it.  At first I things weren't even getting to the email gateway.  So I may have fixed the issued by moving the media assets to the new location (I can edit the template and save it just fine now with all my custom images intact).  But our email gateway was rejecting the From address which is what generated the "cannot send profile email" message.

    But I do have a question...the gift card "coupon" doesn't get created unless the Email goes out?  It would be nice if it would generate the gift card with the purchased balance/amount so we could manually re-send the voucher later.  Am I missing something?

    Also, the gift message was not showing up as well as the Recipient name as it did before the upgrade.  So if anyone else is using this with the same result, check your email template ... the fields in Hikashop will need to be placed in the template again.  There also appears to be a new option, From so you may wish to add a new custom field in HK to take advantage of this.

    So I think I've fixed or found solutions to my issues, mostly related to updating from the 2.x to the newly licensed 3.x version.

    So now I just have one issue I need to resolve.  The image for the Gift Card is embedded in the HTML email using a CID tag.  But it references an object that doesn't exist in the email payload.  The gift card image is usually an attachment named like "15441547081241447980.png" but the html code that replaces the template tag {image_embed} is always replaced with "<div><img src="cid:couponimageembed1"></div>" ... and couponimageembed1 doesn't exist so we get a missing image icon in the email.  The PNG is attached as a normal attachment, outside of the HTML email message.
  • Your avatar
    seyi    
     5 years ago
    0


    But I do have a question...the gift card "coupon" doesn't get created unless the Email goes out?  It would be nice if it would generate the gift card with the purchased balance/amount so we could manually re-send the voucher later.  Am I missing something?
    If it does not send, there is a problem with the configuration, and if you have to manually send 1 out, that means you will manually have to send them all out.  Orders with gift certificate purchases can be found here:
           awocoupon > history of uses > orders
    There is a resend button there to send to customers if for some reason the original send did not work.

    So now I just have one issue I need to resolve.  The image for the Gift Card is embedded in the HTML email using a CID tag.  But it references an object that doesn't exist in the email payload.  The gift card image is usually an attachment named like "15441547081241447980.png" but the html code that replaces the template tag {image_embed} is always replaced with "<div><img src="cid:couponimageembed1"></div>" ... and couponimageembed1 doesn't exist so we get a missing image icon in the email.  The PNG is attached as a normal attachment, outside of the HTML email message.

    Joomla uses PhpMailer, so image embed is setup more or less as in this article:

    I have tested the embed function of AwoCoupon and for me it is working.  So not really sure why it is not showing up for you.  If the image is as an attachment, it is definitely there.
  • Default avatar
    opt2bout    
     5 years ago  last edited 5 years ago
    0

    We process our Email using ElasticEmail with Base64, but this issue hadn't been reported to us before we upgraded to 3.5.  We don't have this issue with other scripts (Acymailing, HIkashop, etc.) so I'm not sure where to look.  According to Elastic, the tag is referencing an unknown object, the attachment has a different name that the cid source tag.  But I don't have any clue.  It must be with the ElasticEmail plugin, but I can't figure out why it does differently than Acy, or Hika.  Maybe later this winter I can walk their code and see what they're doing.
  • Your avatar
    seyi    
     5 years ago
    0

    Here is the AwoCoupon code that deals with embedding if you would like to review it:

    file www/administrator/components/com_awocoupon/awocoupon/library/class-awocoupon-library-profile.php, around line 480, setting up the image
    <?php
                        $embed_text 
    .= '<div><img src="cid:couponimageembed' . ( ++$i ) . '"></div>';
    ?>

    file www/administrator/components/com_awocoupon/helper/class-awocoupon-helper-helper.php, around line 260, setting up phpmailer
    <?php
                    
    if($is_embed$mail->AddEmbeddedImage($attachment,'couponimageembed'.(++$i),$filename.'.'.$image_part['extension']);
    ?>