Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2005
    Location
    Waikato, New Zealand
    Posts
    1,539
    Plugin Contributions
    3

    Default Add Download link to confirmation email.

    Hi

    Ok,
    Situation
    A customer orders a downloadable product and uses a non instant payment system (eg money order/Direct Bank transfer),
    when you confirm you have received the payment by changing the order status to Delivered, the email they receive doesn't mention how to download the product or where to download it from, the email does provide a link to the invoice but all order emails do that and there is no information that the invoice contains the actual download link.
    Yes I do realise i can type this information into the order comments box, but i would like to automate it, and I cannot seem to get it to work.

    I only want the message "To download your file, please follow the above link to your invoice and click the download button" to appear when the order status is set to delivered and the order contains a downloadable product.

    I have in the past displayed a generic message saying "If you have ordered a downloadable product then once your order has been processed please follow the above link and a download button should appear. Please note the download button will not appear until the order has been processed by us"
    But that message appeared on all order emails whether it was applicable or not.
    Webzings Design
    Semi retired from Web Design

  2. #2
    Join Date
    Sep 2005
    Location
    Waikato, New Zealand
    Posts
    1,539
    Plugin Contributions
    3

    Default Re: Add Download link to confirmation email.

    Ok this is what i have so far

    Editing
    admin/orders.php

    around line 135 it reads

    PHP Code:

                $message 
    =
                
    EMAIL_TEXT_ORDER_NUMBER ' ' $oID "\n\n" .
                
    EMAIL_TEXT_INVOICE_URL ' ' zen_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO'order_id=' $oID'SSL') . "\n\n" .
                
    EMAIL_TEXT_DATE_ORDERED ' ' zen_date_long($check_status->fields['date_purchased']) . "\n\n" .
                
    strip_tags($notify_comments) .
                
    EMAIL_TEXT_STATUS_UPDATED sprintf(EMAIL_TEXT_STATUS_LABEL$orders_status_array[$status] ) .
                
    EMAIL_TEXT_STATUS_PLEASE_REPLY
    I changed it to
    PHP Code:

                $message 
    =
                
    EMAIL_TEXT_ORDER_NUMBER ' ' $oID "\n\n" .
                
    EMAIL_TEXT_INVOICE_URL ' ' zen_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO'order_id=' $oID'SSL') . "\n\n" ;
            if (
    $orders_status_array[$status] == 'Delivered') {$message .= "If you purchased a downloadable product, please follow the above link to download your purchase. \n\n";} 
                
    $message .=
                
    EMAIL_TEXT_DATE_ORDERED ' ' zen_date_long($check_status->fields['date_purchased']) . "\n\n" .
                
    strip_tags($notify_comments) .
                
    EMAIL_TEXT_STATUS_UPDATED sprintf(EMAIL_TEXT_STATUS_LABEL$orders_status_array[$status] ) .
                
    EMAIL_TEXT_STATUS_PLEASE_REPLY
    When i switch the order status to "delivered" the message is displayed, however it is displayed for all delivered orders, whether they contain downloadable product or not
    Webzings Design
    Semi retired from Web Design

  3. #3
    Join Date
    Sep 2005
    Location
    Waikato, New Zealand
    Posts
    1,539
    Plugin Contributions
    3

    Default Re: Add Download link to confirmation email.

    On second thoughts, it would probably be better to display the message when the status is set to pending, as thats when the file is available for download.
    Webzings Design
    Semi retired from Web Design

  4. #4
    Join Date
    Jul 2012
    Posts
    16,719
    Plugin Contributions
    17

    Default Re: Add Download link to confirmation email.

    Quote Originally Posted by nigelt74 View Post
    On second thoughts, it would probably be better to display the message when the status is set to pending, as thats when the file is available for download.
    Couple of things... Would probably want to implement a similar setting check as is done elsewhere in the system, ie. If not mistaken in the admin settings there are settings to indicate that a product is to be available for download. You want to mirror that "allowance" using variables not strict numbers or status designations. (If you ever change the one without changing the hard-coded piece, you will go crazy.

    Regarding the applicability to a product, are all of your digital products in a single category or in some otherway grouped? What you do/can do is to step through the $order(s) variable (sorry forget which it is, but you can see examples of this in the file you're modifying), to identify if an item that meets your criteria to provide that message is present and if so, then to display that message and depending on how you search/compare the data may need to exit a loop or carry on down the message path.

    Do realize/understand that this is only the plain text area of the emails, somewhere else is the html version. (Sorry one area I haven't gone to explore yet, been trying to get/make sure the text side contains the content we want so in the mean time we have not enabled html options for our guests.)
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #5
    Join Date
    Jul 2012
    Posts
    16,719
    Plugin Contributions
    17

    Default Re: Add Download link to confirmation email.

    Quote Originally Posted by nigelt74 View Post
    admin/orders.php

    around line 135

    I changed it to
    PHP Code:
            if ($orders_status_array[$status] == 'Delivered') {$message .= "If you purchased a downloadable product, please follow the above link to download your purchase. \n\n";} 
                
    $message .=
                
    EMAIL_TEXT_DATE_ORDERED ' ' zen_date_long($check_status->fields['date_purchased']) . "\n\n" .
                
    strip_tags($notify_comments) .
                
    EMAIL_TEXT_STATUS_UPDATED sprintf(EMAIL_TEXT_STATUS_LABEL$orders_status_array[$status] ) .
                
    EMAIL_TEXT_STATUS_PLEASE_REPLY
    Another thing, and I realize you're still developing, but for those looking at this later, the text that is provided above, should instead be placed in a languages define so that if the cart is expanded, etc... The applicable translated information can be presented to others that have selected a language other than english. Also, in an upgrade that affects that file, at least the text will still exist somewhere, but perhaps not the call to display it. But a search through then existing files wouldn't be too difficult to identify at least what variable needs to be displayed.

    Anyways, just a coding suggestion.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. Sale Confirmation Email With Add Review Link?
    By tracstev in forum General Questions
    Replies: 22
    Last Post: 25 Jul 2013, 11:00 PM
  2. v139h How do I add a link to confirmation email?
    By Chargin in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 15 Nov 2012, 02:37 PM
  3. Add email Download link for customer "file Upload"?
    By polygone in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 10 Mar 2011, 02:08 AM
  4. Can I add a Link to product URL in confirmation email?
    By RoPey in forum General Questions
    Replies: 0
    Last Post: 4 Dec 2007, 12:57 PM
  5. Download link in confirmation email is not showing
    By astrup in forum General Questions
    Replies: 1
    Last Post: 1 Nov 2007, 10:11 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR