-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
-
-
+
+
-
+
-
-
+
+
-
-
-
-
+
\ No newline at end of file
diff --git a/upload/catalog/view/theme/default/template/multiseller/dialog-sellercontact.tpl b/upload/catalog/view/theme/default/template/multiseller/dialog-sellercontact.tpl
index 63f47e6b..ab2ac2a7 100644
--- a/upload/catalog/view/theme/default/template/multiseller/dialog-sellercontact.tpl
+++ b/upload/catalog/view/theme/default/template/multiseller/dialog-sellercontact.tpl
@@ -1,31 +1,24 @@
-
- ]]>
-
config->get('msconf_hide_sellers_product_count') == 1) { ?>
-
-
- ]]>
-
-
data = array_merge($this->data, $this->load->language('multiseller/multiseller'));
- $this->data['ms_total_products'] = $this->MsLoader->MsProduct->getTotalProducts(array(
+ $data = array_merge($this->load->language('multiseller/multiseller'), isset($data) ? $data : array());
+ $data['ms_total_products'] = $this->MsLoader->MsProduct->getTotalProducts(array(
'enabled' => 1,
//'product_status' => array(MsProduct::STATUS_ACTIVE),
));
- $this->data['ms_total_sellers'] = $this->MsLoader->MsSeller->getTotalSellers(array(
+ $data['ms_total_sellers'] = $this->MsLoader->MsSeller->getTotalSellers(array(
'seller_status' => array(MsSeller::STATUS_ACTIVE)
));
$this->MsLoader->MsHelper->addStyle('multiseller');
// note: renamed catalog
- $lang = "view/javascript/multimerch/datatables/lang/" . $this->config->get('config_language') . ".txt";
- $this->data['dt_language'] = file_exists(DIR_APPLICATION . $lang) ? "'catalog/$lang'" : "undefined";
+ $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'] = $this->MsLoader->MsSeller->isCustomerSeller($this->customer->getId());
]]>
@@ -91,13 +78,13 @@
redirect($this->url->link('account/account', '', 'SSL'));
+ $this->response->redirect($this->url->link('account/account', '', 'SSL'));
]]>
MsLoader->MsSeller->isCustomerSeller($this->customer->getId())) {
- $this->redirect($this->url->link('seller/account-dashboard', '', 'SSL'));
+ $this->response->redirect($this->url->link('seller/account-dashboard', '', 'SSL'));
} else {
- $this->redirect($this->url->link('account/account', '', 'SSL'));
+ $this->response->redirect($this->url->link('account/account', '', 'SSL'));
}
]]>
@@ -107,10 +94,10 @@
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 os.language_id = '" . (int)$this->config->get('config_language_id') . "' ORDER BY o.order_id DESC LIMIT " . (int)$start . "," . (int)$limit);
+ $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);
]]>
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 os.language_id = '" . (int)$this->config->get('config_language_id') . "' ORDER BY o.order_id DESC LIMIT " . (int)$start . "," . (int)$limit);
+ $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);
]]>
@@ -135,43 +122,13 @@
-
-
-
- load->model('localisation/order_status');
- $this->data['order_statuses'] = $this->model_localisation_order_status->getOrderStatuses();
- ]]>
-
-
-
-
- MsLoader->MsProduct->getSellerId($product['product_id']);
- ]]>
-
-
-
- data['products'][] = array(
- ]]>
- $this->model_localisation_order_status->getSuborderStatusId($order_id, $seller_id),
- ]]>
-
-
-
data = array_merge($this->data, $this->load->language('multiseller/multiseller'));
+ $data = array_merge($this->load->language('multiseller/multiseller'), isset($data) ? $data : array());
]]>
diff --git a/upload/vqmod/xml/multimerch_core_addtocart.xml b/upload/vqmod/xml/multimerch_core_addtocart.xml
deleted file mode 100644
index a2e1ae4a..00000000
--- a/upload/vqmod/xml/multimerch_core_addtocart.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-
-
-]>
-
- MultiMerch Core Disallow Own Products in Cart
- http://multimerch.com/
-
-
-
- model_catalog_product->getProduct($product_id);
- ]]>
- db->query("SELECT seller_id FROM " . DB_PREFIX . "ms_product WHERE product_id = " . (int)$product_id);
- $seller_id = isset($res->row['seller_id']) ? (int)$res->row['seller_id'] : 0;
- if ($seller_id && $seller_id == (int)$this->customer->getId() && $this->customer->isLogged()) {
- $this->load->language('multiseller/multiseller');
- $product_info = false;
- $json['error']['seller'] = $this->language->get('ms_error_seller_product');
- }
- ]]>
-
-
-
-
-
-
- ' + json['error']['seller'] + '');
- $('.warning').fadeIn('slow');
- $('html, body').animate({ scrollTop: 0 }, 'slow');
- }
- ]]>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/upload/vqmod/xml/multimerch_core_admin.xml b/upload/vqmod/xml/multimerch_core_admin.xml
index 343cf858..fb3e878b 100644
--- a/upload/vqmod/xml/multimerch_core_admin.xml
+++ b/upload/vqmod/xml/multimerch_core_admin.xml
@@ -72,33 +72,44 @@
-
-
+
+
db->query("DELETE FROM `" . DB_PREFIX . "ms_order_product_data` WHERE order_id = '" . (int)$order_id . "'");
+ $data = array_merge(isset($data) ? $data : array(), $this->load->language('multiseller/multiseller'));
+ $lang = "view/javascript/multimerch/datatables/lang/" . $this->config->get('config_admin_language') . ".lng";
+ $data['dt_language'] = file_exists(DIR_APPLICATION . $lang) ? "'$lang'" : "undefined";
]]>
-
-
+
-
+
]]>
+ MultiMerch Core Class not found. Before proceeding with the installation, please make sure that:
+
+
+
+
load->model('multiseller/upgrade'); ?>
-
+
MsLoader->MsHelper->isInstalled() && !$this->model_multiseller_upgrade->isDbLatest()) { ?>
- language->get('ms_db_upgrade'), $this->url->link('module/multiseller/upgradeDb', 'token=' . $this->session->data['token'], 'SSL')); ?>
+ language->get('ms_db_upgrade'), $this->url->link('module/multiseller/upgradeDb', 'token=' . $this->session->data['token'], 'SSL')); ?>
session->data['ms_db_latest'])) { ?>
- session->data['ms_db_latest']; ?>
+ session->data['ms_db_latest']; ?>
session->data['ms_db_latest']); ?>
]]>
@@ -109,68 +120,54 @@
]]>
config = $config; ?>
]]>
-
-
-
-
-
-
-
-
- ]]>
-
-
+
+
data = array_merge($this->data, $this->load->language('multiseller/multiseller'));
- $lang = "view/javascript/multimerch/datatables/lang/" . $this->config->get('config_admin_language') . ".txt";
- $this->data['dt_language'] = file_exists(DIR_APPLICATION . $lang) ? "'$lang'" : "undefined";
+ $data = array_merge(isset($data) ? $data : array(), $this->load->language('multiseller/multiseller'));
]]>
-
+
+
+
- data['stores'] = array();
+
]]>
data['ms_link_sellers'] = $this->url->link('multiseller/seller', 'token=' . $this->session->data['token'], 'SSL');
- $this->data['ms_link_seller_groups'] = $this->url->link('multiseller/seller-group', 'token=' . $this->session->data['token'], 'SSL');
- $this->data['ms_link_attributes'] = $this->url->link('multiseller/attribute', 'token=' . $this->session->data['token'], 'SSL');
- $this->data['ms_link_products'] = $this->url->link('multiseller/product', 'token=' . $this->session->data['token'], 'SSL');
- $this->data['ms_link_payment'] = $this->url->link('multiseller/payment', 'token=' . $this->session->data['token'], 'SSL');
- $this->data['ms_link_transactions'] = $this->url->link('multiseller/transaction', 'token=' . $this->session->data['token'], 'SSL');
- $this->data['ms_link_settings'] = $this->url->link('module/multiseller', 'token=' . $this->session->data['token'], 'SSL');
+
+
+
]]>
-
+
- data['products'][] = array(
+
language->load('multiseller/multiseller');
- $this->data['column_seller'] = $this->language->get('ms_seller');
+ $data['column_seller'] = $this->language->get('ms_seller');
// todo check
$seller = $this->MsLoader->MsSeller->getSeller(
$this->MsLoader->MsProduct->getSellerId($product['product_id']),
@@ -183,7 +180,7 @@
data['products'][] = array(
+ $data['products'][] = array(
]]>
array(
@@ -192,39 +189,128 @@
),
]]>
+
+
+ $product['product_id'],
+ ]]>
+ array(
+ 'seller_id' => isset($seller['seller_id']) ? $seller['seller_id'] : '',
+ 'nickname' => isset($seller['ms.nickname']) ? $seller['ms.nickname'] : ''
+ ),
+ ]]>
+
+
+
+
+ MsLoader->MsOrderData->getSuborders(array(
+ 'order_id' => $this->request->get['order_id']
+ ));
+
+ foreach ($suborders as $sub) {
+ $suborder_histories = array();
+
+ $seller = $this->MsLoader->MsSeller->getSellers(array(
+ 'seller_id' => $sub['seller_id'],
+ 'single' => 1
+ ));
+
+ // fetch histories
+ $histories = $this->MsLoader->MsOrderData->getSuborderHistory(array(
+ 'suborder_id' => $sub['suborder_id']
+ ));
+
+ // format histories
+ foreach ($histories as $h) {
+ $suborder_histories[] = array(
+ 'date_added' => date($this->language->get('date_format_short'), strtotime($h['date_added'])),
+ 'status' => $this->MsLoader->MsHelper->getStatusName(array('order_status_id' => $h['order_status_id'])),
+ 'comment' => $h['comment']
+ );
+ }
+
+ // assign histories
+ $data['seller_histories'][$sub['seller_id']] = array(
+ 'seller' => $seller[0]['ms.nickname'],
+ 'entries' => $suborder_histories
+ );
+ }
+ ]]>
+
+
]]>
|
+ |
]]>
+
]]>
|
+ |
]]>
:
+ : |
]]>
:
+ : |
]]>
-
+
-
+
+
+
+
+