Author Topic: Error when i change the order status  (Read 1250 times)


  • Beginner
  • *
  • Posts: 1
Error when i change the order status
« on: March 13, 2012, 21:26:07 pm »
Hello, i´m having a problem when i change the order status and i tick the option "notify shopper".

Then this error come out:

Fatal error: Call to undefined method VirtuemartViewOrders::renderMailLayout() in /XXXXXXXX/components/com_virtuemart/helpers/shopfunctionsf.php on line 210

and the email has not been send.

Can someone help me please?

Before someone probably ask, here is the shopfunctionsf.php part:

    * With this function you can use a view to sent it by email.
    * Just use a task in a controller todo the rendering of the email.
    * @param string $view for example user, cart
    * @param string $recipient
    * @param bool $vendor true for notifying vendor of user action (e.g. registration)
   private function sendVmMail (&$view, $recipient, $vendor=false) {
      $jlang =& JFactory::getLanguage();
      $jlang->load('com_virtuemart', JPATH_SITE, 'en-GB', true);
      $jlang->load('com_virtuemart', JPATH_SITE, $jlang->getDefault(), true);
      $jlang->load('com_virtuemart', JPATH_SITE, null, true);

      $view->renderMailLayout($vendor, $recipient); <--- THIS IS THE LINE 210
      $body = ob_get_contents();

      $subject = (isset($view->subject)) ? $view->subject : JText::_('COM_VIRTUEMART_DEFAULT_MESSAGE_SUBJECT');
      $mailer = JFactory::getMailer();

         $replyto[1]= $view->vendor->vendor_name;
//       if (isset($view->replyTo)) {
//          $mailer->addReplyTo($view->replyTo);
//       }

      if (isset($view->mediaToSend)) {
         foreach ((array)$view->mediaToSend as $media) {
            //Todo test and such things.

      return $mailer->Send();