Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20
  1. #11
    Join Date
    Aug 2004
    Posts
    1,590
    Plugin Contributions
    1

    Default Re: Order confirmation email with link to info page

    Not necessarily the actual product. If they order a specified product, I'd like for this link that I'm adding to their confirmation email to be available to them inside of their personal account once they log into the cart.
    I don't think this was already done before. That's actually something I could try to implement since this does look like an interesting feature as a MOD.

    Or even adding a "members only page" with this and other pertinent links that all members may need to utilize at some point. I could probably search the forums for this... surely someone's used this idea before.
    I believe there's already a published MOD, under the downloads section, about when a customer buys all kinds of products (no matter which one), it will be added on a sideboxe window and publicize this product (without the customer's name and info of course).

  2. #12
    Join Date
    Aug 2004
    Posts
    1,590
    Plugin Contributions
    1

    Default Re: Order confirmation email with link to info page

    I just tested your error line and it works perfectly from my end . . . are you sure you implemented my latest fix as a replacement (and made sure you have all the additional blocks I posted with it) ?

  3. #13
    Join Date
    Feb 2007
    Location
    Dallas area
    Posts
    76
    Plugin Contributions
    0

    Default Re: Order confirmation email with link to info page

    Here's my code from the order.php page from line 958 through line 975:
    PHP Code:
    // include disclaimer
        
    $email_order .= "\n-----\n" sprintf(EMAIL_DISCLAIMERSTORE_OWNER_EMAIL_ADDRESS) . "\n\n";
        
    // include copyright
        
    $email_order .= "\n-----\n" EMAIL_FOOTER_COPYRIGHT "\n\n";
     
     
    // include survey measurements.
        
    $product_title "Your RoadMap" // Change your product title here.
        
    if (isset($product_title) && !empty($product_title) && preg_match("/^$product_title/i"$this->products_ordered)) {
        
    $html_msg['SURVEY_MEASUREMENTS'] = '<a href="' zen_href_link(SURVEY_MEASUREMENTS_URL), '"target="_blank">' EMAIL_SURVEY_MEASUREMENTS_CLICK_HERE '</a>';
        }
        while (
    strstr($email_order'&nbsp;')) $email_order str_replace('&nbsp;'' '$email_order);
        
    $html_msg['EMAIL_FIRST_NAME'] = $this->customer['firstname'];
        
    $html_msg['EMAIL_LAST_NAME'] = $this->customer['lastname'];
        
    //  $html_msg['EMAIL_TEXT_HEADER'] = EMAIL_TEXT_HEADER;
        
    $html_msg['EXTRA_INFO'] = '';
        
    zen_mail($this->customer['firstname'] . ' ' $this->customer['lastname'], $this->customer['email_address'], EMAIL_TEXT_SUBJECT EMAIL_ORDER_NUMBER_SUBJECT $zf_insert_id$email_orderSTORE_NAMEEMAIL_FROM$html_msg'checkout'); 

  4. #14
    Join Date
    Aug 2004
    Posts
    1,590
    Plugin Contributions
    1

    Default Re: Order confirmation email with link to info page

    Ok, I figured it out why. The matching variable is just for drawing tables. The orders ID is the only thing that is being used to output the order when the email is about to be sent. If the products_name variable has not been globalized, it would really take sometime to expand something like this.

  5. #15
    Join Date
    Feb 2007
    Location
    Dallas area
    Posts
    76
    Plugin Contributions
    0

    Default Re: Order confirmation email with link to info page

    So the bottom line is that this will take much more effort than what you've already so graciously put into it?

  6. #16
    Join Date
    Aug 2004
    Posts
    1,590
    Plugin Contributions
    1

    Default Re: Order confirmation email with link to info page

    So the bottom line is that this will take much more effort than what you've already so graciously put into it?
    Yes. However, I think I have a solution for this. I just took at look at my phpmyadmin and looks quite interesting to make a try.

    I will post back when the code will be finalized.

  7. #17
    Join Date
    Aug 2004
    Posts
    1,590
    Plugin Contributions
    1

    Default Re: Order confirmation email with link to info page

    Ok. Just finished coding this up. Restore your includes/classes/order.php file from your backup (no need to restore the other affected files from the previous page of this topic).

    Then, find:

    PHP Code:
    // lets start with the email confirmation
        // make an array to store the html version
        
    $html_msg=array(); 
    add below:

    PHP Code:
    // Gathers the products name
        
    $set_products_name "

        SELECT p.products_name
        FROM "
    .TABLE_ORDERS_PRODUCTS." p
        LEFT JOIN "
    .TABLE_ORDERS." o ON (customers_id = ".(int)$_SESSION['customer_id'].")
        WHERE p.orders_id = "
    .$zf_insert_id." AND o.customers_id = ".(int)$_SESSION['customer_id'];

        
    $exec_prods_name $db->Execute($set_products_name);

        while (!
    $exec_prods_name->EOF) {
        
    $get_products_name $exec_prods_name->fields['products_name'];
        } 
    // End of while statement.

        
    $product_title "Your_product_title" // Set your real product title here (leave the quotes there).

        
    if (isset($product_title) && !empty($product_title) && preg_match("/^$product_title/i"$get_products_name)) {
        
    $html_msg['SURVEY_MEASUREMENTS'] = '<a href="' zen_href_link(SURVEY_MEASUREMENTS_URL), '"target="_blank">' EMAIL_SURVEY_MEASUREMENTS_CLICK_HERE '</a>';
        } 
    Then, remember to change this line:

    PHP Code:
    $product_title "Your_product_title" // Set your real product title here (leave the quotes there). 
    for your own specific product name and that, for now, this is NO multiple products feature but simply a single one to see if it works.

    Keep me posted on this.

  8. #18
    Join Date
    Feb 2007
    Location
    Dallas area
    Posts
    76
    Plugin Contributions
    0

    Default Re: Order confirmation email with link to info page

    Same error:
    Parse error: parse error, unexpected T_IF in /includes/classes/order.php on line 894

    Line 894 is the last if statement:
    PHP Code:
    if (isset($product_title) && !empty($product_title) && preg_match("/^$product_title/i"$get_products_name)) { 
        
    $html_msg['SURVEY_MEASUREMENTS'] = '<a href="' zen_href_link(SURVEY_MEASUREMENTS_URL), '"target="_blank">' EMAIL_SURVEY_MEASUREMENTS_CLICK_HERE '</a>'
        } 

  9. #19
    Join Date
    Aug 2004
    Posts
    1,590
    Plugin Contributions
    1

    Default Re: Order confirmation email with link to info page

    Very well. I will send you a PM for further corrections so that this topic does not get overloaded.

  10. #20
    Join Date
    Feb 2007
    Location
    Dallas area
    Posts
    76
    Plugin Contributions
    0

    Default Re: Order confirmation email with link to info page

    Oracle,

    Your PM's are turned off or your inbox is full because the system won't allow me to send you any more.

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 31
    Last Post: 7 Feb 2015, 03:36 AM
  2. Sale Confirmation Email With Add Review Link?
    By tracstev in forum General Questions
    Replies: 22
    Last Post: 25 Jul 2013, 11:00 PM
  3. Inserting a link in the Order Confirmation Email
    By mccawphoto in forum General Questions
    Replies: 0
    Last Post: 21 Aug 2009, 03:50 AM
  4. Order Confirmation email suddenly stopped showing delivery and coupon info?
    By meltdowncomics in forum Managing Customers and Orders
    Replies: 3
    Last Post: 23 Jan 2009, 02:32 AM
  5. Adding info. to order confirmation email - URGENT!
    By joannadingle in forum General Questions
    Replies: 4
    Last Post: 19 Sep 2008, 05:19 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