I am currently building an online store using magento.
After placing an order, customers automatically receive an "order confirmation". However, I would like to check first first if this order can be processed (for several reasons) and after that, send an "order acceptance" email saying that we accepted the order starting to process it.
I cant believe that magento lacks this feature.
However I also need to send several other emails:
when payment is received
when more preoducts need to be ordered
when we received the products otderd by the customer..
Does anybody have any clue, how something like this can be accomplished?
Thanks in advance!
do you know any other e-commerce platform on php that has this feature ?
You most certainly can
overwrite the saveOrder() method in Mage_Checkout_Model_Type_Onepage that calls out the sending of this e-mail
overwrite sendNewOrderEmail() method in Mage_Sales_Model_Order that defines this method
overwrite the canSendNewOrderEmail() method in Mage_Sales_Helper_Data that handles the validation if sending this mail is allowed
edit the sales_email/order/enabled config value, that is used to control the condition on helper method, to be false from admin page
After that you have to implement your own status based e-mail sending in your extension observer . You can observe the save_order_after event to do that and you can call for the same method as it is accessible from order object
Note : This is commercial software
We have used this extension by amasty called order status. It works very well. It will fire off an email from the transactional emails when a certain status has been changed.
Related
I want to show a custom message if user already subscribed with a email address.
like
You are already subscribed. Thank you.
Instead of this message.
I am using magento2.1.8.
You should define a preference (via di.xml) for the OOTB Controller that handles the Subscription sign-up process (Magento/Newsletter/Controller/Subscriber/NewAction.php) and in your custom controller's execute method - add the desired logic to check whether/not the customer has already subscribed and handle it accordingly.
You need to modify this simple checking.
Try this -
Go to this path if you haven't override NewAction.php file yet vendor\magento\module-newsletter\Controller\Subscriber and open NewAction.php file.
Replace this code:
if ($subscriber->getId() && $subscriber->getSubscriberStatus() == \Magento\Newsletter\Model\Subscriber::STATUS_SUBSCRIBED)
With:
if($subscriber->getId())
That's all.
In Magento when there's Paypal transaction error, it outputs a message like this:
This transaction cannot be processed (#15005: Processor Decline)
Since the message doesn't originate in Magento, it cannot be updated via translate.csv.
What are options available for developer to make these messages more user friendly?
This will not be easy but I think it's doable.
My guess would be to rewrite method
_processPaypalApiError($exception) in Mage_Paypal_Controller_Express_Abstract.
Since it's in an abstract class, you will have to rewrite one of the method (Express for example).
Also look at _setApiProcessableErrors
I am using codeigniter with datamapper orm
i want to update things using email messages
for example there are tables named "projects" and "messages"
projects
id / name
messages
id / content / project_id
each project has many messages and a name.
what i want is, if I send a message to project_id#domain
a new message be inserted into messages with that email content
is there any perfect way to do this ?
ty
Indeed there is a relatively elegant way to handle this. You need to extend Codeigniters E-Mail library and override the send () method. After sending do your database stuff. I might give you a code example as soon as I'm not on my phone anymore.
I found this post, which seems to be an exact duplicate, but I can't figure out how to get the answer to work for me so I'm posting again...
TFS2010: Set up an alert that will email a member in the team when a work item is assigned to them
I want anyone (not everyone) using TFS to receive an email when they are assigned an item or when an item assigned to them changes. So, when the alert happens, the person who is currently assigned the item will receive an email.
I know I can set up this on a per-person basis with Alerts Explorer, but I can't figure out how to do this for everyone at once.
I looked at https://tfsalerts.codeplex.com/, but it looks like it's used to send alerts to groups of people...I only want to send the alert to a single relevant person (the equivalent of #Me). If this tool can do that, I'm not sure how to make it do so.
what you want to do is write a TFS Server Plugin. This plugin will fire whenever a certain event occurs. In your case, you will want to catch the WorkItemChangedEvent. In the notification, you will find old and new values of each field. By checking whether the assigned to field changed, you will know whether the WI has been reassigned.
Once you determined that the WI has been reassigned, you can take the New Value, and go to Active Directory (assuming you're using it), and get the email address. Finally, send a message.
For a code example of writing a robust server plugin (that happens to target the WorkItemChangedEvent, check out this blog post: How to Write a Robust TFS Server Plugin
I am doing a magento gateway for paysolution for 1.4 and 1.5 and i am stack in the return from the bank. It is my firs module an I confusing about the way MVC works.
The admin configuration part works perfect
the redirect to the bank works fine and the bank show the data from the order
I have the php code to analyze the return but i don't understand where to put it.
The problem is i don't know wich url i have to configure in the paysolution account and how I create the page in the module to get the return from the bank.
I you can point me the right direction I will really apriciate.
Regards,
Eduardo
you have to write a custom controller within your module in order to give the Payment Gateway a redirection URL to call.
Some gateways also requires server to server communication so they will require another URL the will call asynchronously in order to communicate transaction result.
In order to understand what is a controller I suggest you to carefully read the following tutorials:
http://www.magentocommerce.com/knowledge-base/entry/magento-for-dev-part-1-introduction-to-magento#3
http://blog.baobaz.com/en/blog/magento-module-create-your-own-controller
According to the fact that the transaction is successful or not, you will end your controller method with one of the following redirections:
$this->_redirect('checkout/onepage/success');
or
$this->_redirect('checkout/onepage/failure');
I suggest you to take a look at the Paypal StandardController.php under [mageinstalldir]/app/code/core/Mage/Paypal/controllers and the OnepageController.php under [mageinstalldir]/app/code/core/Mage/Checkout/controllers
Best wishes,
Alessandro
Give this a try:
http://colourgray.wordpress.com/2009/11/11/magento-create-a-custom-payment-method/