I have created a custom module in Magento which performs the whole process starting from selecting a product, registering the customer and checking out with that product. The code for the entire process is done through code in indexcontroller of this module. Everything is done alright but the email is not sent on new order placed. I thought Magento would automatically send emails on new order creation even if the process is done programmatically. But it doesn't. Can anyone tell me how can I hook into the default sales order emails and send mails when the order is placed through custom module?
I have been able to sent mail to the new customer getting creating from this line of code just after saving the customer:
$customer->sendNewAccountEmail();
Does anyone know if there is some code like this to send new order email as well? Any help is much appreciated.
Try this. You need to use the methods through the object of your order:
$order->getSendConfirmation(null);
$order->sendNewOrderEmail();
Related
I am trying to show the customer's purchase order number in the order-fulfilled email template. It's my own template design with the standard tags that netsuite provides.
I sent them a ticket asking if they have a tag like that, and apparently they do not. They said that feature in unavailable.
Is there a way that I can put a code into the email template that when the customer reads their email, they can view their purchase order number?
that's our customer's #1 question in regards to all the calls that we get is what their purchase order is. This can definitely help us out. I'm new to netsuite so I still do not know how to code around it or create a new tag.
Should work - This is the Live version we use. Like they said, NLTRANID...but that is our PO reference for them which is our internal number...your client likely wants their clients' Reference PO numbers for b2b transaction transparency.
To:
<NLBILLADDRESS>
We are sending you the Purchase Order No <NLTRANID> as PDF attachment
Try this one too: <NLOTHERREFNUM>
I'm having trouble to achieve this. What I would like to do is be able to edit the content (description) of an email entity for a qucik campaign before it's sent (or after it's created).
I've tried many different plugins registration without much luck.
Prevalidate Create Email : this one fires ok but only when a user creates and save the email. when the email is created by the quick campaign it is not triggered.
Prevalidate Send Email : this one fires only for when a single email is sent by a user action and does not allow to modify the description anywa
Prevalidate BackgroundSend Email: this one is correctly triggered when the emails created by a quick campaign are sent, but it does not let me modify the description.
Anyone has done that before ?
I'm using CRM 2011 online.
Any help would be greatly appreciated.
Regards
Found the solution which is to simply use the plugin on Create Email Pre-Operation instead of Pre-Validation like I was doing.
For some reasons, the Pre-Validation doesn't trigger when emails are created in the background.
I need solution for the following:
1) Customer places order
2) Store owner recieves email WITHOUT price info (e.g. packing list)
What files do I need to edit (I've read lots of posts and they don't seem to mention the file paths).
Thx
Two possible ways to achieve that:
You can create a model rewrite for the class Mage_Sales_Model_Order and override the function Mage_Sales_Model_Order::sendNewOrderEmail by sending an email to the shop owner using a different template
You can set the configuration entry "Sales Email/Order/Send Order Email Copy To" to nothing (so that the shop owner doesn't get the same email as the customer), and implement an observer catching the event sales_order_place_after. In the observer function you implement sending of an email to the shop owner using a template without the price info.
I know I had a hack for it ... and then I don't have it anymore. I went through everything I could and right now, we're CCing ourselves the customer notification email. As soon as we're done with our site upgrade, I'll have to readd my hack. I'm pretty sure it's in app/core/Mage/Sales/Model/Order.php possibly in public function sendNewOrderEmail()
See this pic:
I remember hard coding in a file after the customer notification was sent, we sent another one to admin but hard coding the template ID for the transactional order notification email to 8. Now, somehow, I'm doing it the "right way" but have no idea how I'm triggering this transactional email to ALSO happen with the customer order notification.
Make your custom module in that module just send a event after "sales_order_save_after".
Catch this event in observer file and put your custum coding on observer.
Read this
I want to store all emails information,which is sent by magento store.For this i want to trigger a event,after a email is sent by magento store.there are lot of such action is there like when a email is send to user like forget password,registration,newsletter subscribe,wishlist share etc.
There is one idea in my mind that if there is such event is exist in magento like email_send_after,i can add my custum coding in observer file and get that event is trigger or not.but i don't know is there any event or not?
you might be interested in this but you can always configure the store email section as described here Also check out this blog post - v helpful
Advice needed for backend form submission to aweber and get response.
Scenario
When customer signup at my form, I will
1. insert the customer details into my own database,
2. send them a welcome email from my system,
3. at the same time I want the email to be added into aweber (this should run in the background, so that customer no need to fill in details for second time)
If I use the php curl call alone, is it a good solution?
I want to submit form value to aweber, so that aweber add the new email into their system, and then response to my backend script?
I have seen many versions outside, which may include:
http://scripts.incutio.com/httpclient/
http://freshmeat.net/projects/curl_http_client/
http://snoopy.sourceforge.net/
Are they having any special benefit over the normal php curl call to pass in data?
I have done this successfully before just using just a cURL request, but I couldn't get aweber to accept the submission without sending the person a confirmation message of their own. Basically it acts as if you have "confirmed opt-in" turned on, even if you turn it off.
Also, aweber addlead.pl script doesn't return anything, so if you had something in mind for that it won't go anywhere.
Hope this helps!