Disable invoice email notification in Opencart - email

I want to disable, on my opencart store, the email that my clients get when they make an order (the invoice) because my products dont have a fixed price and the price is discussed over the phone.

Go to catalog->model->checkout->order.php in order.php file there would be method named confirm on line no 159 in which method OC update the order status after completion of checkout process & send an email to user.
At the end of this method approx line no 567 or 568, you have to comment the send email function or
$mail->send();
make this line to comment like that
//$mail->send();
That's it now OC will not sent out any email to your customers.

Related

Can I stop a SendGrid mail if it received a certain parameter?

I'm using a certain SendGrid template for several different projects and am trying to find a way to stop emails from going out in some conditions, through SendGrid.
For example, lets say I'm passing SendGrid some parameters like:
{id, name, amount, date}
I want to stop that email from going out when i'm passing a certain id.
I know that I can change the email template i'm sending with conditionals using handlebars:
From here
But Can I actually stop the mail if some condition happens?
In my case, every time I send the id = 5
You can control the body of the email using Handlebar templating, but by that point, you have already told SendGrid to send email with the data you provided. You cannot stop the email from being sent from within Handlebars.
If you're using code to tell SendGrid to send these emails, you could check in your code if the id equals 5, and if so, do not send an email.
If you're using Single Sends to send an email to SendGrid Contacts, you could to store this id field as a custom field, and create a segment or update your existing segment to filter out the contact with that id.

Magento 1.9 - send order admin email to different email address

I have 10 customer group in my website. I would send the order admin notification email to different address, based on user customer group.
For example.
User from customer_group_a take order will send admin notification to order1#website.com. Then user from customer_group_b take order will send admin notification to order2#website.com
Also, how can i get the customer data in order email? I try this, but not working in email/sales/order_new.html:
{{var customer.name}}
To send to different people, the best is to add the needed email adressess via system.xml to be able to edit in your back-office the emails then you will need to override app/code/core/Mage/Sales/Model/Order.php to fit with your logic. The lines that interest you are in queueNewOrderEmail() function.
Try to use the constant for the path to your config.
For the name in your template, you can normally use {{var order.customer_name}} if my memory is good or {{var order.customer.name}}. The functions getCustomer() and getCustomerName() exist in the precited class.

Magento 1.9.1 After change the order address from admin notification mail is not going to customer

On Magento system, I have placed a 1 order for wholesale customer from the admin. The customer receives a mail of new order place. After placing the order I notice the shipping address which I have selected is wrong.
I edit the shipping address and check on all the 3 checkboxes (Recalculate, Notification[customize],confirm update) below the update button. I have written a note on Notification [customize] section also. After clicking on update the message display “Order update, not yet applied. Customer has been sent an email with a confirmation link. Updates will be applied after confirmation.”
But the customer didn’t get any mail related to address change. We have used mandrill for sending a mail. I have checked is mandrill outbound but seems that the mail is not triggered from the Magento. Other than this mail all the mail is going to customer. Can anyone please tell me what is the problem? Why the address change/notification mail is not triggered from Magento ?
You can do this in this way by making a change in order.php go to this file-
public_html/app/code/core/Mage/Sales/Model/Order.php
create directory structure like this, then copy and paste the file to the path below.
public_html/app/code/local/Mage/Sales/Model/Order.php
Find the below code in that file and Make a change in file from
$mailer->setQueue($emailQueue)->send();
to
$mailer->send();

Prestashop: send a 2nd confirmation email to a 2nd email address

I need to add an option in Prestashop(for instance by ticking a box) to send the confirmation order email to another email address, if it's a gift for instance.
I added an email field to my addresses table and forms, but I do not know how to get that value afterward and send the confirmation to the email input there, I tried adding a send::mail in PaymentModule.php, without success.
Do you have in workaround this problem ?
You can refer the validateOrder() function in PaymentModule.php classes as this function is responsible for creating the order and sending order confirmation email as well.

Cakephp sending email to checked customer

Is it possible to have checkbox in the customer table where Admin can tick who he want to send email? For example he wants to send email to John and Patrick, all he has to do is Tick John and Patrick and click on send email button. Is it possible to do in cakephp? I have been googling but cannot find the answer I am looking for.
You need to get the ids of the users you've checked and from the ids you can get their email addresses and then simply do a foreach() to send an email to all selected users or put them into an email queue system.