Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 37
  1. #11
    Join Date
    Sep 2010
    Posts
    580
    Plugin Contributions
    0

    Default Re: Can I send extra order confirmation emails based on payment method?

    I have installed a Money Gram and Western Union payment method. I would like the instructions on making a Money Gram or Western Union payment to be sent out to the customer after the order confirmation email is sent. I am just not sure how to create this action. I haven't had any luck so far. Thank you.

  2. #12
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,883
    Plugin Contributions
    6

    Default Re: Can I send extra order confirmation emails based on payment method?

    You could add to the order.php class file the code in RED:
    Code:
    // bof: add Payment method content
    switch(true) {
      case ($this->info['payment_module_code'] == 'moneyorder'):
        $email_order .= 'Money Order Text Here!' . "\n";
        break;
      case ($this->info['payment_module_code'] == '    paypalwpp'):
        $email_order .= 'PayPal Express Text Here!' . "\n";
        break;
      default:
        $email_order .= 'NO CLUE ON PAYMENT';
        break;
    }
    // eof: add Payment method content
    
        // include disclaimer
    And you will need to do that again every time you upgrade.
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  3. #13
    Join Date
    Sep 2010
    Posts
    580
    Plugin Contributions
    0

    Default Re: Can I send extra order confirmation emails based on payment method?

    Hello again, thank you for your help. The code you helped me with will insert a little blurb into the order confirmation email. I am looking into sending an additional email that is generated based on the payment module selected. I've modified the order confirmation email to reflect payment info in the past but many customers have overlooked it. I think having an email sent with payment details and a defined subject would be the solution to the problem. Can you suggest what to change in the Send additional emails command on the order.php? Please. Thank you again. You're always so helpful.

  4. #14
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,883
    Plugin Contributions
    6

    Default Re: Can I send extra order confirmation emails based on payment method?

    For sending an additional email for each Payment method ...

    Add the code in RED:
    Code:
          zen_mail('', SEND_EXTRA_ORDER_EMAILS_TO, SEND_EXTRA_NEW_ORDERS_EMAILS_TO_SUBJECT . ' ' . EMAIL_TEXT_SUBJECT . EMAIL_ORDER_NUMBER_SUBJECT . $zf_insert_id,
          $email_order . $extra_info['TEXT'], STORE_NAME, EMAIL_FROM, $html_msg, 'checkout_extra', $this->attachArray);
    
    // bof: send extra email based on Payment
    switch(true) {
      case ($this->info['payment_module_code'] == 'moneyorder'):
        zen_mail('', 'testmoneyorder@your_domain_name.com', SEND_EXTRA_NEW_ORDERS_EMAILS_TO_SUBJECT . ' ' . EMAIL_TEXT_SUBJECT . EMAIL_ORDER_NUMBER_SUBJECT . $zf_insert_id,
        $email_order . $extra_info['TEXT'], STORE_NAME, EMAIL_FROM, $html_msg, 'checkout_extra', $this->attachArray);
        break;
      case ($this->info['payment_module_code'] == 'paypalwpp'):
        zen_mail('', 'testpaypalexpress@your_domain_name.com', SEND_EXTRA_NEW_ORDERS_EMAILS_TO_SUBJECT . ' ' . EMAIL_TEXT_SUBJECT . EMAIL_ORDER_NUMBER_SUBJECT . $zf_insert_id,
        $email_order . $extra_info['TEXT'], STORE_NAME, EMAIL_FROM, $html_msg, 'checkout_extra', $this->attachArray);
        break;
      default:
        zen_mail('', 'testunknown@your_domain_name.com', SEND_EXTRA_NEW_ORDERS_EMAILS_TO_SUBJECT . ' ' . EMAIL_TEXT_SUBJECT . EMAIL_ORDER_NUMBER_SUBJECT . $zf_insert_id,
        $email_order . $extra_info['TEXT'], STORE_NAME, EMAIL_FROM, $html_msg, 'checkout_extra', $this->attachArray);
        break;
    }
    // eof: send extra email based on Payment

    NOTE: there is a typo in the previous code:
    Code:
      case ($this->info['payment_module_code'] == '    paypalwpp'):
    change to:
    Code:
      case ($this->info['payment_module_code'] == 'paypalwpp'):
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  5. #15
    Join Date
    Sep 2010
    Posts
    580
    Plugin Contributions
    0

    Default Re: Can I send extra order confirmation emails based on payment method?

    Hi again. I really, really appreciate your help. You are literally putting this together for me but for the life of me I cannot get this to work properly. I have made edits the files over 40 times and placed mock orders to generate the effect I'm needing. However, the additional emails keep getting sent to my admin - not the customer email. I don't know how to remove the "order confirmation" details as I don't want the email to appear as a duplicate to my customers. Here's what I'm trying to do.

    If an order is placed using Money Gram I would like the customer to receive the generic "Order Confirmation" email. I would like to use the "Send Additonal Email" function to then send an additional email to the customer with the Money Gram payment instructions. I would like the additional email sent only to the customer, not to my admin address. If possible I would like to be able to reference the order and order total in the additional email sent but it's not necessary. I would hope to be able to customize the additional email to read something as such:

    Dear $customer_name,

    Thank you so much for placing an order with us. Please submit your payment of $order_total for order number $order_number. You may use the following details to complete your Money Gram Money Transfer...

    Sorry to keep bothering you. Believe me, I am trying - it's just not working out. I appreciate your help again. Thank you!!

  6. #16
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,883
    Plugin Contributions
    6

    Default Re: Can I send extra order confirmation emails based on payment method?

    Wouldn't two emails to the customer be more confusing than just adding the extra information to the original email so they have it all together?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  7. #17
    Join Date
    Sep 2010
    Posts
    580
    Plugin Contributions
    0

    Default Re: Can I send extra order confirmation emails based on payment method?

    Quote Originally Posted by Ajeh View Post
    Wouldn't two emails to the customer be more confusing than just adding the extra information to the original email so they have it all together?
    That's what I thought but I think that many people just assume its a generic email confirmation and don't bother reading through .I end up having to respond to email after email to restate the same information. I'm hoping the payment instructions email will help to eliminate some of that. I have even tried to create an observer to do this but I'm not good enough in php to understand where my errors are. Thank you.

  8. #18
    Join Date
    Sep 2010
    Posts
    580
    Plugin Contributions
    0

    Default Re: Can I send extra order confirmation emails based on payment method?

    Can anyone help me with this? I'm not too familiar with this part of the php files on zen cart and I have tried, tried and tried and failed. I've been trying to set this up for days now. Please, it's one of the last bits I need to wrap up here. Thank you!!

  9. #19
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,883
    Plugin Contributions
    6

    Default Re: Can I send extra order confirmation emails based on payment method?

    You can try using the code in RED:
    Code:
        zen_mail($this->customer['firstname'] . ' ' . $this->customer['lastname'], $this->customer['email_address'], EMAIL_TEXT_SUBJECT . EMAIL_ORDER_NUMBER_SUBJECT . $zf_insert_id, $email_order, STORE_NAME, EMAIL_FROM, $html_msg, 'checkout', $this->attachArray);
    
    // bof: send extra email based on Payment to customer
    switch(true) {
      case ($this->info['payment_module_code'] == 'moneyorder'):
        $html_msg_text = '';
        zen_mail($this->customer['firstname'] . ' ' . $this->customer['lastname'], $this->customer['email_address'], 'My MoneyOrder Subject ' . EMAIL_ORDER_NUMBER_SUBJECT . $zf_insert_id, 'My moneyorder text', STORE_NAME, EMAIL_FROM, $html_msg_text, 'checkout', $this->attachArray);
        break;
      case ($this->info['payment_module_code'] == 'paypalwpp'):
        $html_msg_text = '';
        zen_mail($this->customer['firstname'] . ' ' . $this->customer['lastname'], $this->customer['email_address'], 'My PayPal Express Subject ' . EMAIL_ORDER_NUMBER_SUBJECT . $zf_insert_id, 'My PayPal Express text', STORE_NAME, EMAIL_FROM, $html_msg_text, 'checkout', $this->attachArray);
        break;
      default:
        $html_msg_text = '';
        zen_mail($this->customer['firstname'] . ' ' . $this->customer['lastname'], $this->customer['email_address'], 'My Unknown Subject ' . EMAIL_ORDER_NUMBER_SUBJECT . $zf_insert_id, 'My unknown text for: ' . $this->info['payment_module_code'], STORE_NAME, EMAIL_FROM, $html_msg_text, 'checkout', $this->attachArray);
        break;
    }
    // eof: send extra email based on Payment to customer
    
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  10. #20
    Join Date
    Sep 2010
    Posts
    580
    Plugin Contributions
    0

    Default Re: Can I send extra order confirmation emails based on payment method?

    Hi again, thank you. However, I'm still getting the additional email send to my admin instead of the customer. I was also trying to work with this thread that has the same results but uses an auto loader and observer code instead. I can get the email send then but I don't know how to incorporate the customer details(name, order number and total) into the email message. Any suggestions? Thank you, I am really thankful that you've taken the time to respond to be and try to help me out with this. Thank you.

    Here's the auto loader/observer thread, I forgot to reference it:
    http://www.zen-cart.com/showthread.p...l-Custom-Email
    Last edited by joyjoy; 22 May 2012 at 06:01 AM. Reason: thread reference

 

 
Page 2 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. shipping method based on payment method?
    By psr racing in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 27 Apr 2011, 01:25 PM
  2. Payment method based on shipping type?
    By celticwebsolutions in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 12 Dec 2010, 11:25 AM
  3. Shipping based on payment method
    By Prorad in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 30 Oct 2009, 01:43 PM
  4. CAN'T send Newsletters, CAN send emails
    By bethalicea in forum General Questions
    Replies: 0
    Last Post: 24 Feb 2009, 04:34 PM
  5. Payment based on shipping method?
    By Jeff G in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 23 Nov 2008, 10:48 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
  •