Home › Support › Image Store › How To Add Detailed Receipt For E-Mail Only Checkout › Reply To: How To Add Detailed Receipt For E-Mail Only Checkout
February 22, 2014 at 10:24 am
#56955
Xpark Media
Keymaster
You 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;
}