How To Add Detailed Receipt For E-Mail Only Checkout

Bring Your Business to LifeSupportImage StoreHow To Add Detailed Receipt For E-Mail Only Checkout

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #56768
    Xpark Media
    Keymaster

    @jcharris,

    You 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.

    #56938
    jcharris
    Participant

    Thanks 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

    #56955
    Xpark Media
    Keymaster

    @jcharris,

    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;
    }
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.