Тексты товаров в разные ячейки и 404 страница
This commit is contained in:
@@ -23,11 +23,6 @@ class ControllerCatalogProduct extends Controller {
|
||||
$this->load->model('catalog/product');
|
||||
|
||||
if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validateForm()) {
|
||||
$this->request->post['product_description'] = array_map(function($description){
|
||||
|
||||
$description['description'] = implode("__NEWLINE__", $description['description']);
|
||||
return $description;
|
||||
}, $this->request->post['product_description']);
|
||||
$this->model_catalog_product->addProduct($this->request->post);
|
||||
|
||||
$this->session->data['success'] = $this->language->get('text_success');
|
||||
@@ -111,11 +106,6 @@ $this->request->post['product_description'] = array_map(function($description){
|
||||
$this->load->model('catalog/product');
|
||||
|
||||
if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validateForm()) {
|
||||
$this->request->post['product_description'] = array_map(function($description){
|
||||
|
||||
$description['description'] = implode("__NEWLINE__", $description['description']);
|
||||
return $description;
|
||||
}, $this->request->post['product_description']);
|
||||
$this->model_catalog_product->editProduct($this->request->get['product_id'], $this->request->post);
|
||||
|
||||
$this->session->data['success'] = $this->language->get('text_success');
|
||||
|
||||
@@ -1,570 +0,0 @@
|
||||
<?php
|
||||
class ControllerExtensionExportImport extends Controller {
|
||||
private $error = array();
|
||||
private $ssl = 'SSL';
|
||||
|
||||
public function __construct( $registry ) {
|
||||
parent::__construct( $registry );
|
||||
$this->ssl = true;
|
||||
}
|
||||
|
||||
|
||||
public function index() {
|
||||
$this->load->language('extension/export_import');
|
||||
$this->document->setTitle($this->language->get('heading_title'));
|
||||
$this->load->model('extension/export_import');
|
||||
$this->getForm();
|
||||
}
|
||||
|
||||
|
||||
public function upload() {
|
||||
$this->load->language('extension/export_import');
|
||||
$this->document->setTitle($this->language->get('heading_title'));
|
||||
$this->load->model('extension/export_import');
|
||||
if (($this->request->server['REQUEST_METHOD'] == 'POST') && ($this->validateUploadForm())) {
|
||||
if ((isset( $this->request->files['upload'] )) && (is_uploaded_file($this->request->files['upload']['tmp_name']))) {
|
||||
$file = $this->request->files['upload']['tmp_name'];
|
||||
$incremental = ($this->request->post['incremental']) ? true : false;
|
||||
if ($this->model_extension_export_import->upload($file,$this->request->post['incremental'])==true) {
|
||||
$this->session->data['success'] = $this->language->get('text_success');
|
||||
$this->response->redirect($this->url->link('extension/export_import', 'user_token=' . $this->session->data['user_token'], $this->ssl));
|
||||
}
|
||||
else {
|
||||
$this->session->data['warning'] = $this->language->get('error_upload');
|
||||
$href = $this->url->link( 'tool/log', 'user_token='.$this->session->data['user_token'], $this->ssl );
|
||||
$this->session->data['warning'] .= "<br />\n".str_replace('%1',$href,$this->language->get( 'text_log_details_3_x' ));
|
||||
$this->response->redirect($this->url->link('extension/export_import', 'user_token=' . $this->session->data['user_token'], $this->ssl));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->getForm();
|
||||
}
|
||||
|
||||
|
||||
protected function return_bytes($val)
|
||||
{
|
||||
$val = trim($val);
|
||||
|
||||
switch (strtolower(substr($val, -1)))
|
||||
{
|
||||
case 'm': $val = (int)substr($val, 0, -1) * 1048576; break;
|
||||
case 'k': $val = (int)substr($val, 0, -1) * 1024; break;
|
||||
case 'g': $val = (int)substr($val, 0, -1) * 1073741824; break;
|
||||
case 'b':
|
||||
switch (strtolower(substr($val, -2, 1)))
|
||||
{
|
||||
case 'm': $val = (int)substr($val, 0, -2) * 1048576; break;
|
||||
case 'k': $val = (int)substr($val, 0, -2) * 1024; break;
|
||||
case 'g': $val = (int)substr($val, 0, -2) * 1073741824; break;
|
||||
default : break;
|
||||
} break;
|
||||
default: break;
|
||||
}
|
||||
return $val;
|
||||
}
|
||||
|
||||
|
||||
public function download() {
|
||||
$this->load->language( 'extension/export_import' );
|
||||
$this->document->setTitle($this->language->get('heading_title'));
|
||||
$this->load->model( 'extension/export_import' );
|
||||
if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validateDownloadForm()) {
|
||||
$export_type = $this->request->post['export_type'];
|
||||
switch ($export_type) {
|
||||
case 'c':
|
||||
case 'p':
|
||||
case 'u':
|
||||
$min = null;
|
||||
if (isset( $this->request->post['min'] ) && ($this->request->post['min']!='')) {
|
||||
$min = $this->request->post['min'];
|
||||
}
|
||||
$max = null;
|
||||
if (isset( $this->request->post['max'] ) && ($this->request->post['max']!='')) {
|
||||
$max = $this->request->post['max'];
|
||||
}
|
||||
if (($min==null) || ($max==null)) {
|
||||
$this->model_extension_export_import->download($export_type, null, null, null, null);
|
||||
} else if ($this->request->post['range_type'] == 'id') {
|
||||
$this->model_extension_export_import->download($export_type, null, null, $min, $max);
|
||||
} else {
|
||||
$this->model_extension_export_import->download($export_type, $min*($max-1-1), $min, null, null);
|
||||
}
|
||||
break;
|
||||
case 'o':
|
||||
$this->model_extension_export_import->download('o', null, null, null, null);
|
||||
break;
|
||||
case 'a':
|
||||
$this->model_extension_export_import->download('a', null, null, null, null);
|
||||
break;
|
||||
case 'f':
|
||||
if ($this->model_extension_export_import->existFilter()) {
|
||||
$this->model_extension_export_import->download('f', null, null, null, null);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
$this->response->redirect( $this->url->link( 'extension/export_import', 'user_token='.$this->request->get['user_token'], $this->ssl) );
|
||||
}
|
||||
|
||||
$this->getForm();
|
||||
}
|
||||
|
||||
|
||||
public function settings() {
|
||||
$this->load->language('extension/export_import');
|
||||
$this->document->setTitle($this->language->get('heading_title'));
|
||||
$this->load->model('extension/export_import');
|
||||
if (($this->request->server['REQUEST_METHOD'] == 'POST') && ($this->validateSettingsForm())) {
|
||||
$this->load->model('setting/setting');
|
||||
$this->model_setting_setting->editSetting('export_import', $this->request->post);
|
||||
$this->session->data['success'] = $this->language->get('text_success_settings');
|
||||
$this->response->redirect($this->url->link('extension/export_import', 'user_token=' . $this->session->data['user_token'], $this->ssl));
|
||||
}
|
||||
$this->getForm();
|
||||
}
|
||||
|
||||
|
||||
protected function getForm() {
|
||||
$data = array();
|
||||
$data['heading_title'] = $this->language->get('heading_title');
|
||||
|
||||
$data['exist_filter'] = $this->model_extension_export_import->existFilter();
|
||||
|
||||
$data['text_export_type_category'] = ($data['exist_filter']) ? $this->language->get('text_export_type_category') : $this->language->get('text_export_type_category_old');
|
||||
$data['text_export_type_product'] = ($data['exist_filter']) ? $this->language->get('text_export_type_product') : $this->language->get('text_export_type_product_old');
|
||||
$data['text_export_type_poa'] = $this->language->get('text_export_type_poa');
|
||||
$data['text_export_type_option'] = $this->language->get('text_export_type_option');
|
||||
$data['text_export_type_attribute'] = $this->language->get('text_export_type_attribute');
|
||||
$data['text_export_type_filter'] = $this->language->get('text_export_type_filter');
|
||||
$data['text_export_type_customer'] = $this->language->get('text_export_type_customer');
|
||||
$data['text_yes'] = $this->language->get('text_yes');
|
||||
$data['text_no'] = $this->language->get('text_no');
|
||||
$data['text_loading_notifications'] = $this->language->get( 'text_loading_notifications' );
|
||||
$data['text_retry'] = $this->language->get('text_retry');
|
||||
$data['text_license'] = $this->language->get('text_license');
|
||||
|
||||
$data['entry_export'] = $this->language->get( 'entry_export' );
|
||||
$data['entry_import'] = $this->language->get( 'entry_import' );
|
||||
$data['entry_export_type'] = $this->language->get( 'entry_export_type' );
|
||||
$data['entry_range_type'] = $this->language->get( 'entry_range_type' );
|
||||
$data['entry_category_filter'] = $this->language->get( 'entry_category_filter' );
|
||||
$data['entry_category'] = $this->language->get( 'entry_category' );
|
||||
$data['entry_start_id'] = $this->language->get( 'entry_start_id' );
|
||||
$data['entry_start_index'] = $this->language->get( 'entry_start_index' );
|
||||
$data['entry_end_id'] = $this->language->get( 'entry_end_id' );
|
||||
$data['entry_end_index'] = $this->language->get( 'entry_end_index' );
|
||||
$data['entry_incremental'] = $this->language->get( 'entry_incremental' );
|
||||
$data['entry_upload'] = $this->language->get( 'entry_upload' );
|
||||
$data['entry_settings_use_option_id'] = $this->language->get( 'entry_settings_use_option_id' );
|
||||
$data['entry_settings_use_option_value_id'] = $this->language->get( 'entry_settings_use_option_value_id' );
|
||||
$data['entry_settings_use_attribute_group_id'] = $this->language->get( 'entry_settings_use_attribute_group_id' );
|
||||
$data['entry_settings_use_attribute_id'] = $this->language->get( 'entry_settings_use_attribute_id' );
|
||||
$data['entry_settings_use_filter_group_id'] = $this->language->get( 'entry_settings_use_filter_group_id' );
|
||||
$data['entry_settings_use_filter_id'] = $this->language->get( 'entry_settings_use_filter_id' );
|
||||
$data['entry_version'] = $this->language->get('entry_version');
|
||||
$data['entry_oc_version'] = $this->language->get('entry_oc_version');
|
||||
$data['entry_license'] = $this->language->get('entry_license');
|
||||
|
||||
$data['tab_export'] = $this->language->get( 'tab_export' );
|
||||
$data['tab_import'] = $this->language->get( 'tab_import' );
|
||||
$data['tab_settings'] = $this->language->get( 'tab_settings' );
|
||||
$data['tab_support'] = $this->language->get( 'tab_support' );
|
||||
|
||||
$data['button_export'] = $this->language->get( 'button_export' );
|
||||
$data['button_import'] = $this->language->get( 'button_import' );
|
||||
$data['button_settings'] = $this->language->get( 'button_settings' );
|
||||
$data['button_export_id'] = $this->language->get( 'button_export_id' );
|
||||
$data['button_export_page'] = $this->language->get( 'button_export_page' );
|
||||
|
||||
$data['help_range_type'] = $this->language->get( 'help_range_type' );
|
||||
$data['help_category_filter'] = $this->language->get( 'help_category_filter' );
|
||||
$data['help_incremental_yes'] = $this->language->get( 'help_incremental_yes' );
|
||||
$data['help_incremental_no'] = $this->language->get( 'help_incremental_no' );
|
||||
$data['help_import'] = ($data['exist_filter']) ? $this->language->get( 'help_import' ) : $this->language->get( 'help_import_old' );
|
||||
$data['help_format'] = $this->language->get( 'help_format' );
|
||||
|
||||
$data['error_select_file'] = $this->language->get('error_select_file');
|
||||
$data['error_post_max_size'] = str_replace( '%1', ini_get('post_max_size'), $this->language->get('error_post_max_size') );
|
||||
$data['error_upload_max_filesize'] = str_replace( '%1', ini_get('upload_max_filesize'), $this->language->get('error_upload_max_filesize') );
|
||||
$data['error_id_no_data'] = $this->language->get('error_id_no_data');
|
||||
$data['error_page_no_data'] = $this->language->get('error_page_no_data');
|
||||
$data['error_param_not_number'] = $this->language->get('error_param_not_number');
|
||||
$data['error_notifications'] = $this->language->get('error_notifications');
|
||||
$data['error_no_news'] = $this->language->get('error_no_news');
|
||||
$data['error_batch_number'] = $this->language->get('error_batch_number');
|
||||
$data['error_min_item_id'] = $this->language->get('error_min_item_id');
|
||||
|
||||
if (!empty($this->session->data['export_import_error']['errstr'])) {
|
||||
$this->error['warning'] = $this->session->data['export_import_error']['errstr'];
|
||||
} else if (isset($this->session->data['warning'])) {
|
||||
$this->error['warning'] = $this->session->data['warning'];
|
||||
}
|
||||
|
||||
if (isset($this->error['warning'])) {
|
||||
$data['error_warning'] = $this->error['warning'];
|
||||
if (!empty($this->session->data['export_import_nochange'])) {
|
||||
$data['error_warning'] .= "<br />\n".$this->language->get( 'text_nochange' );
|
||||
}
|
||||
} else {
|
||||
$data['error_warning'] = '';
|
||||
}
|
||||
|
||||
unset($this->session->data['warning']);
|
||||
unset($this->session->data['export_import_error']);
|
||||
unset($this->session->data['export_import_nochange']);
|
||||
|
||||
if (isset($this->session->data['success'])) {
|
||||
$data['success'] = $this->session->data['success'];
|
||||
|
||||
unset($this->session->data['success']);
|
||||
} else {
|
||||
$data['success'] = '';
|
||||
}
|
||||
|
||||
$data['breadcrumbs'] = array();
|
||||
$data['breadcrumbs'][] = array(
|
||||
'text' => $this->language->get('text_home'),
|
||||
'href' => $this->url->link('common/dashboard', 'user_token=' . $this->session->data['user_token'], $this->ssl)
|
||||
);
|
||||
$data['breadcrumbs'][] = array(
|
||||
'text' => $this->language->get('heading_title'),
|
||||
'href' => $this->url->link('extension/export_import', 'user_token=' . $this->session->data['user_token'], $this->ssl)
|
||||
);
|
||||
|
||||
$data['back'] = $this->url->link('common/dashboard', 'user_token=' . $this->session->data['user_token'], $this->ssl);
|
||||
$data['button_back'] = $this->language->get( 'button_back' );
|
||||
$data['import'] = $this->url->link('extension/export_import/upload', 'user_token=' . $this->session->data['user_token'], $this->ssl);
|
||||
$data['export'] = $this->url->link('extension/export_import/download', 'user_token=' . $this->session->data['user_token'], $this->ssl);
|
||||
$data['settings'] = $this->url->link('extension/export_import/settings', 'user_token=' . $this->session->data['user_token'], $this->ssl);
|
||||
$data['post_max_size'] = $this->return_bytes( ini_get('post_max_size') );
|
||||
$data['upload_max_filesize'] = $this->return_bytes( ini_get('upload_max_filesize') );
|
||||
|
||||
if (isset($this->request->post['export_type'])) {
|
||||
$data['export_type'] = $this->request->post['export_type'];
|
||||
} else {
|
||||
$data['export_type'] = 'p';
|
||||
}
|
||||
|
||||
if (isset($this->request->post['range_type'])) {
|
||||
$data['range_type'] = $this->request->post['range_type'];
|
||||
} else {
|
||||
$data['range_type'] = 'id';
|
||||
}
|
||||
|
||||
if (isset($this->request->post['min'])) {
|
||||
$data['min'] = $this->request->post['min'];
|
||||
} else {
|
||||
$data['min'] = '';
|
||||
}
|
||||
|
||||
if (isset($this->request->post['max'])) {
|
||||
$data['max'] = $this->request->post['max'];
|
||||
} else {
|
||||
$data['max'] = '';
|
||||
}
|
||||
|
||||
if (isset($this->request->post['incremental'])) {
|
||||
$data['incremental'] = $this->request->post['incremental'];
|
||||
} else {
|
||||
$data['incremental'] = '1';
|
||||
}
|
||||
|
||||
if (isset($this->request->post['export_import_settings_use_option_id'])) {
|
||||
$data['settings_use_option_id'] = $this->request->post['export_import_settings_use_option_id'];
|
||||
} else if ($this->config->get( 'export_import_settings_use_option_id' )) {
|
||||
$data['settings_use_option_id'] = '1';
|
||||
} else {
|
||||
$data['settings_use_option_id'] = '0';
|
||||
}
|
||||
|
||||
if (isset($this->request->post['export_import_settings_use_option_value_id'])) {
|
||||
$data['settings_use_option_value_id'] = $this->request->post['export_import_settings_use_option_value_id'];
|
||||
} else if ($this->config->get( 'export_import_settings_use_option_value_id' )) {
|
||||
$data['settings_use_option_value_id'] = '1';
|
||||
} else {
|
||||
$data['settings_use_option_value_id'] = '0';
|
||||
}
|
||||
|
||||
if (isset($this->request->post['export_import_settings_use_attribute_group_id'])) {
|
||||
$data['settings_use_attribute_group_id'] = $this->request->post['export_import_settings_use_attribute_group_id'];
|
||||
} else if ($this->config->get( 'export_import_settings_use_attribute_group_id' )) {
|
||||
$data['settings_use_attribute_group_id'] = '1';
|
||||
} else {
|
||||
$data['settings_use_attribute_group_id'] = '0';
|
||||
}
|
||||
|
||||
if (isset($this->request->post['export_import_settings_use_attribute_id'])) {
|
||||
$data['settings_use_attribute_id'] = $this->request->post['export_import_settings_use_attribute_id'];
|
||||
} else if ($this->config->get( 'export_import_settings_use_attribute_id' )) {
|
||||
$data['settings_use_attribute_id'] = '1';
|
||||
} else {
|
||||
$data['settings_use_attribute_id'] = '0';
|
||||
}
|
||||
|
||||
if (isset($this->request->post['export_import_settings_use_filter_group_id'])) {
|
||||
$data['settings_use_filter_group_id'] = $this->request->post['export_import_settings_use_filter_group_id'];
|
||||
} else if ($this->config->get( 'export_import_settings_use_filter_group_id' )) {
|
||||
$data['settings_use_filter_group_id'] = '1';
|
||||
} else {
|
||||
$data['settings_use_filter_group_id'] = '0';
|
||||
}
|
||||
|
||||
if (isset($this->request->post['export_import_settings_use_filter_id'])) {
|
||||
$data['settings_use_filter_id'] = $this->request->post['export_import_settings_use_filter_id'];
|
||||
} else if ($this->config->get( 'export_import_settings_use_filter_id' )) {
|
||||
$data['settings_use_filter_id'] = '1';
|
||||
} else {
|
||||
$data['settings_use_filter_id'] = '0';
|
||||
}
|
||||
|
||||
$data['categories'] = array();
|
||||
$data['manufacturers'] = array();
|
||||
|
||||
$min_product_id = $this->model_extension_export_import->getMinProductId();
|
||||
$max_product_id = $this->model_extension_export_import->getMaxProductId();
|
||||
$count_product = $this->model_extension_export_import->getCountProduct();
|
||||
$min_category_id = $this->model_extension_export_import->getMinCategoryId();
|
||||
$max_category_id = $this->model_extension_export_import->getMaxCategoryId();
|
||||
$count_category = $this->model_extension_export_import->getCountCategory();
|
||||
$min_customer_id = $this->model_extension_export_import->getMinCustomerId();
|
||||
$max_customer_id = $this->model_extension_export_import->getMaxCustomerId();
|
||||
$count_customer = $this->model_extension_export_import->getCountCustomer();
|
||||
|
||||
$data['text_welcome'] = str_replace('%1',$this->model_extension_export_import->getVersion(),$this->language->get('text_welcome'));
|
||||
$data['text_used_category_ids'] = $this->language->get('text_used_category_ids');
|
||||
$data['text_used_category_ids'] = str_replace('%1',$min_category_id,$data['text_used_category_ids']);
|
||||
$data['text_used_category_ids'] = str_replace('%2',$max_category_id,$data['text_used_category_ids']);
|
||||
$data['text_used_product_ids'] = $this->language->get('text_used_product_ids');
|
||||
$data['text_used_product_ids'] = str_replace('%1',$min_product_id,$data['text_used_product_ids']);
|
||||
$data['text_used_product_ids'] = str_replace('%2',$max_product_id,$data['text_used_product_ids']);
|
||||
|
||||
$data['version_export_import'] = $this->model_extension_export_import->getVersion();
|
||||
$data['version_opencart'] = VERSION;
|
||||
|
||||
$data['min_product_id'] = $min_product_id;
|
||||
$data['max_product_id'] = $max_product_id;
|
||||
$data['count_product'] = $count_product;
|
||||
$data['min_category_id'] = $min_category_id;
|
||||
$data['max_category_id'] = $max_category_id;
|
||||
$data['count_category'] = $count_category;
|
||||
$data['min_customer_id'] = $min_customer_id;
|
||||
$data['max_customer_id'] = $max_customer_id;
|
||||
$data['count_customer'] = $count_customer;
|
||||
|
||||
$data['user_token'] = $this->session->data['user_token'];
|
||||
|
||||
$this->document->addStyle('view/stylesheet/export_import.css');
|
||||
|
||||
$data['header'] = $this->load->controller('common/header');
|
||||
$data['column_left'] = $this->load->controller('common/column_left');
|
||||
$data['footer'] = $this->load->controller('common/footer');
|
||||
|
||||
$this->response->setOutput($this->load->view( 'extension/export_import', $data));
|
||||
}
|
||||
|
||||
|
||||
protected function validateDownloadForm() {
|
||||
if (!$this->user->hasPermission('access', 'extension/export_import')) {
|
||||
$this->error['warning'] = $this->language->get('error_permission');
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$this->config->get( 'export_import_settings_use_option_id' )) {
|
||||
$option_names = $this->model_extension_export_import->getOptionNameCounts();
|
||||
foreach ($option_names as $option_name) {
|
||||
if ($option_name['count'] > 1) {
|
||||
$this->error['warning'] = str_replace( '%1', $option_name['name'], $this->language->get( 'error_option_name' ) );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$this->config->get( 'export_import_settings_use_option_value_id' )) {
|
||||
$option_value_names = $this->model_extension_export_import->getOptionValueNameCounts();
|
||||
foreach ($option_value_names as $option_value_name) {
|
||||
if ($option_value_name['count'] > 1) {
|
||||
$this->error['warning'] = str_replace( '%1', $option_value_name['name'], $this->language->get( 'error_option_value_name' ) );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$this->config->get( 'export_import_settings_use_attribute_group_id' )) {
|
||||
$attribute_group_names = $this->model_extension_export_import->getAttributeGroupNameCounts();
|
||||
foreach ($attribute_group_names as $attribute_group_name) {
|
||||
if ($attribute_group_name['count'] > 1) {
|
||||
$this->error['warning'] = str_replace( '%1', $attribute_group_name['name'], $this->language->get( 'error_attribute_group_name' ) );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$this->config->get( 'export_import_settings_use_attribute_id' )) {
|
||||
$attribute_names = $this->model_extension_export_import->getAttributeNameCounts();
|
||||
foreach ($attribute_names as $attribute_name) {
|
||||
if ($attribute_name['count'] > 1) {
|
||||
$this->error['warning'] = str_replace( '%1', $attribute_name['name'], $this->language->get( 'error_attribute_name' ) );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$this->config->get( 'export_import_settings_use_filter_group_id' )) {
|
||||
$filter_group_names = $this->model_extension_export_import->getFilterGroupNameCounts();
|
||||
foreach ($filter_group_names as $filter_group_name) {
|
||||
if ($filter_group_name['count'] > 1) {
|
||||
$this->error['warning'] = str_replace( '%1', $filter_group_name['name'], $this->language->get( 'error_filter_group_name' ) );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$this->config->get( 'export_import_settings_use_filter_id' )) {
|
||||
$filter_names = $this->model_extension_export_import->getFilterNameCounts();
|
||||
foreach ($filter_names as $filter_name) {
|
||||
if ($filter_name['count'] > 1) {
|
||||
$this->error['warning'] = str_replace( '%1', $filter_name['name'], $this->language->get( 'error_filter_name' ) );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
protected function validateUploadForm() {
|
||||
if (!$this->user->hasPermission('modify', 'extension/export_import')) {
|
||||
$this->error['warning'] = $this->language->get('error_permission');
|
||||
} else if (!isset( $this->request->post['incremental'] )) {
|
||||
$this->error['warning'] = $this->language->get( 'error_incremental' );
|
||||
} else if ($this->request->post['incremental'] != '0') {
|
||||
if ($this->request->post['incremental'] != '1') {
|
||||
$this->error['warning'] = $this->language->get( 'error_incremental' );
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($this->request->files['upload']['name'])) {
|
||||
if (isset($this->error['warning'])) {
|
||||
$this->error['warning'] .= "<br /\n" . $this->language->get( 'error_upload_name' );
|
||||
} else {
|
||||
$this->error['warning'] = $this->language->get( 'error_upload_name' );
|
||||
}
|
||||
} else {
|
||||
$ext = strtolower(pathinfo($this->request->files['upload']['name'], PATHINFO_EXTENSION));
|
||||
if (($ext != 'xls') && ($ext != 'xlsx') && ($ext != 'ods')) {
|
||||
if (isset($this->error['warning'])) {
|
||||
$this->error['warning'] .= "<br /\n" . $this->language->get( 'error_upload_ext' );
|
||||
} else {
|
||||
$this->error['warning'] = $this->language->get( 'error_upload_ext' );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$this->error) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected function validateSettingsForm() {
|
||||
if (!$this->user->hasPermission('access', 'extension/export_import')) {
|
||||
$this->error['warning'] = $this->language->get('error_permission');
|
||||
return false;
|
||||
}
|
||||
|
||||
if (empty($this->request->post['export_import_settings_use_option_id'])) {
|
||||
$option_names = $this->model_extension_export_import->getOptionNameCounts();
|
||||
foreach ($option_names as $option_name) {
|
||||
if ($option_name['count'] > 1) {
|
||||
$this->error['warning'] = str_replace( '%1', $option_name['name'], $this->language->get( 'error_option_name' ) );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($this->request->post['export_import_settings_use_option_value_id'])) {
|
||||
$option_value_names = $this->model_extension_export_import->getOptionValueNameCounts();
|
||||
foreach ($option_value_names as $option_value_name) {
|
||||
if ($option_value_name['count'] > 1) {
|
||||
$this->error['warning'] = str_replace( '%1', $option_value_name['name'], $this->language->get( 'error_option_value_name' ) );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($this->request->post['export_import_settings_use_attribute_group_id'])) {
|
||||
$attribute_group_names = $this->model_extension_export_import->getAttributeGroupNameCounts();
|
||||
foreach ($attribute_group_names as $attribute_group_name) {
|
||||
if ($attribute_group_name['count'] > 1) {
|
||||
$this->error['warning'] = str_replace( '%1', $attribute_group_name['name'], $this->language->get( 'error_attribute_group_name' ) );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($this->request->post['export_import_settings_use_attribute_id'])) {
|
||||
$attribute_names = $this->model_extension_export_import->getAttributeNameCounts();
|
||||
foreach ($attribute_names as $attribute_name) {
|
||||
if ($attribute_name['count'] > 1) {
|
||||
$this->error['warning'] = str_replace( '%1', $attribute_name['name'], $this->language->get( 'error_attribute_name' ) );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($this->request->post['export_import_settings_use_filter_group_id'])) {
|
||||
$filter_group_names = $this->model_extension_export_import->getFilterGroupNameCounts();
|
||||
foreach ($filter_group_names as $filter_group_name) {
|
||||
if ($filter_group_name['count'] > 1) {
|
||||
$this->error['warning'] = str_replace( '%1', $filter_group_name['name'], $this->language->get( 'error_filter_group_name' ) );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($this->request->post['export_import_settings_use_filter_id'])) {
|
||||
$filter_names = $this->model_extension_export_import->getFilterNameCounts();
|
||||
foreach ($filter_names as $filter_name) {
|
||||
if ($filter_name['count'] > 1) {
|
||||
$this->error['warning'] = str_replace( '%1', $filter_name['name'], $this->language->get( 'error_filter_name' ) );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public function getNotifications() {
|
||||
sleep(1); // give the data some "feel" that its not in our system
|
||||
$this->load->model('extension/export_import');
|
||||
$this->load->language( 'extension/export_import' );
|
||||
$response = $this->model_extension_export_import->getNotifications();
|
||||
$json = array();
|
||||
if ($response===false) {
|
||||
$json['message'] = '';
|
||||
$json['error'] = $this->language->get( 'error_notifications' );
|
||||
} else {
|
||||
$json['message'] = $response;
|
||||
$json['error'] = '';
|
||||
}
|
||||
$this->response->setOutput(json_encode($json));
|
||||
}
|
||||
|
||||
|
||||
public function getCountProduct() {
|
||||
$this->load->model('extension/export_import');
|
||||
$count = $this->model_extension_export_import->getCountProduct();
|
||||
$json = array( 'count'=>$count );
|
||||
$this->response->addHeader('Content-Type: application/json');
|
||||
$this->response->setOutput(json_encode($json));
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -37,6 +37,10 @@ $_['column_action'] = 'Действие';
|
||||
// Entry
|
||||
$_['entry_name'] = 'Название товара';
|
||||
$_['entry_description'] = 'Описание';
|
||||
$_['entry_description_first_rental'] = 'Первый прокат';
|
||||
$_['entry_description_second_rental'] = 'Второй прокат';
|
||||
$_['entry_description_purchase'] = 'Покупка';
|
||||
$_['entry_description_terms'] = 'Условия';
|
||||
$_['entry_description_mini'] = 'Краткое Описание:';
|
||||
$_['entry_meta_title'] = 'Мета-тег Title';
|
||||
$_['entry_meta_h1'] = 'HTML-тег H1';
|
||||
|
||||
@@ -13,7 +13,7 @@ class ModelCatalogProduct extends Model {
|
||||
}
|
||||
|
||||
foreach ($data['product_description'] as $language_id => $value) {
|
||||
$this->db->query("INSERT INTO " . DB_PREFIX . "product_description SET product_id = '" . (int)$product_id . "', language_id = '" . (int)$language_id . "', name = '" . $this->db->escape($value['name']) . "', description = '" . $this->db->escape($value['description']) . "', tag = '" . $this->db->escape($value['tag']) . "', meta_title = '" . $this->db->escape($value['meta_title']) . "', meta_h1 = '" . $this->db->escape($value['meta_h1']) . "', meta_description = '" . $this->db->escape($value['meta_description']) . "', meta_keyword = '" . $this->db->escape($value['meta_keyword']) . "'");
|
||||
$this->db->query("INSERT INTO " . DB_PREFIX . "product_description SET product_id = '" . (int)$product_id . "', language_id = '" . (int)$language_id . "', name = '" . $this->db->escape($value['name']) . "', description = '" . $this->db->escape($value['description']) . "', description_first_rental = '" . $this->db->escape($value['description_first_rental']) . "', description_second_rental = '" . $this->db->escape($value['description_second_rental']) . "', description_purchase = '" . $this->db->escape($value['description_purchase']) . "', description_terms = '" . $this->db->escape($value['description_terms']) . "', tag = '" . $this->db->escape($value['tag']) . "', meta_title = '" . $this->db->escape($value['meta_title']) . "', meta_h1 = '" . $this->db->escape($value['meta_h1']) . "', meta_description = '" . $this->db->escape($value['meta_description']) . "', meta_keyword = '" . $this->db->escape($value['meta_keyword']) . "'");
|
||||
}
|
||||
|
||||
if (isset($data['product_store'])) {
|
||||
@@ -170,7 +170,7 @@ class ModelCatalogProduct extends Model {
|
||||
$this->db->query("DELETE FROM " . DB_PREFIX . "product_description WHERE product_id = '" . (int)$product_id . "'");
|
||||
|
||||
foreach ($data['product_description'] as $language_id => $value) {
|
||||
$this->db->query("INSERT INTO " . DB_PREFIX . "product_description SET product_id = '" . (int)$product_id . "', language_id = '" . (int)$language_id . "', name = '" . $this->db->escape($value['name']) . "', description = '" . $this->db->escape($value['description']) . "', tag = '" . $this->db->escape($value['tag']) . "', meta_title = '" . $this->db->escape($value['meta_title']) . "', meta_h1 = '" . $this->db->escape($value['meta_h1']) . "', meta_description = '" . $this->db->escape($value['meta_description']) . "', meta_keyword = '" . $this->db->escape($value['meta_keyword']) . "'");
|
||||
$this->db->query("INSERT INTO " . DB_PREFIX . "product_description SET product_id = '" . (int)$product_id . "', language_id = '" . (int)$language_id . "', name = '" . $this->db->escape($value['name']) . "', description = '" . $this->db->escape($value['description']) . "', description_first_rental = '" . $this->db->escape($value['description_first_rental']) . "', description_second_rental = '" . $this->db->escape($value['description_second_rental']) . "', description_purchase = '" . $this->db->escape($value['description_purchase']) . "', description_terms = '" . $this->db->escape($value['description_terms']) . "', tag = '" . $this->db->escape($value['tag']) . "', meta_title = '" . $this->db->escape($value['meta_title']) . "', meta_h1 = '" . $this->db->escape($value['meta_h1']) . "', meta_description = '" . $this->db->escape($value['meta_description']) . "', meta_keyword = '" . $this->db->escape($value['meta_keyword']) . "'");
|
||||
}
|
||||
|
||||
$this->db->query("DELETE FROM " . DB_PREFIX . "product_to_store WHERE product_id = '" . (int)$product_id . "'");
|
||||
@@ -558,6 +558,10 @@ class ModelCatalogProduct extends Model {
|
||||
$product_description_data[$result['language_id']] = array(
|
||||
'name' => $result['name'],
|
||||
'description' => $result['description'],
|
||||
'description_first_rental' => $result['description_first_rental'],
|
||||
'description_second_rental' => $result['description_second_rental'],
|
||||
'description_purchase' => $result['description_purchase'],
|
||||
'description_terms' => $result['description_terms'],
|
||||
'meta_title' => $result['meta_title'],
|
||||
'meta_h1' => $result['meta_h1'],
|
||||
'meta_description' => $result['meta_description'],
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -129,7 +129,7 @@ class ModelLocalisationLanguage extends Model {
|
||||
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_description WHERE language_id = '" . (int)$this->config->get('config_language_id') . "'");
|
||||
|
||||
foreach ($query->rows as $product) {
|
||||
$this->db->query("INSERT INTO " . DB_PREFIX . "product_description SET product_id = '" . (int)$product['product_id'] . "', language_id = '" . (int)$language_id . "', name = '" . $this->db->escape($product['name']) . "', description = '" . $this->db->escape($product['description']) . "', tag = '" . $this->db->escape($product['tag']) . "', meta_title = '" . $this->db->escape($product['meta_title']) . "', meta_description = '" . $this->db->escape($product['meta_description']) . "', meta_keyword = '" . $this->db->escape($product['meta_keyword']) . "'");
|
||||
$this->db->query("INSERT INTO " . DB_PREFIX . "product_description SET product_id = '" . (int)$product['product_id'] . "', language_id = '" . (int)$language_id . "', name = '" . $this->db->escape($product['name']) . "', description = '" . $this->db->escape($product['description']) . "', description_first_rental = '" . $this->db->escape($product['description_first_rental']) . "', description_second_rental = '" . $this->db->escape($product['description_second_rental']) . "', description_purchase = '" . $this->db->escape($product['description_purchase']) . "', description_terms = '" . $this->db->escape($product['description_terms']) . "', tag = '" . $this->db->escape($product['tag']) . "', meta_title = '" . $this->db->escape($product['meta_title']) . "', meta_description = '" . $this->db->escape($product['meta_description']) . "', meta_keyword = '" . $this->db->escape($product['meta_keyword']) . "'");
|
||||
}
|
||||
|
||||
$this->cache->delete('product');
|
||||
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
.tab-pane form {
|
||||
color: #000000;
|
||||
}
|
||||
.tab-pane form b {
|
||||
color: navy;
|
||||
}
|
||||
span.help {
|
||||
display: block;
|
||||
color:gray;
|
||||
}
|
||||
.fa-info-circle:after {
|
||||
content: "\00A0\00A0";
|
||||
}
|
||||
#export_import_loading {
|
||||
display: inline-block;
|
||||
}
|
||||
@@ -80,29 +80,25 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-description{{ language.language_id }}">{{ entry_description }}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="product_description[{{ language.language_id }}][description][]" placeholder="{{ entry_description }}" id="input-description{{ language.language_id }}" data-toggle="summernote" data-lang="{{ summernote }}" class="form-control">{{ product_description[language.language_id] ? product_description[language.language_id].description|split('__NEWLINE__')[0] }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
{% for item in range(1,4) %}
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-description{{ language.language_id }}">
|
||||
{% if item == 1 %}
|
||||
Первый прокат
|
||||
{% elseif item == 2 %}
|
||||
Второй прокат
|
||||
{% elseif item == 3 %}
|
||||
Покупка
|
||||
{% elseif item == 4 %}
|
||||
Условия
|
||||
{% endif %}
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="product_description[{{ language.language_id }}][description][]" placeholder="{{ entry_description }}" id="input-description{{ language.language_id }}" data-toggle="summernote" data-lang="{{ summernote }}" class="form-control">{{ product_description[language.language_id] ? product_description[language.language_id].description|split('__NEWLINE__')[item] }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<label class="col-sm-2 control-label" for="input-description{{ language.language_id }}">{{ entry_description }}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="product_description[{{ language.language_id }}][description]" placeholder="{{ entry_description }}" id="input-description{{ language.language_id }}" data-toggle="summernote" data-lang="{{ summernote }}" class="form-control">{{ product_description[language.language_id] ? product_description[language.language_id].description }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
{% set description_fields = {
|
||||
'description_first_rental': entry_description_first_rental,
|
||||
'description_second_rental': entry_description_second_rental,
|
||||
'description_purchase': entry_description_purchase,
|
||||
'description_terms': entry_description_terms
|
||||
} %}
|
||||
{% for field, label in description_fields %}
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-{{ field }}{{ language.language_id }}">{{ label }}</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="product_description[{{ language.language_id }}][{{ field }}]" placeholder="{{ label }}" id="input-{{ field }}{{ language.language_id }}" data-toggle="summernote" data-lang="{{ summernote }}" class="form-control">{{ product_description[language.language_id] ? attribute(product_description[language.language_id], field) }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="input-tag{{ language.language_id }}"><span data-toggle="tooltip" title="{{ help_tag }}">{{ entry_tag }}</span></label>
|
||||
<div class="col-sm-10">
|
||||
|
||||
@@ -1,619 +0,0 @@
|
||||
{{ header }}{{ column_left }}
|
||||
<div id="content">
|
||||
<div class="page-header">
|
||||
<div class="container-fluid">
|
||||
<div class="pull-right">
|
||||
<a href="{{ back }}" data-toggle="tooltip" title="{{ button_back }}" class="btn btn-default"><i class="fa fa-reply"></i></a>
|
||||
</div>
|
||||
<h1>{{ heading_title }}</h1>
|
||||
<ul class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
<li><a href="{{ breadcrumb['href'] }}">{{ breadcrumb['text'] }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
{% if (error_warning) %}
|
||||
<div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if (success) %}
|
||||
<div class="alert alert-success"><i class="fa fa-check-circle"></i> {{ success }}
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if ((not error_warning) and (not success)) %}
|
||||
<div id="export_import_welcome" class="alert alert-info">
|
||||
<i class="fa fa-info-circle"></i>
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
{{ text_welcome }}<br /><br />{{ text_used_category_ids}} {{ text_used_product_ids }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#tab-export" data-toggle="tab">{{ tab_export }}</a></li>
|
||||
<li><a href="#tab-import" data-toggle="tab">{{ tab_import }}</a></li>
|
||||
<li><a href="#tab-settings" data-toggle="tab">{{ tab_settings }}</a></li>
|
||||
<li><a href="#tab-support" data-toggle="tab">{{ tab_support }}</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
|
||||
<div class="tab-pane active" id="tab-export">
|
||||
<form action="{{ export }}" method="post" enctype="multipart/form-data" id="export" class="form-horizontal">
|
||||
<div class="form-group" style="margin:0px;">
|
||||
<div class="col-sm-12">{{ entry_export }}</div>
|
||||
</div>
|
||||
<div class="form-group" style="margin:0px;">
|
||||
<div class="col-sm-12">{{ entry_export_type }}
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<label class="radio-inline">
|
||||
{% if (export_type=='c') %}
|
||||
<input type="radio" name="export_type" value="c" checked="checked" />
|
||||
{% else %}
|
||||
<input type="radio" name="export_type" value="c" />
|
||||
{% endif %}
|
||||
{{ text_export_type_category }}
|
||||
</label>
|
||||
<br />
|
||||
<label class="radio-inline">
|
||||
{% if (export_type=='p') %}
|
||||
<input type="radio" name="export_type" value="p" checked="checked" />
|
||||
{% else %}
|
||||
<input type="radio" name="export_type" value="p" />
|
||||
{% endif %}
|
||||
{{ text_export_type_product }}
|
||||
</label>
|
||||
<br />
|
||||
<label class="radio-inline">
|
||||
{% if (export_type=='o') %}
|
||||
<input type="radio" name="export_type" value="o" checked="checked" />
|
||||
{% else %}
|
||||
<input type="radio" name="export_type" value="o" />
|
||||
{% endif %}
|
||||
{{ text_export_type_option }}
|
||||
</label>
|
||||
<br />
|
||||
<label class="radio-inline">
|
||||
{% if (export_type=='a') %}
|
||||
<input type="radio" name="export_type" value="a" checked="checked" />
|
||||
{% else %}
|
||||
<input type="radio" name="export_type" value="a" />
|
||||
{% endif %}
|
||||
{{ text_export_type_attribute }}
|
||||
</label>
|
||||
<br />
|
||||
{% if (exist_filter) %}
|
||||
<label class="radio-inline">
|
||||
{% if (export_type=='f') %}
|
||||
<input type="radio" name="export_type" value="f" checked="checked" />
|
||||
{% else %}
|
||||
<input type="radio" name="export_type" value="f" />
|
||||
{% endif %}
|
||||
{{ text_export_type_filter }}
|
||||
</label>
|
||||
<br />
|
||||
{% endif %}
|
||||
<label class="radio-inline">
|
||||
{% if (export_type=='u') %}
|
||||
<input type="radio" name="export_type" value="u" checked="checked" />
|
||||
{% else %}
|
||||
<input type="radio" name="export_type" value="u" />
|
||||
{% endif %}
|
||||
{{ text_export_type_customer }}
|
||||
</label>
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="margin:0px;" id="export_filter">
|
||||
<div class="col-sm-6">
|
||||
{{ entry_category_filter }}
|
||||
<span class="help">{{ help_category_filter }}</span>
|
||||
<br />
|
||||
<input type="text" name="category" value="" placeholder="{{ entry_category }}" id="input-category" class="form-control" />
|
||||
<div id="categories" class="well well-sm" style="height: 100px; overflow: auto;">
|
||||
{% for category in categories %}
|
||||
<div id="category{{ category.category_id }}"><i class="fa fa-minus-circle"></i> {{ category.name }}
|
||||
<input type="hidden" name="categories[]" value="{{ category.category_id }}" />
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
{{ entry_manufacturer_filter }}
|
||||
<span class="help">{{ help_manufacturer_filter }}</span>
|
||||
<br />
|
||||
<input type="text" name="manufacturer" value="" placeholder="{{ entry_manufacturer }}" id="input-manufacturer" class="form-control" />
|
||||
<div id="manufacturers" class="well well-sm" style="height: 100px; overflow: auto;">
|
||||
{% for manufacturer in manufacturers %}
|
||||
<div id="manufacturer{{ manufacturer.manufacturer_id }}"><i class="fa fa-minus-circle"></i> {{ manufacturer.name }}
|
||||
<input type="hidden" name="manufacturers[]" value="{{ manufacturer.manufacturer_id }}" />
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="margin:0px;" id="range_type">
|
||||
<div class="col-sm-12">
|
||||
{{ entry_range_type }}
|
||||
<span class="help">{{ help_range_type }}</span>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="range_type" value="id" id="range_type_id">{{ button_export_id }}
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="range_type" value="page" id="range_type_page">{{ button_export_page }}
|
||||
</label>
|
||||
<br /><br />
|
||||
<span class="id">{{ entry_start_id }}</span>
|
||||
<span class="page">{{ entry_start_index }}</span>
|
||||
<br />
|
||||
<input type="text" name="min" value="{{ min }}" />
|
||||
<br />
|
||||
<span class="id">{{ entry_end_id }}</span>
|
||||
<span class="page">{{ entry_end_index }}</span>
|
||||
<br />
|
||||
<input type="text" name="max" value="{{ max }}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="margin:0px;">
|
||||
<div class="col-sm-12">
|
||||
<a onclick="downloadData();" class="btn btn-primary"><span>{{ button_export }}</span></a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="tab-import">
|
||||
<form action="{{ import }}" method="post" enctype="multipart/form-data" id="import" class="form-horizontal">
|
||||
<div class="form-group" style="margin:0px;">
|
||||
<div class="col-sm-12">
|
||||
{{ entry_import }}
|
||||
<span class="help">{{ help_import }}</span>
|
||||
<span class="help">{{ help_format }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="margin:0px;">
|
||||
<div class="col-sm-12">
|
||||
{{ entry_incremental }}
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
{% if (incremental) %}
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="incremental" value="1" checked="checked" />
|
||||
{{ text_yes }} {{ help_incremental_yes }}
|
||||
</label>
|
||||
<br />
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="incremental" value="0" />
|
||||
{{ text_no }} {{ help_incremental_no }}
|
||||
</label>
|
||||
{% else %}
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="incremental" value="1" />
|
||||
{{ text_yes }} {{ help_incremental_yes }}
|
||||
</label>
|
||||
<br />
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="incremental" value="0" checked="checked" />
|
||||
{{ text_no }} {{ help_incremental_no }}
|
||||
</label>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="margin:0px;">
|
||||
<div class="col-sm-12">
|
||||
{{ entry_upload }}<br /><br />
|
||||
<input type="file" name="upload" id="upload" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="margin:0px;">
|
||||
<div class="col-sm-12">
|
||||
<a onclick="uploadData();" class="btn btn-primary"><span>{{ button_import }}</span></a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="tab-settings">
|
||||
<form action="{{ settings }}" method="post" enctype="multipart/form-data" id="settings" class="form-horizontal">
|
||||
<div class="form-group" style="margin:0px;">
|
||||
<label class="radio-inline">
|
||||
{% if (settings_use_option_id) %}
|
||||
<input type="checkbox" name="export_import_settings_use_option_id" value="1" checked="checked" /> {{ entry_settings_use_option_id }}
|
||||
{% else %}
|
||||
<input type="checkbox" name="export_import_settings_use_option_id" value="1" /> {{ entry_settings_use_option_id }}
|
||||
{% endif %}
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group" style="margin:0px;">
|
||||
<label class="radio-inline">
|
||||
{% if (settings_use_option_value_id) %}
|
||||
<input type="checkbox" name="export_import_settings_use_option_value_id" value="1" checked="checked" /> {{ entry_settings_use_option_value_id }}
|
||||
{% else %}
|
||||
<input type="checkbox" name="export_import_settings_use_option_value_id" value="1" /> {{ entry_settings_use_option_value_id }}
|
||||
{% endif %}
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group" style="margin:0px;">
|
||||
<label class="radio-inline">
|
||||
{% if (settings_use_attribute_group_id) %}
|
||||
<input type="checkbox" name="export_import_settings_use_attribute_group_id" value="1" checked="checked" /> {{ entry_settings_use_attribute_group_id }}
|
||||
{% else %}
|
||||
<input type="checkbox" name="export_import_settings_use_attribute_group_id" value="1" /> {{ entry_settings_use_attribute_group_id }}
|
||||
{% endif %}
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group" style="margin:0px;">
|
||||
<label class="radio-inline">
|
||||
{% if (settings_use_attribute_id) %}
|
||||
<input type="checkbox" name="export_import_settings_use_attribute_id" value="1" checked="checked" /> {{ entry_settings_use_attribute_id }}
|
||||
{% else %}
|
||||
<input type="checkbox" name="export_import_settings_use_attribute_id" value="1" /> {{ entry_settings_use_attribute_id }}
|
||||
{% endif %}
|
||||
</label>
|
||||
</div>
|
||||
{% if (exist_filter) %}
|
||||
<div class="form-group" style="margin:0px;">
|
||||
<label class="radio-inline">
|
||||
{% if (settings_use_filter_group_id) %}
|
||||
<input type="checkbox" name="export_import_settings_use_filter_group_id" value="1" checked="checked" /> {{ entry_settings_use_filter_group_id }}
|
||||
{% else %}
|
||||
<input type="checkbox" name="export_import_settings_use_filter_group_id" value="1" /> {{ entry_settings_use_filter_group_id }}
|
||||
{% endif %}
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group" style="margin:0px;">
|
||||
<label class="radio-inline">
|
||||
{% if (settings_use_filter_id) %}
|
||||
<input type="checkbox" name="export_import_settings_use_filter_id" value="1" checked="checked" /> {{ entry_settings_use_filter_id }}
|
||||
{% else %}
|
||||
<input type="checkbox" name="export_import_settings_use_filter_id" value="1" /> {{ entry_settings_use_filter_id }}
|
||||
{% endif %}
|
||||
</label>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="form-group" style="margin:0px;">
|
||||
<div class="col-sm-12">
|
||||
<a onclick="updateSettings();" class="btn btn-primary"><span>{{ button_settings }}</span></a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="tab-support">
|
||||
<div id="export_import_notification" class="alert alert-info"><i class="fa fa-info-circle"></i>
|
||||
<div id="export_import_loading"><img src="view/image/export-import/loading.gif" />{{ text_loading_notifications }}</div>
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
</div>
|
||||
<table class="table table-bordered table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-nowrap">{{ entry_version }}</td>
|
||||
<td>{{ version_export_import }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-nowrap">{{ entry_oc_version }}</td>
|
||||
<td>{{ version_opencart }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-nowrap" style="vertical-align:top;">{{ entry_license }}</td>
|
||||
<td class="text-wrap">{{ text_license }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script type="text/javascript"><!--
|
||||
|
||||
function getNotifications() {
|
||||
$('#export_import_notification').html('<i class="fa fa-info-circle"></i><button type="button" class="close" data-dismiss="alert">×</button> <div id="export_import_loading"><img src="view/image/export-import/loading.gif" />{{ text_loading_notifications }}</div>');
|
||||
setTimeout(
|
||||
function(){
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: 'index.php?route=extension/export_import/getNotifications&user_token={{ user_token }}',
|
||||
dataType: 'json',
|
||||
success: function(json) {
|
||||
if (json['error']) {
|
||||
$('#export_import_notification').html('<i class="fa fa-info-circle"></i><button type="button" class="close" data-dismiss="alert">×</button> '+json['error']+' <span style="cursor:pointer;font-weight:bold;text-decoration:underline;float:right;" onclick="getNotifications();">{{ text_retry }}</span>');
|
||||
} else if (json['message']) {
|
||||
$('#export_import_notification').html('<i class="fa fa-info-circle"></i><button type="button" class="close" data-dismiss="alert">×</button> '+json['message']);
|
||||
} else {
|
||||
$('#export_import_notification').html('<i class="fa fa-info-circle"></i><button type="button" class="close" data-dismiss="alert">×</button> '+'{{ error_no_news }}');
|
||||
}
|
||||
},
|
||||
failure: function(){
|
||||
$('#export_import_notification').html('<i class="fa fa-info-circle"></i><button type="button" class="close" data-dismiss="alert">×</button> '+'{{ error_notifications }} <span style="cursor:pointer;font-weight:bold;text-decoration:underline;float:right;" onclick="getNotifications();">{{ text_retry }}</span>');
|
||||
},
|
||||
error: function() {
|
||||
$('#export_import_notification').html('<i class="fa fa-info-circle"></i><button type="button" class="close" data-dismiss="alert">×</button> '+'{{ error_notifications }} <span style="cursor:pointer;font-weight:bold;text-decoration:underline;float:right;" onclick="getNotifications();">{{ text_retry }}</span>');
|
||||
}
|
||||
});
|
||||
},
|
||||
500
|
||||
);
|
||||
}
|
||||
|
||||
function check_export_filter(export_type) {
|
||||
if (export_type=='p') {
|
||||
$('#export_filter').show();
|
||||
} else {
|
||||
$('#export_filter').hide();
|
||||
}
|
||||
}
|
||||
|
||||
function check_range_type(export_type) {
|
||||
if ((export_type=='p') || (export_type=='c') || (export_type=='u')) {
|
||||
$('#range_type').show();
|
||||
$('#range_type_id').prop('checked',true);
|
||||
$('#range_type_page').prop('checked',false);
|
||||
$('.id').show();
|
||||
$('.page').hide();
|
||||
} else {
|
||||
$('#range_type').hide();
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
check_export_filter($('input[name=export_type]:checked').val());
|
||||
check_range_type($('input[name=export_type]:checked').val());
|
||||
|
||||
$("#range_type_id").click(function() {
|
||||
$(".page").hide();
|
||||
$(".id").show();
|
||||
});
|
||||
|
||||
$("#range_type_page").click(function() {
|
||||
$(".id").hide();
|
||||
$(".page").show();
|
||||
});
|
||||
|
||||
$('input[name=export_type]').click(function() {
|
||||
check_export_filter($(this).val());
|
||||
check_range_type($(this).val());
|
||||
});
|
||||
|
||||
$('span.close').click(function() {
|
||||
$(this).parent().remove();
|
||||
});
|
||||
|
||||
$('a[data-toggle="tab"]').click(function() {
|
||||
$('#export_import_welcome').remove();
|
||||
});
|
||||
|
||||
$('a[href="#tab-support"').click(function() {
|
||||
if ($(this).parent().attr('class')!='active') {
|
||||
getNotifications();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function checkFileSize(id) {
|
||||
// See also http://stackoverflow.com/questions/3717793/javascript-file-upload-size-validation for details
|
||||
var input, file, file_size;
|
||||
|
||||
if (!window.FileReader) {
|
||||
// The file API isn't yet supported on user's browser
|
||||
return true;
|
||||
}
|
||||
|
||||
input = document.getElementById(id);
|
||||
if (!input) {
|
||||
// couldn't find the file input element
|
||||
return true;
|
||||
}
|
||||
else if (!input.files) {
|
||||
// browser doesn't seem to support the `files` property of file inputs
|
||||
return true;
|
||||
}
|
||||
else if (!input.files[0]) {
|
||||
// no file has been selected for the upload
|
||||
alert( "{{ error_select_file }}" );
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
file = input.files[0];
|
||||
file_size = file.size;
|
||||
{% if ((post_max_size is defined) and (post_max_size)) %}
|
||||
// check against PHP's post_max_size
|
||||
post_max_size = {{ post_max_size }};
|
||||
if (file_size > post_max_size) {
|
||||
alert( "{{ error_post_max_size }}" );
|
||||
return false;
|
||||
}
|
||||
{% endif %}
|
||||
{% if ((upload_max_filesize is defined) and (upload_max_filesize)) %}
|
||||
// check against PHP's upload_max_filesize
|
||||
upload_max_filesize = {{ upload_max_filesize }};
|
||||
if (file_size > upload_max_filesize) {
|
||||
alert( "{{ error_upload_max_filesize }}" );
|
||||
return false;
|
||||
}
|
||||
{% endif %}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function uploadData() {
|
||||
if (checkFileSize('upload')) {
|
||||
$('#import').submit();
|
||||
}
|
||||
}
|
||||
|
||||
function isNumber(txt){
|
||||
var regExp=/^[\d]{1,}$/;
|
||||
return regExp.test(txt);
|
||||
}
|
||||
|
||||
count_product = {{ count_product }};
|
||||
|
||||
function updateCountProducts() {
|
||||
$.ajax({
|
||||
url: 'index.php?route=extension/export_import/getCountProduct&user_token={{ user_token }}',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: $("input[name='categories[]'],input[name='manufacturers[]']").serialize(),
|
||||
success: function(json) {
|
||||
if (json['count']) {
|
||||
count_product = json['count'];
|
||||
} else {
|
||||
}
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function validateExportForm(id) {
|
||||
var export_type = $('input[name=export_type]:checked').val();
|
||||
if ((export_type!='c') && (export_type!='p') && (export_type!='u')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
var val = $("input[name=range_type]:checked").val();
|
||||
var min = $("input[name=min]").val();
|
||||
var max = $("input[name=max]").val();
|
||||
|
||||
if ((min=='') && (max=='')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!isNumber(min) || !isNumber(max)) {
|
||||
alert("{{ error_param_not_number }}");
|
||||
return false;
|
||||
}
|
||||
|
||||
var count_item;
|
||||
switch (export_type) {
|
||||
case 'p': count_item = count_product-1; break;
|
||||
case 'c': count_item = {{ count_category-1 }}; break;
|
||||
default: count_item = {{ count_customer-1 }}; break;
|
||||
}
|
||||
var batchNo = parseInt(count_item/parseInt(min))+1; // Maximum number of item-batches, namely, item number/min, and then rounded up (that is, integer plus 1)
|
||||
var minItemId;
|
||||
switch (export_type) {
|
||||
case 'p': minItemId = parseInt( {{ min_product_id }} ); break;
|
||||
case 'c': minItemId = parseInt( {{ min_category_id }} ); break;
|
||||
default: minItemId = parseInt( {{ min_customer_id }} ); break;
|
||||
|
||||
}
|
||||
var maxItemId;
|
||||
switch (export_type) {
|
||||
case 'p': maxItemId = parseInt( {{ max_product_id }} ); break;
|
||||
case 'c': maxItemId = parseInt( {{ max_category_id }} ); break;
|
||||
default: maxItemId = parseInt( {{ max_customer_id }} ); break;
|
||||
|
||||
}
|
||||
|
||||
if (val=="page") { // Min for the batch size, Max for the batch number
|
||||
if (parseInt(max) <= 0) {
|
||||
alert("{{ error_batch_number }}");
|
||||
return false;
|
||||
}
|
||||
if (parseInt(max) > batchNo) {
|
||||
alert("{{ error_page_no_data }}");
|
||||
return false;
|
||||
} else {
|
||||
$("input[name=max]").val(parseInt(max)+1);
|
||||
}
|
||||
} else {
|
||||
if (minItemId <= 0) {
|
||||
alert("{{ error_min_item_id }}");
|
||||
return false;
|
||||
}
|
||||
if (parseInt(min) > maxItemId || parseInt(max) < minItemId || parseInt(min) > parseInt(max)) {
|
||||
alert("{{ error_id_no_data }}");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function downloadData() {
|
||||
if (validateExportForm('export')) {
|
||||
$('#export').submit();
|
||||
}
|
||||
}
|
||||
|
||||
function updateSettings() {
|
||||
$('#settings').submit();
|
||||
}
|
||||
|
||||
// Category
|
||||
$('input[name=\'category\']').autocomplete({
|
||||
'source': function(request, response) {
|
||||
$.ajax({
|
||||
url: 'index.php?route=catalog/category/autocomplete&user_token={{ user_token }}&filter_name=' + encodeURIComponent(request),
|
||||
dataType: 'json',
|
||||
success: function(json) {
|
||||
response($.map(json, function(item) {
|
||||
return {
|
||||
label: item['name'],
|
||||
value: item['category_id']
|
||||
}
|
||||
}));
|
||||
}
|
||||
});
|
||||
},
|
||||
'select': function(item) {
|
||||
$('input[name=\'category\']').val('');
|
||||
$('#category' + item['value']).remove();
|
||||
$('#categories').append('<div id="category' + item['value'] + '"><i class="fa fa-minus-circle"></i> ' + item['label'] + '<input type="hidden" name="categories[]" value="' + item['value'] + '" /></div>');
|
||||
updateCountProducts();
|
||||
}
|
||||
});
|
||||
|
||||
$('#categories').delegate('.fa-minus-circle', 'click', function() {
|
||||
$(this).parent().remove();
|
||||
updateCountProducts();
|
||||
});
|
||||
|
||||
// Manufacturer
|
||||
$('input[name=\'manufacturer\']').autocomplete({
|
||||
'source': function(request, response) {
|
||||
$.ajax({
|
||||
url: 'index.php?route=catalog/manufacturer/autocomplete&user_token={{ user_token }}&filter_name=' + encodeURIComponent(request),
|
||||
dataType: 'json',
|
||||
success: function(json) {
|
||||
response($.map(json, function(item) {
|
||||
return {
|
||||
label: item['name'],
|
||||
value: item['manufacturer_id']
|
||||
}
|
||||
}));
|
||||
}
|
||||
});
|
||||
},
|
||||
'select': function(item) {
|
||||
$('input[name=\'manufacturer\']').val('');
|
||||
$('#manufacturer' + item['value']).remove();
|
||||
$('#manufacturers').append('<div id="manufacturer' + item['value'] + '"><i class="fa fa-minus-circle"></i> ' + item['label'] + '<input type="hidden" name="manufacturers[]" value="' + item['value'] + '" /></div>');
|
||||
updateCountProducts();
|
||||
}
|
||||
});
|
||||
|
||||
$('#manufacturers').delegate('.fa-minus-circle', 'click', function() {
|
||||
$(this).parent().remove();
|
||||
updateCountProducts();
|
||||
});
|
||||
//--></script>
|
||||
|
||||
</div>
|
||||
{{ footer }}
|
||||
@@ -100,7 +100,6 @@ foreach(['name','email','telephone','address','open', 'comment'] as $item){
|
||||
$data['blog_menu'] = '';
|
||||
}
|
||||
$data['service_menu'] = $this->load->controller('service/menu');
|
||||
$data['search'] = $this->load->controller('common/search');
|
||||
$data['cart'] = $this->load->controller('common/cart');
|
||||
$data['menu'] = $this->load->controller('common/menu');
|
||||
|
||||
|
||||
@@ -1,16 +1,6 @@
|
||||
<?php
|
||||
class ControllerCommonSearch extends Controller {
|
||||
public function index() {
|
||||
$this->load->language('common/search');
|
||||
|
||||
$data['text_search'] = $this->language->get('text_search');
|
||||
|
||||
if (isset($this->request->get['search'])) {
|
||||
$data['search'] = $this->request->get['search'];
|
||||
} else {
|
||||
$data['search'] = '';
|
||||
}
|
||||
|
||||
return $this->load->view('common/search', $data);
|
||||
return '';
|
||||
}
|
||||
}
|
||||
@@ -38,14 +38,24 @@ class ControllerErrorNotFound extends Controller {
|
||||
$data['text_eyebrow'] = $this->language->get('text_eyebrow');
|
||||
$data['text_hint'] = $this->language->get('text_hint');
|
||||
$data['button_home'] = $this->language->get('button_home');
|
||||
$data['button_search'] = $this->language->get('button_search');
|
||||
$data['button_catalog'] = $this->language->get('button_catalog');
|
||||
$data['button_contact'] = $this->language->get('button_contact');
|
||||
$data['button_continue'] = $this->language->get('button_home');
|
||||
|
||||
$data['continue'] = $this->url->link('common/home');
|
||||
$data['search'] = $this->url->link('product/search');
|
||||
$data['contact'] = $this->url->link('information/contact');
|
||||
|
||||
$this->load->model('catalog/category');
|
||||
|
||||
$categories = $this->model_catalog_category->getCategories(0);
|
||||
|
||||
$data['catalog'] = $this->url->link('common/home');
|
||||
|
||||
if ($categories) {
|
||||
$data['catalog'] = $this->url->link('product/category', 'path=' . $categories[0]['category_id']);
|
||||
$data['button_catalog'] = $categories[0]['name'];
|
||||
}
|
||||
|
||||
$data['column_left'] = $this->load->controller('common/column_left');
|
||||
$data['column_right'] = $this->load->controller('common/column_right');
|
||||
$data['content_top'] = $this->load->controller('common/content_top');
|
||||
|
||||
@@ -63,7 +63,15 @@ class ControllerInformationSitemap extends Controller {
|
||||
$data['download'] = $this->url->link('account/download', '', true);
|
||||
$data['cart'] = $this->url->link('checkout/cart');
|
||||
$data['checkout'] = $this->url->link('checkout/checkout', '', true);
|
||||
$data['search'] = $this->url->link('product/search');
|
||||
$data['search'] = $this->url->link('common/home');
|
||||
$data['catalog'] = $this->url->link('common/home');
|
||||
|
||||
if ($categories_1) {
|
||||
$data['search'] = $this->url->link('product/category', 'path=' . $categories_1[0]['category_id']);
|
||||
$data['catalog'] = $this->url->link('product/category', 'path=' . $categories_1[0]['category_id']);
|
||||
}
|
||||
|
||||
$data['text_catalog'] = $categories_1 ? $categories_1[0]['name'] : $this->language->get('text_search');
|
||||
$data['contact'] = $this->url->link('information/contact');
|
||||
|
||||
$this->load->model('catalog/information');
|
||||
|
||||
@@ -106,51 +106,6 @@ class ControllerProductProduct extends Controller {
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($this->request->get['search']) || isset($this->request->get['tag'])) {
|
||||
$url = '';
|
||||
|
||||
if (isset($this->request->get['search'])) {
|
||||
$url .= '&search=' . $this->request->get['search'];
|
||||
}
|
||||
|
||||
if (isset($this->request->get['tag'])) {
|
||||
$url .= '&tag=' . $this->request->get['tag'];
|
||||
}
|
||||
|
||||
if (isset($this->request->get['description'])) {
|
||||
$url .= '&description=' . $this->request->get['description'];
|
||||
}
|
||||
|
||||
if (isset($this->request->get['category_id'])) {
|
||||
$url .= '&category_id=' . $this->request->get['category_id'];
|
||||
}
|
||||
|
||||
if (isset($this->request->get['sub_category'])) {
|
||||
$url .= '&sub_category=' . $this->request->get['sub_category'];
|
||||
}
|
||||
|
||||
if (isset($this->request->get['sort'])) {
|
||||
$url .= '&sort=' . $this->request->get['sort'];
|
||||
}
|
||||
|
||||
if (isset($this->request->get['order'])) {
|
||||
$url .= '&order=' . $this->request->get['order'];
|
||||
}
|
||||
|
||||
if (isset($this->request->get['page'])) {
|
||||
$url .= '&page=' . $this->request->get['page'];
|
||||
}
|
||||
|
||||
if (isset($this->request->get['limit'])) {
|
||||
$url .= '&limit=' . $this->request->get['limit'];
|
||||
}
|
||||
|
||||
$data['breadcrumbs'][] = array(
|
||||
'text' => $this->language->get('text_search'),
|
||||
'href' => $this->url->link('product/search', $url)
|
||||
);
|
||||
}
|
||||
|
||||
if (isset($this->request->get['product_id'])) {
|
||||
$product_id = (int)$this->request->get['product_id'];
|
||||
} else {
|
||||
@@ -257,6 +212,10 @@ class ControllerProductProduct extends Controller {
|
||||
$data['reward'] = $product_info['reward'];
|
||||
$data['points'] = $product_info['points'];
|
||||
$data['description'] = html_entity_decode($product_info['description'], ENT_QUOTES, 'UTF-8');
|
||||
$data['description_first_rental'] = html_entity_decode($product_info['description_first_rental'], ENT_QUOTES, 'UTF-8');
|
||||
$data['description_second_rental'] = html_entity_decode($product_info['description_second_rental'], ENT_QUOTES, 'UTF-8');
|
||||
$data['description_purchase'] = html_entity_decode($product_info['description_purchase'], ENT_QUOTES, 'UTF-8');
|
||||
$data['description_terms'] = html_entity_decode($product_info['description_terms'], ENT_QUOTES, 'UTF-8');
|
||||
|
||||
if ($product_info['quantity'] <= 0) {
|
||||
$data['stock'] = $product_info['stock_status'];
|
||||
@@ -471,7 +430,7 @@ $data['price_n'] = $product_info['price'];
|
||||
foreach ($tags as $tag) {
|
||||
$data['tags'][] = array(
|
||||
'tag' => trim($tag),
|
||||
'href' => $this->url->link('product/search', 'tag=' . trim($tag))
|
||||
'href' => ''
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,464 +1,14 @@
|
||||
<?php
|
||||
// * @source See SOURCE.txt for source and other copyright.
|
||||
// * @license GNU General Public License version 3; see LICENSE.txt
|
||||
|
||||
class ControllerProductSearch extends Controller {
|
||||
public function index() {
|
||||
$this->load->language('product/search');
|
||||
|
||||
$this->load->model('catalog/category');
|
||||
|
||||
$this->load->model('catalog/product');
|
||||
$categories = $this->model_catalog_category->getCategories(0);
|
||||
|
||||
$this->load->model('tool/image');
|
||||
|
||||
if (isset($this->request->get['search'])) {
|
||||
$search = $this->request->get['search'];
|
||||
if ($categories) {
|
||||
$this->response->redirect($this->url->link('product/category', 'path=' . $categories[0]['category_id']));
|
||||
} else {
|
||||
$search = '';
|
||||
$this->response->redirect($this->url->link('common/home'));
|
||||
}
|
||||
|
||||
if (isset($this->request->get['tag'])) {
|
||||
$tag = $this->request->get['tag'];
|
||||
} elseif (isset($this->request->get['search'])) {
|
||||
$tag = $this->request->get['search'];
|
||||
} else {
|
||||
$tag = '';
|
||||
}
|
||||
|
||||
if (isset($this->request->get['description'])) {
|
||||
$description = $this->request->get['description'];
|
||||
} else {
|
||||
$description = '';
|
||||
}
|
||||
|
||||
if (isset($this->request->get['category_id'])) {
|
||||
$category_id = $this->request->get['category_id'];
|
||||
} else {
|
||||
$category_id = 0;
|
||||
}
|
||||
|
||||
if (isset($this->request->get['sub_category'])) {
|
||||
$sub_category = $this->request->get['sub_category'];
|
||||
} else {
|
||||
$sub_category = '';
|
||||
}
|
||||
|
||||
if (isset($this->request->get['sort'])) {
|
||||
$sort = $this->request->get['sort'];
|
||||
} else {
|
||||
$sort = 'p.sort_order';
|
||||
}
|
||||
|
||||
if (isset($this->request->get['order'])) {
|
||||
$order = $this->request->get['order'];
|
||||
} else {
|
||||
$order = 'ASC';
|
||||
}
|
||||
|
||||
if (isset($this->request->get['page'])) {
|
||||
$page = (int)$this->request->get['page'];
|
||||
} else {
|
||||
$page = 1;
|
||||
}
|
||||
|
||||
if (isset($this->request->get['limit'])) {
|
||||
$limit = (int)$this->request->get['limit'];
|
||||
} else {
|
||||
$limit = $this->config->get('theme_' . $this->config->get('config_theme') . '_product_limit');
|
||||
}
|
||||
|
||||
if (isset($this->request->get['search'])) {
|
||||
$this->document->setTitle($this->language->get('heading_title') . ' - ' . $this->request->get['search']);
|
||||
} elseif (isset($this->request->get['tag'])) {
|
||||
$this->document->setTitle($this->language->get('heading_title') . ' - ' . $this->language->get('heading_tag') . $this->request->get['tag']);
|
||||
} else {
|
||||
$this->document->setTitle($this->language->get('heading_title'));
|
||||
}
|
||||
|
||||
$this->document->setRobots('noindex,follow');
|
||||
|
||||
$data['breadcrumbs'] = array();
|
||||
|
||||
$data['breadcrumbs'][] = array(
|
||||
'text' => $this->language->get('text_home'),
|
||||
'href' => $this->url->link('common/home')
|
||||
);
|
||||
|
||||
$url = '';
|
||||
|
||||
if (isset($this->request->get['search'])) {
|
||||
$url .= '&search=' . urlencode(html_entity_decode($this->request->get['search'], ENT_QUOTES, 'UTF-8'));
|
||||
}
|
||||
|
||||
if (isset($this->request->get['tag'])) {
|
||||
$url .= '&tag=' . urlencode(html_entity_decode($this->request->get['tag'], ENT_QUOTES, 'UTF-8'));
|
||||
}
|
||||
|
||||
if (isset($this->request->get['description'])) {
|
||||
$url .= '&description=' . $this->request->get['description'];
|
||||
}
|
||||
|
||||
if (isset($this->request->get['category_id'])) {
|
||||
$url .= '&category_id=' . $this->request->get['category_id'];
|
||||
}
|
||||
|
||||
if (isset($this->request->get['sub_category'])) {
|
||||
$url .= '&sub_category=' . $this->request->get['sub_category'];
|
||||
}
|
||||
|
||||
if (isset($this->request->get['sort'])) {
|
||||
$url .= '&sort=' . $this->request->get['sort'];
|
||||
}
|
||||
|
||||
if (isset($this->request->get['order'])) {
|
||||
$url .= '&order=' . $this->request->get['order'];
|
||||
}
|
||||
|
||||
if (isset($this->request->get['page'])) {
|
||||
$url .= '&page=' . $this->request->get['page'];
|
||||
}
|
||||
|
||||
if (isset($this->request->get['limit'])) {
|
||||
$url .= '&limit=' . $this->request->get['limit'];
|
||||
}
|
||||
|
||||
$data['breadcrumbs'][] = array(
|
||||
'text' => $this->language->get('heading_title'),
|
||||
'href' => $this->url->link('product/search', $url)
|
||||
);
|
||||
|
||||
if (isset($this->request->get['search'])) {
|
||||
$data['heading_title'] = $this->language->get('heading_title') . ' - ' . $this->request->get['search'];
|
||||
} else {
|
||||
$data['heading_title'] = $this->language->get('heading_title');
|
||||
}
|
||||
|
||||
$this->document->setRobots('noindex,follow');
|
||||
|
||||
$data['text_compare'] = sprintf($this->language->get('text_compare'), (isset($this->session->data['compare']) ? count($this->session->data['compare']) : 0));
|
||||
|
||||
$data['compare'] = $this->url->link('product/compare');
|
||||
|
||||
// 3 Level Category Search
|
||||
$data['categories'] = array();
|
||||
|
||||
$categories_1 = $this->model_catalog_category->getCategories(0);
|
||||
|
||||
foreach ($categories_1 as $category_1) {
|
||||
$level_2_data = array();
|
||||
|
||||
$categories_2 = $this->model_catalog_category->getCategories($category_1['category_id']);
|
||||
|
||||
foreach ($categories_2 as $category_2) {
|
||||
$level_3_data = array();
|
||||
|
||||
$categories_3 = $this->model_catalog_category->getCategories($category_2['category_id']);
|
||||
|
||||
foreach ($categories_3 as $category_3) {
|
||||
$level_3_data[] = array(
|
||||
'category_id' => $category_3['category_id'],
|
||||
'name' => $category_3['name'],
|
||||
);
|
||||
}
|
||||
|
||||
$level_2_data[] = array(
|
||||
'category_id' => $category_2['category_id'],
|
||||
'name' => $category_2['name'],
|
||||
'children' => $level_3_data
|
||||
);
|
||||
}
|
||||
|
||||
$data['categories'][] = array(
|
||||
'category_id' => $category_1['category_id'],
|
||||
'name' => $category_1['name'],
|
||||
'children' => $level_2_data
|
||||
);
|
||||
}
|
||||
|
||||
$data['products'] = array();
|
||||
|
||||
if (isset($this->request->get['search']) || isset($this->request->get['tag'])) {
|
||||
$filter_data = array(
|
||||
'filter_name' => $search,
|
||||
'filter_tag' => $tag,
|
||||
'filter_description' => $description,
|
||||
'filter_category_id' => $category_id,
|
||||
'filter_sub_category' => $sub_category,
|
||||
'sort' => $sort,
|
||||
'order' => $order,
|
||||
'start' => ($page - 1) * $limit,
|
||||
'limit' => $limit
|
||||
);
|
||||
|
||||
$product_total = $this->model_catalog_product->getTotalProducts($filter_data);
|
||||
|
||||
$results = $this->model_catalog_product->getProducts($filter_data);
|
||||
|
||||
foreach ($results as $result) {
|
||||
if ($result['image']) {
|
||||
$image = $this->model_tool_image->resize($result['image'], $this->config->get('theme_' . $this->config->get('config_theme') . '_image_product_width'), $this->config->get('theme_' . $this->config->get('config_theme') . '_image_product_height'));
|
||||
} else {
|
||||
$image = $this->model_tool_image->resize('placeholder.png', $this->config->get('theme_' . $this->config->get('config_theme') . '_image_product_width'), $this->config->get('theme_' . $this->config->get('config_theme') . '_image_product_height'));
|
||||
}
|
||||
|
||||
if ($this->customer->isLogged() || !$this->config->get('config_customer_price')) {
|
||||
$price = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']);
|
||||
} else {
|
||||
$price = false;
|
||||
}
|
||||
|
||||
if (!is_null($result['special']) && (float)$result['special'] >= 0) {
|
||||
$special = $this->currency->format($this->tax->calculate($result['special'], $result['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']);
|
||||
$tax_price = (float)$result['special'];
|
||||
} else {
|
||||
$special = false;
|
||||
$tax_price = (float)$result['price'];
|
||||
}
|
||||
|
||||
if ($this->config->get('config_tax')) {
|
||||
$tax = $this->currency->format($tax_price, $this->session->data['currency']);
|
||||
} else {
|
||||
$tax = false;
|
||||
}
|
||||
|
||||
if ($this->config->get('config_review_status')) {
|
||||
$rating = (int)$result['rating'];
|
||||
} else {
|
||||
$rating = false;
|
||||
}
|
||||
|
||||
$data['products'][] = array(
|
||||
'product_id' => $result['product_id'],
|
||||
'thumb' => $image,
|
||||
'name' => $result['name'],
|
||||
'description' => utf8_substr(trim(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8'))), 0, $this->config->get('theme_' . $this->config->get('config_theme') . '_product_description_length')) . '..',
|
||||
'price' => $price,
|
||||
'special' => $special,
|
||||
'tax' => $tax,
|
||||
'minimum' => $result['minimum'] > 0 ? $result['minimum'] : 1,
|
||||
'rating' => $result['rating'],
|
||||
'href' => $this->url->link('product/product', 'product_id=' . $result['product_id'] . $url)
|
||||
);
|
||||
}
|
||||
|
||||
$url = '';
|
||||
|
||||
if (isset($this->request->get['search'])) {
|
||||
$url .= '&search=' . urlencode(html_entity_decode($this->request->get['search'], ENT_QUOTES, 'UTF-8'));
|
||||
}
|
||||
|
||||
if (isset($this->request->get['tag'])) {
|
||||
$url .= '&tag=' . urlencode(html_entity_decode($this->request->get['tag'], ENT_QUOTES, 'UTF-8'));
|
||||
}
|
||||
|
||||
if (isset($this->request->get['description'])) {
|
||||
$url .= '&description=' . $this->request->get['description'];
|
||||
}
|
||||
|
||||
if (isset($this->request->get['category_id'])) {
|
||||
$url .= '&category_id=' . $this->request->get['category_id'];
|
||||
}
|
||||
|
||||
if (isset($this->request->get['sub_category'])) {
|
||||
$url .= '&sub_category=' . $this->request->get['sub_category'];
|
||||
}
|
||||
|
||||
if (isset($this->request->get['limit'])) {
|
||||
$url .= '&limit=' . $this->request->get['limit'];
|
||||
}
|
||||
|
||||
$data['sorts'] = array();
|
||||
|
||||
$data['sorts'][] = array(
|
||||
'text' => $this->language->get('text_default'),
|
||||
'value' => 'p.sort_order-ASC',
|
||||
'href' => $this->url->link('product/search', 'sort=p.sort_order&order=ASC' . $url)
|
||||
);
|
||||
|
||||
$data['sorts'][] = array(
|
||||
'text' => $this->language->get('text_name_asc'),
|
||||
'value' => 'pd.name-ASC',
|
||||
'href' => $this->url->link('product/search', 'sort=pd.name&order=ASC' . $url)
|
||||
);
|
||||
|
||||
$data['sorts'][] = array(
|
||||
'text' => $this->language->get('text_name_desc'),
|
||||
'value' => 'pd.name-DESC',
|
||||
'href' => $this->url->link('product/search', 'sort=pd.name&order=DESC' . $url)
|
||||
);
|
||||
|
||||
$data['sorts'][] = array(
|
||||
'text' => $this->language->get('text_price_asc'),
|
||||
'value' => 'p.price-ASC',
|
||||
'href' => $this->url->link('product/search', 'sort=p.price&order=ASC' . $url)
|
||||
);
|
||||
|
||||
$data['sorts'][] = array(
|
||||
'text' => $this->language->get('text_price_desc'),
|
||||
'value' => 'p.price-DESC',
|
||||
'href' => $this->url->link('product/search', 'sort=p.price&order=DESC' . $url)
|
||||
);
|
||||
|
||||
if ($this->config->get('config_review_status')) {
|
||||
$data['sorts'][] = array(
|
||||
'text' => $this->language->get('text_rating_desc'),
|
||||
'value' => 'rating-DESC',
|
||||
'href' => $this->url->link('product/search', 'sort=rating&order=DESC' . $url)
|
||||
);
|
||||
|
||||
$data['sorts'][] = array(
|
||||
'text' => $this->language->get('text_rating_asc'),
|
||||
'value' => 'rating-ASC',
|
||||
'href' => $this->url->link('product/search', 'sort=rating&order=ASC' . $url)
|
||||
);
|
||||
}
|
||||
|
||||
$data['sorts'][] = array(
|
||||
'text' => $this->language->get('text_model_asc'),
|
||||
'value' => 'p.model-ASC',
|
||||
'href' => $this->url->link('product/search', 'sort=p.model&order=ASC' . $url)
|
||||
);
|
||||
|
||||
$data['sorts'][] = array(
|
||||
'text' => $this->language->get('text_model_desc'),
|
||||
'value' => 'p.model-DESC',
|
||||
'href' => $this->url->link('product/search', 'sort=p.model&order=DESC' . $url)
|
||||
);
|
||||
|
||||
$url = '';
|
||||
|
||||
if (isset($this->request->get['search'])) {
|
||||
$url .= '&search=' . urlencode(html_entity_decode($this->request->get['search'], ENT_QUOTES, 'UTF-8'));
|
||||
}
|
||||
|
||||
if (isset($this->request->get['tag'])) {
|
||||
$url .= '&tag=' . urlencode(html_entity_decode($this->request->get['tag'], ENT_QUOTES, 'UTF-8'));
|
||||
}
|
||||
|
||||
if (isset($this->request->get['description'])) {
|
||||
$url .= '&description=' . $this->request->get['description'];
|
||||
}
|
||||
|
||||
if (isset($this->request->get['category_id'])) {
|
||||
$url .= '&category_id=' . $this->request->get['category_id'];
|
||||
}
|
||||
|
||||
if (isset($this->request->get['sub_category'])) {
|
||||
$url .= '&sub_category=' . $this->request->get['sub_category'];
|
||||
}
|
||||
|
||||
if (isset($this->request->get['sort'])) {
|
||||
$url .= '&sort=' . $this->request->get['sort'];
|
||||
}
|
||||
|
||||
if (isset($this->request->get['order'])) {
|
||||
$url .= '&order=' . $this->request->get['order'];
|
||||
}
|
||||
|
||||
$data['limits'] = array();
|
||||
|
||||
$limits = array_unique(array($this->config->get('theme_' . $this->config->get('config_theme') . '_product_limit'), 25, 50, 75, 100));
|
||||
|
||||
sort($limits);
|
||||
|
||||
foreach($limits as $value) {
|
||||
$data['limits'][] = array(
|
||||
'text' => $value,
|
||||
'value' => $value,
|
||||
'href' => $this->url->link('product/search', $url . '&limit=' . $value)
|
||||
);
|
||||
}
|
||||
|
||||
$url = '';
|
||||
|
||||
if (isset($this->request->get['search'])) {
|
||||
$url .= '&search=' . urlencode(html_entity_decode($this->request->get['search'], ENT_QUOTES, 'UTF-8'));
|
||||
}
|
||||
|
||||
if (isset($this->request->get['tag'])) {
|
||||
$url .= '&tag=' . urlencode(html_entity_decode($this->request->get['tag'], ENT_QUOTES, 'UTF-8'));
|
||||
}
|
||||
|
||||
if (isset($this->request->get['description'])) {
|
||||
$url .= '&description=' . $this->request->get['description'];
|
||||
}
|
||||
|
||||
if (isset($this->request->get['category_id'])) {
|
||||
$url .= '&category_id=' . $this->request->get['category_id'];
|
||||
}
|
||||
|
||||
if (isset($this->request->get['sub_category'])) {
|
||||
$url .= '&sub_category=' . $this->request->get['sub_category'];
|
||||
}
|
||||
|
||||
if (isset($this->request->get['sort'])) {
|
||||
$url .= '&sort=' . $this->request->get['sort'];
|
||||
}
|
||||
|
||||
if (isset($this->request->get['order'])) {
|
||||
$url .= '&order=' . $this->request->get['order'];
|
||||
}
|
||||
|
||||
if (isset($this->request->get['limit'])) {
|
||||
$url .= '&limit=' . $this->request->get['limit'];
|
||||
}
|
||||
|
||||
$pagination = new Pagination();
|
||||
$pagination->total = $product_total;
|
||||
$pagination->page = $page;
|
||||
$pagination->limit = $limit;
|
||||
$pagination->url = $this->url->link('product/search', $url . '&page={page}');
|
||||
|
||||
$data['pagination'] = $pagination->render();
|
||||
|
||||
$data['results'] = sprintf($this->language->get('text_pagination'), ($product_total) ? (($page - 1) * $limit) + 1 : 0, ((($page - 1) * $limit) > ($product_total - $limit)) ? $product_total : ((($page - 1) * $limit) + $limit), $product_total, ceil($product_total / $limit));
|
||||
|
||||
if (isset($this->request->get['search']) && $this->config->get('config_customer_search')) {
|
||||
$this->load->model('account/search');
|
||||
|
||||
if ($this->customer->isLogged()) {
|
||||
$customer_id = $this->customer->getId();
|
||||
} else {
|
||||
$customer_id = 0;
|
||||
}
|
||||
|
||||
if (isset($this->request->server['REMOTE_ADDR'])) {
|
||||
$ip = $this->request->server['REMOTE_ADDR'];
|
||||
} else {
|
||||
$ip = '';
|
||||
}
|
||||
|
||||
$search_data = array(
|
||||
'keyword' => $search,
|
||||
'category_id' => $category_id,
|
||||
'sub_category' => $sub_category,
|
||||
'description' => $description,
|
||||
'products' => $product_total,
|
||||
'customer_id' => $customer_id,
|
||||
'ip' => $ip
|
||||
);
|
||||
|
||||
$this->model_account_search->addSearch($search_data);
|
||||
}
|
||||
}
|
||||
|
||||
$data['search'] = $search;
|
||||
$data['description'] = $description;
|
||||
$data['category_id'] = $category_id;
|
||||
$data['sub_category'] = $sub_category;
|
||||
|
||||
$data['sort'] = $sort;
|
||||
$data['order'] = $order;
|
||||
$data['limit'] = $limit;
|
||||
|
||||
$data['column_left'] = $this->load->controller('common/column_left');
|
||||
$data['column_right'] = $this->load->controller('common/column_right');
|
||||
$data['content_top'] = $this->load->controller('common/content_top');
|
||||
$data['content_bottom'] = $this->load->controller('common/content_bottom');
|
||||
$data['footer'] = $this->load->controller('common/footer');
|
||||
$data['header'] = $this->load->controller('common/header');
|
||||
|
||||
$this->response->setOutput($this->load->view('product/search', $data));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,9 +8,9 @@ $_['heading_title'] = 'Страница не найдена';
|
||||
// Text
|
||||
$_['text_eyebrow'] = 'Ошибка 404';
|
||||
$_['text_error'] = 'Похоже, эта страница больше не доступна или адрес был введён с ошибкой.';
|
||||
$_['text_hint'] = 'Вернитесь на главную, посмотрите каталог через поиск или напишите нам — поможем найти нужную вещь.';
|
||||
$_['text_hint'] = 'Вернитесь на главную, перейдите в каталог или напишите нам — поможем найти нужную вещь.';
|
||||
|
||||
// Button
|
||||
$_['button_home'] = 'На главную';
|
||||
$_['button_search'] = 'К поиску';
|
||||
$_['button_catalog'] = 'Каталог';
|
||||
$_['button_contact'] = 'Написать нам';
|
||||
|
||||
@@ -15,6 +15,10 @@ class ModelCatalogProduct extends Model {
|
||||
'product_id' => $query->row['product_id'],
|
||||
'name' => $query->row['name'],
|
||||
'description' => $query->row['description'],
|
||||
'description_first_rental' => $query->row['description_first_rental'],
|
||||
'description_second_rental' => $query->row['description_second_rental'],
|
||||
'description_purchase' => $query->row['description_purchase'],
|
||||
'description_terms' => $query->row['description_terms'],
|
||||
'meta_title' => $query->row['meta_title'],
|
||||
'noindex' => $query->row['noindex'],
|
||||
'meta_h1' => $query->row['meta_h1'],
|
||||
|
||||
@@ -52,20 +52,12 @@ $(document).ready(function() {
|
||||
|
||||
/* Search */
|
||||
$('#search input[name=\'search\']').parent().find('button').on('click', function() {
|
||||
var url = $('base').attr('href') + 'index.php?route=product/search';
|
||||
|
||||
var value = $('header #search input[name=\'search\']').val();
|
||||
|
||||
if (value) {
|
||||
url += '&search=' + encodeURIComponent(value);
|
||||
}
|
||||
|
||||
location = url;
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#search input[name=\'search\']').on('keydown', function(e) {
|
||||
if (e.keyCode == 13) {
|
||||
$('header #search input[name=\'search\']').parent().find('button').trigger('click');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
<div class="not-found-eyebrow">{{ text_eyebrow|default('Ошибка 404') }}</div>
|
||||
<h1 class="heading">{{ heading_title|default('Страница не найдена') }}</h1>
|
||||
<p class="subheading">{{ text_error|default('Похоже, эта страница больше не доступна или адрес был введён с ошибкой.') }}</p>
|
||||
<p>{{ text_hint|default('Вернитесь на главную или воспользуйтесь поиском, чтобы найти нужный раздел.') }}</p>
|
||||
<p>{{ text_hint|default('Вернитесь на главную или перейдите в каталог, чтобы найти нужный раздел.') }}</p>
|
||||
<div class="not-found-actions">
|
||||
<a href="{{ continue }}" class="btn btn-dark">{{ button_home|default('На главную') }}</a>
|
||||
<a href="{{ search|default(continue) }}" class="btn btn-outline-dark">{{ button_search|default('Поиск') }}</a>
|
||||
<a href="{{ catalog|default(continue) }}" class="btn btn-outline-dark">{{ button_catalog|default('Каталог') }}</a>
|
||||
<a href="{{ contact|default(continue) }}" class="btn btn-white">{{ button_contact|default('Связаться') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
</li>
|
||||
<li><a href="{{ history }}">{{ text_cart }}</a></li>
|
||||
<li><a href="{{ checkout }}">{{ text_checkout }}</a></li>
|
||||
<li><a href="{{ search }}">{{ text_search }}</a></li>
|
||||
<li><a href="{{ catalog|default(home) }}">{{ text_catalog|default('Каталог') }}</a></li>
|
||||
<li>{{ text_information }}
|
||||
<ul>
|
||||
{% for information in informations %}
|
||||
|
||||
@@ -125,42 +125,36 @@
|
||||
{% endif %}
|
||||
<div class="mt-5">
|
||||
<button type="button" class="btn btn-dark py-3 px-5 w-mob-100" onclick="SendRequest('{{ product_id }}')">Записаться на примерку</button>
|
||||
</div>
|
||||
<div class="mt-5">
|
||||
{% set description = description|split('__NEWLINE__') %}
|
||||
<ul class="nav nav-tabs mb-3 justify-content-center justify-content-md-start" id="myTab" role="tablist">
|
||||
{% set i = 0 %}
|
||||
{% for item in range(0,5) %}
|
||||
{% if description[item] or (item == 0 and attribute_groups) %}
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link {{ i == 0 ? 'active' : '' }}" id="home-tab-{{ item }}" data-bs-toggle="tab" data-bs-target="#home-{{ item }}" type="button" role="tab" aria-controls="home-{{ item }}" aria-selected="{{ i == 0 ? 'true' : 'false' }}">
|
||||
{% if item == 0 %}
|
||||
Описание
|
||||
{% elseif item == 1 %}
|
||||
Первый прокат
|
||||
{% elseif item == 2 %}
|
||||
Второй прокат
|
||||
{% elseif item == 3 %}
|
||||
Покупка
|
||||
{% elseif item == 4 %}
|
||||
Условия
|
||||
{% endif %}
|
||||
</button>
|
||||
</li>
|
||||
</div>
|
||||
<div class="mt-5">
|
||||
{% set description_tabs = [
|
||||
{'title': 'Описание', 'content': description, 'show_attributes': true},
|
||||
{'title': 'Первый прокат', 'content': description_first_rental},
|
||||
{'title': 'Второй прокат', 'content': description_second_rental},
|
||||
{'title': 'Покупка', 'content': description_purchase},
|
||||
{'title': 'Условия', 'content': description_terms}
|
||||
] %}
|
||||
<ul class="nav nav-tabs mb-3 justify-content-center justify-content-md-start" id="myTab" role="tablist">
|
||||
{% set i = 0 %}
|
||||
{% for tab in description_tabs %}
|
||||
{% if tab.content or (tab.show_attributes and attribute_groups) %}
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link {{ i == 0 ? 'active' : '' }}" id="home-tab-{{ loop.index0 }}" data-bs-toggle="tab" data-bs-target="#home-{{ loop.index0 }}" type="button" role="tab" aria-controls="home-{{ loop.index0 }}" aria-selected="{{ i == 0 ? 'true' : 'false' }}">{{ tab.title }}</button>
|
||||
</li>
|
||||
|
||||
{% set i = i + 1 %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
</ul>
|
||||
<div class="tab-content" id="myTabContent">
|
||||
{% set i = 0 %}
|
||||
{% for item in range(0,5) %}
|
||||
{% if description[item] or (item == 0 and attribute_groups) %}
|
||||
<div class="tab-pane fade {{ i == 0 ? 'show active' : '' }}" id="home-{{ item }}" role="tabpanel" aria-labelledby="home-tab-{{ item }}">
|
||||
</ul>
|
||||
<div class="tab-content" id="myTabContent">
|
||||
{% set i = 0 %}
|
||||
{% for tab in description_tabs %}
|
||||
{% if tab.content or (tab.show_attributes and attribute_groups) %}
|
||||
<div class="tab-pane fade {{ i == 0 ? 'show active' : '' }}" id="home-{{ loop.index0 }}" role="tabpanel" aria-labelledby="home-tab-{{ loop.index0 }}">
|
||||
|
||||
{% if item == 0 and attribute_groups %}
|
||||
{% if tab.show_attributes and attribute_groups %}
|
||||
|
||||
<div class="mb-4">
|
||||
{% for attribute_group in attribute_groups %}
|
||||
@@ -177,9 +171,9 @@
|
||||
</div>
|
||||
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ description[item] }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ tab.content }}
|
||||
</div>
|
||||
{% set i = i + 1 %}
|
||||
{% endif %}
|
||||
@@ -747,4 +741,3 @@ $(document).ready(function() {
|
||||
//--></script>
|
||||
|
||||
#}
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"require": {
|
||||
"phpoffice/phpspreadsheet": "^1.20"
|
||||
}
|
||||
}
|
||||
-703
@@ -1,703 +0,0 @@
|
||||
{
|
||||
"_readme": [
|
||||
"This file locks the dependencies of your project to a known state",
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "944e701802c6072df43fb3bdd40a9d1b",
|
||||
"packages": [
|
||||
{
|
||||
"name": "ezyang/htmlpurifier",
|
||||
"version": "v4.14.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/ezyang/htmlpurifier.git",
|
||||
"reference": "12ab42bd6e742c70c0a52f7b82477fcd44e64b75"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/12ab42bd6e742c70c0a52f7b82477fcd44e64b75",
|
||||
"reference": "12ab42bd6e742c70c0a52f7b82477fcd44e64b75",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.2"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"HTMLPurifier": "library/"
|
||||
},
|
||||
"files": [
|
||||
"library/HTMLPurifier.composer.php"
|
||||
],
|
||||
"exclude-from-classmap": [
|
||||
"/library/HTMLPurifier/Language/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"LGPL-2.1-or-later"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Edward Z. Yang",
|
||||
"email": "admin@htmlpurifier.org",
|
||||
"homepage": "http://ezyang.com"
|
||||
}
|
||||
],
|
||||
"description": "Standards compliant HTML filter written in PHP",
|
||||
"homepage": "http://htmlpurifier.org/",
|
||||
"keywords": [
|
||||
"html"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/ezyang/htmlpurifier/issues",
|
||||
"source": "https://github.com/ezyang/htmlpurifier/tree/v4.14.0"
|
||||
},
|
||||
"time": "2021-12-25T01:21:49+00:00"
|
||||
},
|
||||
{
|
||||
"name": "maennchen/zipstream-php",
|
||||
"version": "2.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/maennchen/ZipStream-PHP.git",
|
||||
"reference": "c4c5803cc1f93df3d2448478ef79394a5981cc58"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/c4c5803cc1f93df3d2448478ef79394a5981cc58",
|
||||
"reference": "c4c5803cc1f93df3d2448478ef79394a5981cc58",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"myclabs/php-enum": "^1.5",
|
||||
"php": ">= 7.1",
|
||||
"psr/http-message": "^1.0",
|
||||
"symfony/polyfill-mbstring": "^1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-zip": "*",
|
||||
"guzzlehttp/guzzle": ">= 6.3",
|
||||
"mikey179/vfsstream": "^1.6",
|
||||
"phpunit/phpunit": ">= 7.5"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"ZipStream\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Paul Duncan",
|
||||
"email": "pabs@pablotron.org"
|
||||
},
|
||||
{
|
||||
"name": "Jonatan Männchen",
|
||||
"email": "jonatan@maennchen.ch"
|
||||
},
|
||||
{
|
||||
"name": "Jesse Donat",
|
||||
"email": "donatj@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "András Kolesár",
|
||||
"email": "kolesar@kolesar.hu"
|
||||
}
|
||||
],
|
||||
"description": "ZipStream is a library for dynamically streaming dynamic zip files from PHP without writing to the disk at all on the server.",
|
||||
"keywords": [
|
||||
"stream",
|
||||
"zip"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/maennchen/ZipStream-PHP/issues",
|
||||
"source": "https://github.com/maennchen/ZipStream-PHP/tree/master"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://opencollective.com/zipstream",
|
||||
"type": "open_collective"
|
||||
}
|
||||
],
|
||||
"time": "2020-05-30T13:11:16+00:00"
|
||||
},
|
||||
{
|
||||
"name": "markbaker/complex",
|
||||
"version": "3.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/MarkBaker/PHPComplex.git",
|
||||
"reference": "ab8bc271e404909db09ff2d5ffa1e538085c0f22"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/ab8bc271e404909db09ff2d5ffa1e538085c0f22",
|
||||
"reference": "ab8bc271e404909db09ff2d5ffa1e538085c0f22",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.2 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
|
||||
"phpcompatibility/php-compatibility": "^9.0",
|
||||
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.3",
|
||||
"squizlabs/php_codesniffer": "^3.4"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Complex\\": "classes/src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Mark Baker",
|
||||
"email": "mark@lange.demon.co.uk"
|
||||
}
|
||||
],
|
||||
"description": "PHP Class for working with complex numbers",
|
||||
"homepage": "https://github.com/MarkBaker/PHPComplex",
|
||||
"keywords": [
|
||||
"complex",
|
||||
"mathematics"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/MarkBaker/PHPComplex/issues",
|
||||
"source": "https://github.com/MarkBaker/PHPComplex/tree/3.0.1"
|
||||
},
|
||||
"time": "2021-06-29T15:32:53+00:00"
|
||||
},
|
||||
{
|
||||
"name": "markbaker/matrix",
|
||||
"version": "3.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/MarkBaker/PHPMatrix.git",
|
||||
"reference": "c66aefcafb4f6c269510e9ac46b82619a904c576"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/c66aefcafb4f6c269510e9ac46b82619a904c576",
|
||||
"reference": "c66aefcafb4f6c269510e9ac46b82619a904c576",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
|
||||
"phpcompatibility/php-compatibility": "^9.0",
|
||||
"phpdocumentor/phpdocumentor": "2.*",
|
||||
"phploc/phploc": "^4.0",
|
||||
"phpmd/phpmd": "2.*",
|
||||
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.3",
|
||||
"sebastian/phpcpd": "^4.0",
|
||||
"squizlabs/php_codesniffer": "^3.4"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Matrix\\": "classes/src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Mark Baker",
|
||||
"email": "mark@demon-angel.eu"
|
||||
}
|
||||
],
|
||||
"description": "PHP Class for working with matrices",
|
||||
"homepage": "https://github.com/MarkBaker/PHPMatrix",
|
||||
"keywords": [
|
||||
"mathematics",
|
||||
"matrix",
|
||||
"vector"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/MarkBaker/PHPMatrix/issues",
|
||||
"source": "https://github.com/MarkBaker/PHPMatrix/tree/3.0.0"
|
||||
},
|
||||
"time": "2021-07-01T19:01:15+00:00"
|
||||
},
|
||||
{
|
||||
"name": "myclabs/php-enum",
|
||||
"version": "1.8.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/myclabs/php-enum.git",
|
||||
"reference": "b942d263c641ddb5190929ff840c68f78713e937"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/myclabs/php-enum/zipball/b942d263c641ddb5190929ff840c68f78713e937",
|
||||
"reference": "b942d263c641ddb5190929ff840c68f78713e937",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"php": "^7.3 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^9.5",
|
||||
"squizlabs/php_codesniffer": "1.*",
|
||||
"vimeo/psalm": "^4.6.2"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"MyCLabs\\Enum\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "PHP Enum contributors",
|
||||
"homepage": "https://github.com/myclabs/php-enum/graphs/contributors"
|
||||
}
|
||||
],
|
||||
"description": "PHP Enum implementation",
|
||||
"homepage": "http://github.com/myclabs/php-enum",
|
||||
"keywords": [
|
||||
"enum"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/myclabs/php-enum/issues",
|
||||
"source": "https://github.com/myclabs/php-enum/tree/1.8.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/mnapoli",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/myclabs/php-enum",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-07-05T08:18:36+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpoffice/phpspreadsheet",
|
||||
"version": "1.20.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHPOffice/PhpSpreadsheet.git",
|
||||
"reference": "44436f270bb134b4a94670f3d020a85dfa0a3c02"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/44436f270bb134b4a94670f3d020a85dfa0a3c02",
|
||||
"reference": "44436f270bb134b4a94670f3d020a85dfa0a3c02",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-ctype": "*",
|
||||
"ext-dom": "*",
|
||||
"ext-fileinfo": "*",
|
||||
"ext-gd": "*",
|
||||
"ext-iconv": "*",
|
||||
"ext-libxml": "*",
|
||||
"ext-mbstring": "*",
|
||||
"ext-simplexml": "*",
|
||||
"ext-xml": "*",
|
||||
"ext-xmlreader": "*",
|
||||
"ext-xmlwriter": "*",
|
||||
"ext-zip": "*",
|
||||
"ext-zlib": "*",
|
||||
"ezyang/htmlpurifier": "^4.13",
|
||||
"maennchen/zipstream-php": "^2.1",
|
||||
"markbaker/complex": "^3.0",
|
||||
"markbaker/matrix": "^3.0",
|
||||
"php": "^7.3 || ^8.0",
|
||||
"psr/http-client": "^1.0",
|
||||
"psr/http-factory": "^1.0",
|
||||
"psr/simple-cache": "^1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"dealerdirect/phpcodesniffer-composer-installer": "dev-master",
|
||||
"dompdf/dompdf": "^1.0",
|
||||
"friendsofphp/php-cs-fixer": "^3.2",
|
||||
"jpgraph/jpgraph": "^4.0",
|
||||
"mpdf/mpdf": "^8.0",
|
||||
"phpcompatibility/php-compatibility": "^9.3",
|
||||
"phpstan/phpstan": "^1.1",
|
||||
"phpstan/phpstan-phpunit": "^1.0",
|
||||
"phpunit/phpunit": "^8.5 || ^9.0",
|
||||
"squizlabs/php_codesniffer": "^3.6",
|
||||
"tecnickcom/tcpdf": "^6.4"
|
||||
},
|
||||
"suggest": {
|
||||
"dompdf/dompdf": "Option for rendering PDF with PDF Writer (doesn't yet support PHP8)",
|
||||
"jpgraph/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers",
|
||||
"mpdf/mpdf": "Option for rendering PDF with PDF Writer",
|
||||
"tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer (doesn't yet support PHP8)"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"PhpOffice\\PhpSpreadsheet\\": "src/PhpSpreadsheet"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Maarten Balliauw",
|
||||
"homepage": "https://blog.maartenballiauw.be"
|
||||
},
|
||||
{
|
||||
"name": "Mark Baker",
|
||||
"homepage": "https://markbakeruk.net"
|
||||
},
|
||||
{
|
||||
"name": "Franck Lefevre",
|
||||
"homepage": "https://rootslabs.net"
|
||||
},
|
||||
{
|
||||
"name": "Erik Tilt"
|
||||
},
|
||||
{
|
||||
"name": "Adrien Crivelli"
|
||||
}
|
||||
],
|
||||
"description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine",
|
||||
"homepage": "https://github.com/PHPOffice/PhpSpreadsheet",
|
||||
"keywords": [
|
||||
"OpenXML",
|
||||
"excel",
|
||||
"gnumeric",
|
||||
"ods",
|
||||
"php",
|
||||
"spreadsheet",
|
||||
"xls",
|
||||
"xlsx"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues",
|
||||
"source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.20.0"
|
||||
},
|
||||
"time": "2021-11-23T15:23:42+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/http-client",
|
||||
"version": "1.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/http-client.git",
|
||||
"reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621",
|
||||
"reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.0 || ^8.0",
|
||||
"psr/http-message": "^1.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Psr\\Http\\Client\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "PHP-FIG",
|
||||
"homepage": "http://www.php-fig.org/"
|
||||
}
|
||||
],
|
||||
"description": "Common interface for HTTP clients",
|
||||
"homepage": "https://github.com/php-fig/http-client",
|
||||
"keywords": [
|
||||
"http",
|
||||
"http-client",
|
||||
"psr",
|
||||
"psr-18"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/php-fig/http-client/tree/master"
|
||||
},
|
||||
"time": "2020-06-29T06:28:15+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/http-factory",
|
||||
"version": "1.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/http-factory.git",
|
||||
"reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be",
|
||||
"reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.0.0",
|
||||
"psr/http-message": "^1.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Psr\\Http\\Message\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "PHP-FIG",
|
||||
"homepage": "http://www.php-fig.org/"
|
||||
}
|
||||
],
|
||||
"description": "Common interfaces for PSR-7 HTTP message factories",
|
||||
"keywords": [
|
||||
"factory",
|
||||
"http",
|
||||
"message",
|
||||
"psr",
|
||||
"psr-17",
|
||||
"psr-7",
|
||||
"request",
|
||||
"response"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/php-fig/http-factory/tree/master"
|
||||
},
|
||||
"time": "2019-04-30T12:38:16+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/http-message",
|
||||
"version": "1.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/http-message.git",
|
||||
"reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
|
||||
"reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Psr\\Http\\Message\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "PHP-FIG",
|
||||
"homepage": "http://www.php-fig.org/"
|
||||
}
|
||||
],
|
||||
"description": "Common interface for HTTP messages",
|
||||
"homepage": "https://github.com/php-fig/http-message",
|
||||
"keywords": [
|
||||
"http",
|
||||
"http-message",
|
||||
"psr",
|
||||
"psr-7",
|
||||
"request",
|
||||
"response"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/php-fig/http-message/tree/master"
|
||||
},
|
||||
"time": "2016-08-06T14:39:51+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/simple-cache",
|
||||
"version": "1.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/simple-cache.git",
|
||||
"reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
|
||||
"reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Psr\\SimpleCache\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "PHP-FIG",
|
||||
"homepage": "http://www.php-fig.org/"
|
||||
}
|
||||
],
|
||||
"description": "Common interfaces for simple caching",
|
||||
"keywords": [
|
||||
"cache",
|
||||
"caching",
|
||||
"psr",
|
||||
"psr-16",
|
||||
"simple-cache"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/php-fig/simple-cache/tree/master"
|
||||
},
|
||||
"time": "2017-10-23T01:57:42+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-mbstring",
|
||||
"version": "v1.23.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
||||
"reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6",
|
||||
"reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.1"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-mbstring": "For best performance"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.23-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Mbstring\\": ""
|
||||
},
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicolas Grekas",
|
||||
"email": "p@tchwork.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony polyfill for the Mbstring extension",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"compatibility",
|
||||
"mbstring",
|
||||
"polyfill",
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://symfony.com/sponsor",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/fabpot",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-05-27T12:26:48+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [],
|
||||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": [],
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": [],
|
||||
"platform-dev": [],
|
||||
"plugin-api-version": "2.2.0"
|
||||
}
|
||||
Reference in New Issue
Block a user