Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature may not be available in some browsers.
Да, с "задваяйцами" - проблема. Что только не пробовали.
При создании заказа - все замечтаельно: приходят только письма от Emails Manager. А вот при изменении статусов заказов в админке летят и кривые виртовские уведомления и письма от Emails Manager. Причем только покупателю. Joomla 3.9.0 + Virt 3.4.2.
Но зато удалось подружить Emails Manager с AwoCoupon 3.5.6.6 для автоматической генерации и отправки купонов по разным условиям.
$res = true;
shopFunctionsF::sendMailVmemPro('invoice', $order['details']['BT']->email, $vars, null,$vars['doVendor'],$this->useDefaultEmailOrderStatus);
public static function prepareViewForMail($viewName, $vars, $controllerName = false) {
public static function sendMailVmemPro($viewName, $recipient, $vars = array(), $controllerName = NULL, $noVendorMail = FALSE,$useDefault=true) {
self::loadOrderLanguages();
$view = self::prepareViewForMail($viewName, $vars, $controllerName);
//VMEEPRO START
$user = true;
$vmempro_args = array();
$vmempro_trigger = array();
switch ($viewName){
//order confirmation, order change status
case 'invoice':
$vmempro_args['order_id'] = $vars['orderDetails']['details']['BT']->virtuemart_order_id;
if( isset($vars['newOrderData']['order_status']) &&
isset($vars['newOrderData']['current_order_status']) &&
count( $vars['orderDetails']['history']) > 2){
//indication that this is status changed
$vmempro_trigger[] = array('trigger'=>'TRIGGER_ORDER_STATUS_CHANGED','type'=>'user');
if (isset($view->doVendor) && !$noVendorMail) {
$vmempro_trigger[] = array('trigger'=>'TRIGGER_ADMIN_ORDER_STATUS_CHANGED','type'=>'admin');
}
}
else{
//new order
$vmempro_trigger[] = array('trigger'=>'TRIGGER_ORDER_CONFIRMATION','type'=>'user');
if (isset($view->doVendor) && !$noVendorMail) {
$vmempro_trigger[] = array('trigger'=>'TRIGGER_ADMIN_ORDER_CONFIRMATION','type'=>'admin');
}
}
break;
//user registration
case 'user':
$vmempro_args['user_name'] = $vars['user']->username;
$vmempro_args['password'] = $vars['password'];
$vmempro_trigger[] = array('trigger'=>'TRIGGER_USER_REGISTRATION','type'=>'user');
if (isset($view->doVendor) && !$noVendorMail) {
$vmempro_trigger[] = array('trigger'=>'TRIGGER_ADMIN_USER_REGISTRATION','type'=>'admin');
}
break;
//notify customer that product is back in stock
case 'productdetails':
case 'waitinglist':
$urlPArams = parse_url($vars['link'],PHP_URL_QUERY);
parse_str($urlPArams);
$vmempro_args['product_id'] = (int)$virtuemart_product_id;
$vmempro_args['email'] = $recipient;
if(!is_null($vars['user'])){
$vmempro_args['user_name'] = $vars['user'];
}
$vmempro_trigger[] = array('trigger'=>'TRIGGER_WAITING_LIST','type'=>'user');
if (isset($view->doVendor) && !$noVendorMail) {
$vmempro_trigger[] = array('trigger'=>'TRIGGER_ADMIN_WAITING_LIST','type'=>'admin');
}
break;
//ask question about product
case 'vendor':
break;
// ask question email
case 'askquestion':
break;
//recommend product to a friend
case 'recommend':
/*$vmempro_args['product_id'] = $vars['product']->virtuemart_product_id;
$vmempro_args['user_name'] = $vars['user']['name'];
$vmempro_args['user_email'] = $vars['user']['email'];
$vmempro_args['to_mail'] = $recipient;
$vmempro_args['message'] = JFactory::getApplication()->input->get('comment', '','RAW');
$vmempro_trigger[] = array('trigger'=>'TRIGGER_RECOMMEND','type'=>'user');*/
break;
default:
break;
}
if(!empty($vmempro_trigger)){
if((isset($vars['newOrderData']['customer_notified']) && $vars['newOrderData']['customer_notified']==1) || (!isset($vars['newOrderData']) && $viewName != 'invoice')){
JPluginHelper::importPlugin('vmeepro');
$dispatcher = JDispatcher::getInstance();
foreach ($vmempro_trigger as $trigger){
$res = $dispatcher->trigger('OnSendMail', array($trigger['trigger'],$vmempro_args));
if($res[0] === false){
if ($trigger['type'] == 'admin') {
self::sendVmMail($view, $view->vendorEmail, true);
}
else{
$user= self::sendVmMail($view, $recipient,$noVendorMail);
}
}
}
}
}
return $user;
//VMEEPRO END
}
Похоже, что установщик не понимает настройки окружения:Подскажите. Установил версию 1.1.7 на J 3.7.0 + VM 3.2.1 и блин выдает ошибку:
1146 Table 'shop_lyustry.#__vmee_plus_templates' doesn't exist
при установке не создались я так понимаю таблицы.
почему это может быть?