Beispiel #1
0
 /**
  * Create emails
  */
 public function notificaction()
 {
     $config = $this->_migrate->getNotification();
     if ($config->get('notificaction-create')) {
         $emailCreate = $this->_element->create('sendemail', JBCart::ELEMENT_TYPE_NOTIFICATION, array("name" => JText::_('JBZOO_MIGRATE_NOTIFICATION_CREATE_NAME'), "layout_email" => "default", "subject" => JText::_('JBZOO_MIGRATE_NOTIFICATION_CREATE_NAME'), "recipients" => array("custom" => $config->get('admin-email')), "ishtml" => "1", "issleep" => "0"));
         $emailCreate->saveConfig('order_saved');
     }
     if ($config->get('notificaction-payment')) {
         $emailCreated = $this->_element->create('sendemail', JBCart::ELEMENT_TYPE_NOTIFICATION, array("name" => JText::_('JBZOO_MIGRATE_NOTIFICATION_PAYMENT_NAME'), "layout_email" => "default", "subject" => JText::_('JBZOO_MIGRATE_NOTIFICATION_PAYMENT_NAME'), "recipients" => array("custom" => $config->get('admin-email')), "ishtml" => "1", "issleep" => "0"));
         $emailCreated->saveConfig('order_paymentsuccess');
     }
     if ($config->get('notificaction-payment') || $config->get('notificaction-create')) {
         //$elem->saveConfig('default.title');
         $this->_confModel->setGroup('cart.email_tmpl.default', array('title' => array($this->_element->create('textarea', JBCart::ELEMENT_TYPE_EMAIL, array('showlabel' => '0', 'text' => '{order_name} - {site_name}'))->config), 'body' => array($this->_element->create('items', JBCart::ELEMENT_TYPE_EMAIL, array('name' => JText::_('JBZOO_MIGRATE_EMAIL_ITEMS_NAME'), 'currency' => $this->_migrate->getCurrency(), 'showlabel' => '1', 'subtotal' => '0', 'payment' => '0', 'shipping' => '0', 'modifiers' => '0', 'total' => '1', 'tmpl_item_link' => '1', 'tmpl_image_show' => '0', 'tmpl_image_link' => '0', 'tmpl_image_width' => '75', 'tmpl_image_height' => '75', 'tmpl_sku_show' => '1', 'tmpl_price4one' => '1', 'tmpl_quntity' => '1', 'tmpl_subtotal' => '1'))->config, $this->_element->create('fields', JBCart::ELEMENT_TYPE_EMAIL, array('name' => '', 'showlabel' => '1', 'fields' => array()))->config)));
     }
 }