Тексты товаров в разные ячейки и 404 страница
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user