* @link http://www.oxidmodule.com */ namespace D3\Fileupload\Modules\Application\Model; use OxidEsales\Eshop\Core\Model\ListModel; use OxidEsales\Eshop\Core\Registry; class d3_oxemail_fileupload extends d3_oxemail_fileupload_parent { protected $_sFileUploadInfoTemplate = 'd3fileupload_notification_html.tpl'; protected $_sFileUploadInfoPlainTemplate = 'd3fileupload_notification_plain.tpl'; /** * @param ListModel $aFixedOrderList * @param ListModel $aUploadOrderList * * @return bool */ public function d3FileUploadSendNotification(ListModel $aFixedOrderList, ListModel $aUploadOrderList) { $oShop = $this->_getShop(); $this->_setMailParams($oShop); $oSmarty = $this->_getSmarty(); $this->setViewData("aFixedOrderList", $aFixedOrderList); $this->setViewData("aUploadOrderList", $aUploadOrderList); $this->setViewData("shopTemplateDir", Registry::getConfig()->getTemplateDir(false)); $this->setViewData("oShop", $oShop); $oSmarty->template_dir = Registry::getConfig()->getTemplateDir(false); $this->_processViewArray(); $this->setBody($oSmarty->fetch($this->_sFileUploadInfoTemplate)); $this->setAltBody($oSmarty->fetch($this->_sFileUploadInfoPlainTemplate)); $sSubject = Registry::getLang()->translateString('D3FILEUPLOAD_MAIL_SUBJECT', 0); $this->setSubject($sSubject); $sFullName = $oShop->__get('oxshops__oxname')->getRawValue(); $this->setRecipient($oShop->getFieldData('oxinfoemail'), $sFullName); $this->setReplyTo($oShop->getFieldData('oxinfoemail'), $oShop->__get('oxshops__oxname')->getRawValue()); $blSuccess = $this->send(); return $blSuccess; } }