I am using Marketplace in my website. In here seller can able to Process the order. I given below the code

public function shipementorderAction(){
                $id = $this->getRequest()->getParam('id');

                $order = Mage::getModel('sales/order')->load($id);
                $order->setData('state', 'shipement');
                $history = $order->addStatusHistoryComment('', false);

                $order->sendOrderUpdateEmail(true, null);

                    $this->__('The order state has been changed.')

                Mage::getSingleton('core/session') ->addSuccess('Order Updated Successfully'); $this->_redirectReferer();


I used this code to send a email to customer

$order->sendOrderUpdateEmail(true, null);

How to send copy of email to that current seller? Like customer got a order status mail as well as seller also got copy of same mail

  • you want to sent a custom email or use the order status email? Jan 4 '16 at 6:07
  • Custom email to seller
    – Magento 2
    Jan 4 '16 at 6:11

add this code in marketplace module etc/config.xml inside the global tag

              <sales_email_order_custom_comment_template translate="label" module="sales">
                    <label>Order Update</label>

make copy of order_update.html and rename to custom_order_update.html

for sending the email add this code

    $emailTemplate  = Mage::getModel('core/email_template')
                    ->setDesignConfig(array('area' => 'frontend', 'store' => $store->getId()));                                                  
                    $emailTemplate->setTemplateSubject('Order Updated Order #'.$order->getIncrementId()); 
  $emailTemplateVariables['order'] = $order; 
                  $processedTemplate = $emailTemplate->getProcessedTemplate($emailTemplateVariables);
                $emailTemplate->send('emailhere','seller name', $emailTemplateVariables,$storeId=null);
  • i need to add config.xml only or some other file
    – Magento 2
    Jan 4 '16 at 6:50
  • you need to add xml code in your marketplace module config.xml Jan 4 '16 at 6:51
  • Ok i will check
    – Magento 2
    Jan 4 '16 at 7:04
  • How to get Seller mail id
    – Magento 2
    Jan 4 '16 at 7:49
  • i think seller is login and you have his session id got it form there.. Jan 4 '16 at 7:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.