Originally Posted by
simon1066
This may be obvious but is there a built-in way to send, in the checkout email, a custom link related to the product(s) purchased?
I'm looking at a customer buying a video - hosted elsewhere, with the order confirmation email sending a link to that video. Similar to the downloadable product attribute I guess, but without the need to include a file download. One way would I suppose, to put the link in a pdf and have the customer 'buy' that.
obvious? i do not know.... easy? for some... for others, probably not....
the best way, IMO, is to use an observer. in the order class on line 1127, there is a hook known as an observer that would allow you to modify the email message just before sending it:
PHP Code:
$this->notify('NOTIFY_ORDER_INVOICE_CONTENT_READY_TO_SEND', array('zf_insert_id' => $zf_insert_id, 'text_email' => $email_order, 'html_email' => $html_msg), $email_order, $html_msg);
you would then need to construct an observer to looks at the order and modifies the email accordingly based on the products in the order. this would be the cleanest way to do it as you do not modify base code.
perhaps there are other ways to do it, and someone else might chime in, but that's how i would go about it.
you can review this link for more info on it:
https://www.zen-cart.com/showthread....in-order-class
good luck,
good luck.
Bookmarks