I use multitmerch 8 on opencart 2.3.0.2 with journal 2 for my multivendor store. I recently installed the ajax best checkout extension by xtension.in. Everything seem fine on the checkout but I observed sellers are no longer notified of their product orders via emails as before only customers and admin get notification.
I believe the extension made some changes to the checkout files. I am not an expert in Opencart. Please I need help on how to restore the seller notification .
I see the following error in the log:
Undefined index: seller_text in /home/public_html/vqmod/vqcache/vq2-system_storage_modification_catalog_view_theme_journal2_template_mail_order.tpl on line 93
Thanks
Below is the xtension controller code at \catalog\controller\extension\module\xtensions\checkout\checkout.php
<?php
class ControllerExtensionModuleXtensionsCheckoutCheckout extends Controller {
public function country() {
$json = array();
$this->load->model('localisation/country');
$country_info = $this->model_localisation_country->getCountry($this->request->get['country_id']);
if ($country_info) {
$this->load->model('localisation/zone');
$json = array(
'country_id' => $country_info['country_id'],
'name' => $country_info['name'],
'iso_code_2' => $country_info['iso_code_2'],
'iso_code_3' => $country_info['iso_code_3'],
'address_format' => $country_info['address_format'],
'postcode_required' => $country_info['postcode_required'],
'zone' => $this->model_localisation_zone->getZonesByCountryId($this->request->get['country_id']),
'status' => $country_info['status']
);
}
$this->response->addHeader('Content-Type: application/json');
$this->response->setOutput(json_encode($json));
}
public function customfield() {
$json = array();
// Customer Group
if (isset($this->request->get['customer_group_id']) && is_array($this->config->get('config_customer_group_display')) && in_array($this->request->get['customer_group_id'], $this->config->get('config_customer_group_display'))) {
$customer_group_id = $this->request->get['customer_group_id'];
} else {
$customer_group_id = $this->config->get('config_customer_group_id');
}
$custom_fields = $this->xtensions_checkout->getXtensionsModel($this->config->get('xtensions_custom_fields_model_path'))->getCustomFields($customer_group_id);
foreach ($custom_fields as $custom_field) {
$json[] = array(
'custom_field_id' => $custom_field['custom_field_id'],
'required' => $custom_field['required']
);
}
$this->response->addHeader('Content-Type: application/json');
$this->response->setOutput(json_encode($json));
}
}
?>
Two multimerch vqmods files (I am not sure which is applicable here) multimerch_core.xml
<?xml version="1.0" ?>
<!DOCTYPE modification [
]>
<modification>
<id>MultiMerch Digital Multivendor Marketplace Core</id>
<author>http://multimerch.com/</author>
<file name="system/engine/loader.php">
<operation error="skip">
<search position="after">
$this->registry = $registry;
</search>
<add>
$this->registry->set('MsLoader', \MsLoader::getInstance()->setRegistry($registry));
$this->registry->set('ms_events', new \MultiMerch\Event\EventCollection());
$this->registry->set('ms_event_manager', new \MultiMerch\Event\EventManager());
$this->registry->set('MsHooks', new \MultiMerch\Core\Hook());
$this->registry->set('MsEventManager', new \MultiMerch\Core\Event\EventManager());
$this->registry->set('ms_logger', new \MultiMerch\Logger\Logger());
</add>
</operation>
</file>
<!-- For OpenCart 2.2 and 2.3 -->
<file name="system/framework.php">
<operation>
<search position="after"><![CDATA[
if ($config->has('action_pre_action')) {
]]></search>
<add><![CDATA[
$res = $registry->get('db')->query("SELECT `value` FROM " . DB_PREFIX . "setting WHERE store_id = '0' AND `key`='msconf_config_seo_url_enable'");
$pre_actions = $config->get('action_pre_action');
foreach ($pre_actions as $key => $pre_action) {
if($pre_action == 'startup/seo_url' && $res->num_rows && $res->row['value'])
$pre_actions[$key] = 'startup/multimerch_seo_url';
}
$config->set('action_pre_action', $pre_actions);
]]></add>
</operation>
<operation>
<search position="before"><![CDATA[
// Front Controller
]]></search>
<add><![CDATA[
$registry->get('MsEventManager')->setRegistry($registry);
$registry->get('MsHooks')->setRegistry($registry);
$registry->get('MsHooks')->registerDefaultHooks();
]]></add>
</operation>
</file>
<file name="system/library/template/php.php">
<operation>
<search position="after"><![CDATA[
final class PHP {
]]></search>
<add><![CDATA[
public function __get($key) {
return \MsLoader::getInstance()->getRegistry()->get($key);
}
public function __set($key, $value) {
\MsLoader::getInstance()->getRegistry()->set($key, $value);
}
]]></add>
</operation>
</file>
<file name="system/library/cart/currency.php">
<operation>
<search position="replace"><![CDATA[public function format($number, $currency, $value = '', $format = true) {]]></search>
<add><![CDATA[public function format($number, $currency = '', $value = '', $format = true) {]]></add>
</operation>
<operation>
<search position="after"><![CDATA[public function format]]></search>
<add><![CDATA[
if (!$currency)
$currency = \MsLoader::getInstance()->getRegistry()->get('config')->get('config_currency');
]]></add>
</operation>
<operation>
<search position="after"><![CDATA[public function has]]></search>
<add><![CDATA[
if (!$currency)
$currency = \MsLoader::getInstance()->getRegistry()->get('config')->get('config_currency');
]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[($currency)]]></search>
<add><![CDATA[($currency = '')]]></add>
</operation>
<operation>
<search position="before"><![CDATA[if (isset($this->currencies[$currency])) {]]></search>
<add><![CDATA[
if (!$currency)
$currency = \MsLoader::getInstance()->getRegistry()->get('config')->get('config_currency');
]]></add>
</operation>
</file>
<!-- Enable "-" in routes -->
<file name="system/engine/action.php,system/engine/loader.php,admin/controller/startup/router.php,catalog/controller/startup/router.php">
<operation error="log">
<search position="replace"><![CDATA[preg_replace('/[^a-zA-Z0-9_\/]/', '', (string)$route)]]></search>
<add><![CDATA[preg_replace('/[^a-zA-Z0-9\-_\/]/', '', (string)$route)]]></add>
</operation>
</file>
<!-- IE console fix -->
<file name="catalog/view/theme/*/template/common/header.tpl">
<operation>
<search position="before"><![CDATA[
<?php foreach ($scripts as $script) { ?>
]]></search>
<add><![CDATA[
<?php if(MsLoader::getInstance()->MsHelper->isInstalled()) { ?>
<script type="text/javascript"> if (!window.console) console = {log: function() {}}; var msconf_account_pagination_limit = '<?php echo $this->config->get('msconf_account_pagination_limit'); ?>'; var config_language = <?php echo $dt_language; ?>; var msLanguageDefaults = { ms_account_product_shipping_elsewhere: "<?php echo $this->language->get('ms_account_product_shipping_elsewhere'); ?>"} </script>
<?php } ?>
]]></add>
</operation>
</file>
<!-- load common multimerch files -->
<file name="catalog/controller/common/header.php">
<operation error="log">
<search position="after"><![CDATA[
public function index() {
]]></search>
<add><![CDATA[
if(MsLoader::getInstance()->MsHelper->isInstalled()) {
$data = array_merge(MsLoader::getInstance()->getRegistry()->get('load')->language('multiseller/multiseller'), isset($data) ? $data : array());
MsLoader::getInstance()->MsHelper->addStyle('multiseller');
// note: renamed catalog
$lang = "view/javascript/multimerch/datatables/lang/" . $this->config->get('config_language') . ".lng";
$data['dt_language'] = file_exists(DIR_APPLICATION . $lang) ? "'catalog/$lang'" : "undefined";
// Add complemented common.js
$this->document->addScript('catalog/view/javascript/ms-common.js');
$data['ms_seller_created'] = MsLoader::getInstance()->MsSeller->isCustomerSeller($this->customer->getId());
}
]]></add>
</operation>
</file>
<!-- Get order status id from database -->
<file name="catalog/model/account/order.php">
<operation>
<search position="replace"><![CDATA[
$query = $this->db->query("SELECT o.order_id, o.firstname, o.lastname, os.name as status, o.date_added, o.total, o.currency_code, o.currency_value FROM `" . DB_PREFIX . "order` o LEFT JOIN " . DB_PREFIX . "order_status os ON (o.order_status_id = os.order_status_id) WHERE o.customer_id = '" . (int)$this->customer->getId() . "' AND o.order_status_id > '0' AND o.store_id = '" . (int)$this->config->get('config_store_id') . "' AND os.language_id = '" . (int)$this->config->get('config_language_id') . "' ORDER BY o.order_id DESC LIMIT " . (int)$start . "," . (int)$limit);
]]></search>
<add><![CDATA[
if(MsLoader::getInstance()->MsHelper->isInstalled()) {
$query = $this->db->query("SELECT o.order_id, o.firstname, o.lastname, os.name as status, os.order_status_id, o.date_added, o.total, o.currency_code, o.currency_value FROM `" . DB_PREFIX . "order` o LEFT JOIN " . DB_PREFIX . "order_status os ON (o.order_status_id = os.order_status_id) WHERE o.customer_id = '" . (int)$this->customer->getId() . "' AND o.order_status_id > '0' AND o.store_id = '" . (int)$this->config->get('config_store_id') . "' AND os.language_id = '" . (int)$this->config->get('config_language_id') . "' ORDER BY o.order_id DESC LIMIT " . (int)$start . "," . (int)$limit);
} else {
$query = $this->db->query("SELECT o.order_id, o.firstname, o.lastname, os.name as status, o.date_added, o.total, o.currency_code, o.currency_value FROM `" . DB_PREFIX . "order` o LEFT JOIN " . DB_PREFIX . "order_status os ON (o.order_status_id = os.order_status_id) WHERE o.customer_id = '" . (int)$this->customer->getId() . "' AND o.order_status_id > '0' AND o.store_id = '" . (int)$this->config->get('config_store_id') . "' AND os.language_id = '" . (int)$this->config->get('config_language_id') . "' ORDER BY o.order_id DESC LIMIT " . (int)$start . "," . (int)$limit);
}
]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[
public function getOrder($order_id) {
]]></search>
<add><![CDATA[
public function getOrder($order_id, $type = NULL) {
]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[
$order_query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "order` WHERE order_id = '" . (int)$order_id . "' AND customer_id = '" . (int)$this->customer->getId() . "' AND order_status_id > '0'");
]]></search>
<add><![CDATA[
if(MsLoader::getInstance()->MsHelper->isInstalled()) {
if (empty($type)) {
$order_query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "order` WHERE order_id = '" . (int)$order_id . "' AND customer_id = '" . (int)$this->customer->getId() . "' AND order_status_id > '0'");
} elseif($type == 'seller') {
$order_query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "order` AS o, `" . DB_PREFIX . "ms_order_product_data` AS m WHERE o.order_id = m.order_id AND o.order_id = " . (int)$order_id . " AND m.seller_id = " . (int)$this->customer->getId() . " AND o.order_status_id > '0'");
}
} else {
$order_query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "order` WHERE order_id = '" . (int)$order_id . "' AND customer_id = '" . (int)$this->customer->getId() . "' AND order_status_id > '0'");
}
]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "order_product WHERE order_id = '" . (int)$order_id . "'");
]]></search>
<add><![CDATA[
if(MsLoader::getInstance()->MsHelper->isInstalled()) {
$query = $this->db->query("SELECT op.*, opd.* FROM " . DB_PREFIX . "order_product op LEFT JOIN " . DB_PREFIX . "ms_order_product_data opd ON (op.order_id = opd.order_id AND op.product_id = opd.product_id AND op.order_product_id = opd.order_product_id) WHERE op.order_id = '" . (int)$order_id . "'");
if(empty($query->rows)) {
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "order_product WHERE order_id = '" . (int)$order_id . "'");
}
} else {
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "order_product WHERE order_id = '" . (int)$order_id . "'");
}
]]></add>
</operation>
</file>
<file name="catalog/controller/account/order.php">
<operation>
<search position="after"><![CDATA[
foreach ($products as $product) {
]]></search>
<add><![CDATA[
$ms_order_product_data = FALSE;
if (MsLoader::getInstance()->MsHelper->isInstalled()) {
$ms_order_product_data = $this->MsLoader->MsOrderData->getOrderData(array(
'product_id' => $product['product_id'],
'order_id' => $product['order_id'],
'order_product_id' => $product['order_product_id'],
'single' => 1
));
$this->load->language('multiseller/multiseller');
}
]]></add>
</operation>
<operation>
<search position="after"><![CDATA[
'reorder' => $reorder,
]]></search>
<add><![CDATA[
'shipping_method' => !empty($ms_order_product_data['shipping_method']) ? " <i>(" . sprintf($this->language->get('mm_account_order_shipping_via'), $ms_order_product_data['shipping_method']) . ")</i>" : '',
]]></add>
</operation>
</file>
<file name="catalog/view/theme/*/template/account/order_info.tpl">
<operation error="log">
<search position="replace"><![CDATA[
<?php echo $product['name']; ?>
]]></search>
<add><![CDATA[
<?php echo $product['name'] . " " . $product['shipping_method']; ?>
]]></add>
</operation>
</file>
<file name="catalog/controller/common/footer.php">
<operation>
<search position="after"><![CDATA[
public function index() {
]]></search>
<add><![CDATA[
$data = array_merge(MsLoader::getInstance()->getRegistry()->get('load')->language('multiseller/multiseller'), isset($data) ? $data : array());
]]></add>
</operation>
</file>
<file name="catalog/view/theme/*/template/common/footer.tpl">
<operation error="skip">
<search position="replace"><![CDATA[
<div id="powered"><?php echo $powered; ?></div>
]]></search>
<add><![CDATA[
<div id="powered"><?php echo $powered; ?><?php echo $ms_footer; ?></div>
]]></add>
</operation>
</file>
<!-- Disable the product if quantity is 0 -->
<file name="catalog/model/checkout/order.php">
<operation>
<search position="after"><![CDATA[
$this->db->query("UPDATE " . DB_PREFIX . "product SET quantity = (quantity - " . (int)$order_product['quantity'] . ") WHERE product_id = '" . (int)$order_product['product_id'] . "' AND subtract = '1'");
]]></search>
<add><![CDATA[
if(MsLoader::getInstance()->MsHelper->isInstalled()) {
if ($this->config->get('msconf_disable_product_after_quantity_depleted')) {
$res = $this->db->query("SELECT quantity FROM " . DB_PREFIX . "product WHERE product_id = '" . (int)$order_product['product_id'] . "'");
if ((int)$res->row['quantity'] <= 0) {
MsLoader::getInstance()->MsProduct->changeStatus((int)$order_product['product_id'], MsProduct::STATUS_DISABLED);
MsLoader::getInstance()->MsProduct->disapprove((int)$order_product['product_id']);
}
}
}
]]></add>
</operation>
<operation>
<search position="before"><![CDATA[
// Admin Alert Mail
]]></search>
<add><![CDATA[
if(MsLoader::getInstance()->MsHelper->isInstalled()) {
$this->MsLoader->MsMail->sendOrderMails($order_id);
}
]]></add>
</operation>
</file>
<!-- Create product return instance for seller -->
<!--<file name="catalog/controller/account/return.php">
<operation>
<search position="after" offset="1"><![CDATA[
$this->model_account_activity->addActivity('return_guest', $activity_data);
]]></search>
<add><![CDATA[
$data = $this->request->post;
$data['return_status_id'] = (int)$this->config->get('config_return_status_id');
$data['seller_id'] = MsLoader::getInstance()->MsProduct->getSellerId($data['product_id']);
$seller_return_id = MsLoader::getInstance()->MsReturn->createReturn($data);
]]></add>
</operation>
</file>-->
<!-- Hide shipping calculations from cart if MM Vendor Shipping enabled. -->
<file name="catalog/controller/extension/total/shipping.php">
<operation>
<search position="replace"><![CDATA[
if ($this->config->get('shipping_status') && $this->config->get('shipping_estimator') && $this->cart->hasShipping()) {
]]></search>
<add><![CDATA[
if ($this->config->get('shipping_status') && $this->config->get('shipping_estimator') && $this->cart->hasShipping() && (MsLoader::getInstance()->MsHelper->isInstalled() ? (int)$this->config->get('msconf_shipping_type') !== 2 : true)) {
]]></add>
</operation>
</file>
<file name="catalog/controller/checkout/confirm.php">
<operation>
<search position="replace"><![CDATA[
if (!isset($this->session->data['shipping_method'])) {
]]></search>
<add><![CDATA[
if(MsLoader::getInstance()->MsHelper->isInstalled() && (int)$this->config->get('msconf_shipping_type') == 2) {
foreach($this->cart->getProducts() as $product) {
if (!isset($this->session->data['ms_cart_product_shipping']['fixed'][$product['product_id']]) && !isset($this->session->data['ms_cart_product_shipping']['combined'][$product['product_id']]) && !isset($this->session->data['ms_cart_product_shipping']['free'][$product['product_id']])) {
$redirect = $this->url->link('checkout/checkout', '', true);
}
}
} else if (!isset($this->session->data['shipping_method'])) {
]]></add>
</operation>
<operation>
<search position="after"><![CDATA[
unset($this->session->data['shipping_methods']);
]]></search>
<add><![CDATA[
if(isset($this->session->data['ms_cart_product_shipping']))
unset($this->session->data['ms_cart_product_shipping']);
if(isset($this->session->data['ms_coupons']))
unset($this->session->data['ms_coupons']);
]]></add>
</operation>
</file>
<file name="catalog/controller/checkout/success.php">
<operation>
<search position="after"><![CDATA[
unset($this->session->data['totals']);
]]></search>
<add><![CDATA[
if(isset($this->session->data['ms_cart_product_shipping']))
unset($this->session->data['ms_cart_product_shipping']);
if(isset($this->session->data['ms_coupons']))
unset($this->session->data['ms_coupons']);
]]></add>
</operation>
</file>
<!-- add mm mail to customer before $this->response->redirect($this->url->link('account/return/success', '', true)); -->
<file name="catalog/controller/account/return.php">
<operation>
<search position="after"><![CDATA[
public function add() {
]]></search>
<add><![CDATA[
if(MsLoader::getInstance()->MsHelper->isInstalled()) {
if(isset($this->request->get['product_id'])) {
$this->session->data['return_product_id'] = $this->request->get['product_id'];
}
}
]]></add>
</operation>
<operation>
<search position="before"><![CDATA[
$this->response->redirect($this->url->link('account/return/success', '', true));
]]></search>
<add><![CDATA[
if(MsLoader::getInstance()->MsHelper->isInstalled()) {
// get product seller's email
if(isset($this->session->data['return_product_id'])) {
$seller_id = MsLoader::getInstance()->MsProduct->getSellerId($this->session->data['return_product_id']);
unset($this->session->data['return_product_id']);
if($seller_id) {
$seller_email = MsLoader::getInstance()->MsSeller->getSellerEmail($seller_id);
if($seller_email) {
$this->load->language('multiseller/multiseller');
$serviceLocator = MsLoader::getInstance()->load('\MultiMerch\Module\MultiMerch')->getServiceLocator();
$mailTransport = $serviceLocator->get('MailTransport');
$mails = new \MultiMerch\Mail\Message\MessageCollection();
$MailProductReturned = $serviceLocator->get('MailProductReturned', false)
->setTo($seller_email)
->setData(array(
'product_name' => $this->request->post['product'],
'store_name' => $this->config->get('config_name')
));
$mails->add($MailProductReturned);
$mailTransport->sendMails($mails);
}
}
}
}
]]></add>
</operation>
</file>
<file name="catalog/controller/account/register.php">
<operation>
<search position="before"><![CDATA[
// Add to activity log
]]></search>
<add><![CDATA[
if(MsLoader::getInstance()->MsHelper->isInstalled()) {
$this->ms_events->add(new \MultiMerch\Event\Event(array(
'customer_id' => $this->customer->getId(),
'event_type' => \MultiMerch\Event\Event::CUSTOMER_CREATED,
'data' => array()
)));
if($this->ms_events->count()) {
$this->ms_event_manager->create($this->ms_events);
}
}
]]></add>
</operation>
</file>
<!--<file name="admin/controller/setting/setting.php">
<operation>
<search position="before"><![CDATA[
$this->session->data['success'] = $this->language->get('text_success');
]]></search>
<add><![CDATA[
if($this->request->post['config_language'] && $this->session->data['language'] !== $this->request->post['config_language']) {
$this->session->data['language'] = $this->request->post['config_language'];
}
]]></add>
</operation>
</file>-->
<file name="catalog/controller/checkout/cart.php">
<operation error="log">
<search position="before" index="1"><![CDATA[
if ($this->config->get($result['code'] . '_status')) {
]]></search>
<add><![CDATA[
if ($result['code'] === 'mm_shipping_total')
continue;
]]></add>
</operation>
</file>
</modification>
and the other vqmod file multimerch_core_transactions.xml
<?xml version="1.0" ?>
<!DOCTYPE modification [
]>
<modification>
<id>MultiMerch Core Transactions</id>
<author>http://multimerch.com/</author>
<!-- transactions for order -->
<file name="catalog/model/checkout/order.php">
<operation>
<search position="before"><![CDATA[return $order_id;]]></search>
<add><![CDATA[
if(MsLoader::getInstance()->MsHelper->isInstalled())
$this->MsLoader->MsTransaction->createMsOrderDataEntries($order_id);
]]></add>
</operation>
<operation>
<search position="after"><![CDATA[
$this->db->query("UPDATE `" . DB_PREFIX . "order` SET order_status_id = '" . (int)$order_status_id . "', date_modified = NOW() WHERE order_id = '" . (int)$order_id . "'");
]]></search>
<add><![CDATA[
if(MsLoader::getInstance()->MsHelper->isInstalled())
$this->MsLoader->MsTransaction->createMsOrderBalanceEntries($order_id, $order_status_id);
]]></add>
</operation>
<operation>
<search position="after"><![CDATA[
if (!in_array($order_info['order_status_id'], array_merge($this->config->get('config_processing_status')
]]></search>
<add><![CDATA[
if(MsLoader::getInstance()->MsHelper->isInstalled()) {
$event_exists = $this->ms_event_manager->getEvents(array(
'event_type' => \MultiMerch\Event\Event::ORDER_CREATED,
'data' => json_encode(array('order_id' => (int)$order_id)),
'single' => 1
));
if(empty($event_exists)) {
$this->ms_events->add(new \MultiMerch\Event\Event(array(
'customer_id' => $this->customer->getId(),
'event_type' => \MultiMerch\Event\Event::ORDER_CREATED,
'data' => array('order_id' => (int)$order_id)
)));
}
if($this->ms_events->count()) {
$this->ms_event_manager->create($this->ms_events);
}
}
]]></add>
</operation>
</file>
<!-- Fix admin order edit -->
<file name="catalog/controller/api/order.php">
<operation>
<search position="after"><![CDATA[
$this->model_checkout_order->editOrder($order_id, $order_data);
]]></search>
<add><![CDATA[
if(MsLoader::getInstance()->MsHelper->isInstalled())
$this->MsLoader->MsTransaction->adminUpdateMsOrderDataEntries($order_id);
]]></add>
</operation>
<operation>
<search position="after"><![CDATA[
$this->model_checkout_order->addOrderHistory($order_id,
]]></search>
<add><![CDATA[
if(MsLoader::getInstance()->MsHelper->isInstalled()) {
$transactions = $this->MsLoader->MsTransaction->createMsOrderBalanceEntries($order_id, $this->request->post['order_status_id']);
$transaction_ids = [];
foreach($transactions as $transaction_id) {
if($transaction_id) $transaction_ids[] = $transaction_id;
}
$suborders = $this->MsLoader->MsSuborder->getSuborders(array(
'order_id' => $order_id
));
$sellers_suborders_info = array();
foreach($suborders as $suborder) {
$sellers_suborders_info[] = $suborder['seller'] . ' (#' . $order_id . '-' . $suborder['suborder_id']. ')';
}
$this->load->language('multiseller/multiseller');
$json['success'] = sprintf($this->language->get('ms_order_success_suborders_modified'), $order_id, implode(', ', $sellers_suborders_info));
if(!empty($transaction_ids)) {
$json['success'] .= ' ' . sprintf($this->language->get('ms_order_success_transactions_created'), implode(', ', $transaction_ids));
}
}
]]></add>
</operation>
<operation>
<search position="replace" index="5"><![CDATA[
$json['success'] = $this->language->get('text_success');
]]></search>
<add><![CDATA[
if(!MsLoader::getInstance()->MsHelper->isInstalled()) {
$json['success'] = $this->language->get('text_success');
}
]]></add>
</operation>
</file>
<file name="admin/view/template/marketing/coupon_form.tpl">
<operation>
<search position="before"><![CDATA[
<div class="panel panel-default">
]]></search>
<add><![CDATA[
<?php if(MsLoader::getInstance()->MsHelper->isInstalled()) { ?>
<div class="alert alert-warning" role="alert">
<?php echo MsLoader::getInstance()->getRegistry()->get('language')->get('ms_fixed_coupon_warning'); ?>
</div>
<?php } ?>
]]></add>
</operation>
</file>
<file name="admin/view/template/sale/voucher_form.tpl">
<operation>
<search position="before"><![CDATA[
<div class="panel panel-default">
]]></search>
<add><![CDATA[
<?php if(MsLoader::getInstance()->MsHelper->isInstalled()) { ?>
<div class="alert alert-warning" role="alert">
<?php echo MsLoader::getInstance()->getRegistry()->get('language')->get('ms_voucher_warning'); ?>
</div>
<?php } ?>
]]></add>
</operation>
</file>
<file name="admin/view/template/sale/voucher_list.tpl">
<operation>
<search position="before"><![CDATA[
<div class="panel panel-default">
]]></search>
<add><![CDATA[
<?php if(MsLoader::getInstance()->MsHelper->isInstalled()) { ?>
<div class="alert alert-warning" role="alert">
<?php echo MsLoader::getInstance()->getRegistry()->get('language')->get('ms_voucher_warning'); ?>
</div>
<?php } ?>
]]></add>
</operation>
</file>
<file name="catalog/controller/extension/total/coupon.php">
<operation>
<search position="before"><![CDATA[
$this->response->addHeader
]]></search>
<add><![CDATA[
if(MsLoader::getInstance()->MsHelper->isInstalled()) {
if(isset($coupon_info["type"]) AND $coupon_info["type"] == "F"){
unset($json['redirect']);
unset($this->session->data['success']);
unset($this->session->data['coupon']);
$this->load->language('multiseller/multiseller');
$json['error'] = $this->language->get('ms_error_fixed_coupon_warning');
}
}
]]></add>
</operation>
</file>
<file name="catalog/controller/extension/total/voucher.php">
<operation>
<search position="before"><![CDATA[
$this->response->addHeader
]]></search>
<add><![CDATA[
if(MsLoader::getInstance()->MsHelper->isInstalled()) {
unset($json['redirect']);
unset($this->session->data['success']);
unset($this->session->data['voucher']);
$this->load->language('multiseller/multiseller');
$json['error'] = $this->language->get('ms_error_voucher_warning');
}
]]></add>
</operation>
</file>
<!-- MultiMerch Discount coupons -->
<file name="catalog/controller/checkout/cart.php">
<operation>
<search position="replace"><![CDATA[$result = $this->load->controller('extension/total/' . basename($file, '.php'));]]></search>
<add><![CDATA[
$ms_controller_path = 'extension/total/' . basename($file, '.php');
if(MsLoader::getInstance()->MsHelper->isInstalled() && $this->config->get('msconf_allow_seller_coupons') && (string)basename($file, '.php') === 'coupon') {
$ms_controller_path = 'multimerch/cart_coupon';
}
$result = $this->load->controller($ms_controller_path);
]]></add>
</operation>
</file>
</modification>