Home › Support › Image Store › How To Add Detailed Receipt For E-Mail Only Checkout
-
AuthorPosts
-
January 15, 2014 at 9:24 am #56756jcharrisParticipant
Hi,
As you know, I’ve been reviewing ImageStore for a client. The big hurdle we have is that we need to send a detailed e-mail receipt to the visitor after they checkout even though they are NOT paying.
Want a logged in visitor to be able to add items to the cart and hit the checkout button but without using a payment gateway. And we want the e-mail receipt to include a list of the items they added to the cart WITH download links.
Is there a filter or hook that allows me to override the behaviour of checkout and do this without re-writing the cart.php? This is -critical- for us.
TIA,
—JC
January 16, 2014 at 8:55 pm #56768Xpark MediaKeymasterYou can removed or add checkout buttons base on the user status using the ims_checkout_actions hook.
To completely modify the email sent to the customer you can use the ims_customer_message hook.
February 19, 2014 at 2:32 pm #56938jcharrisParticipantThanks for the reply. I looked at the ims_customer_message hook.
But it looks like the download links object is only populated with the items they ordered if a payment gateway is selected.
So… AGAIN… sorry if this is a stupid question, but can you give a (brief) example of how I would pass the list of ordered items to ‘ims_customer_message’?
TIA,
—JC
February 22, 2014 at 10:24 am #56955Xpark MediaKeymasterYou can generate the links to the images yourself in the ims_customer_message hook. In the function all you have to return is html.
And since you don’t need to validate payment you don’t need to pass the links to the download.php script.
but if you still need to use the download script this is how you do it.
function my_ims_customer_message_function(){ global $ImStore, $ImStoreCart; $message = '<p>start html message</p>'; foreach ( $ImStoreCart->cart['images'] as $id => $sizes ) { $enc = $ImStore->url_encrypt( $id ); foreach ( $sizes as $size => $colors ) { foreach ($colors as $color => $item) { if ( $item['download'] ) $message .= '<a href="' . esc_attr( IMSTORE_ADMIN_URL ) . "/download.php?$nonce&img=" . $enc . "&sz=$size&c=" . $item['color_code'] . '" class="ims-download">' . esc_html( get_the_title( $id ) . " " . $item['color_name'] ) . "</a>"; } } } $message .= '<p>finish html message</p>'; return $message; }
-
AuthorPosts
- You must be logged in to reply to this topic.