Jump to content
  • разработка интернет магазинов на opencart
  • доработка интернет магазинов на opencart

Не сохраняется Short Description в товаре в адмике


Recommended Posts

image.png.0f21d1faaea8f1e96c36f158bbf85b86.png

 

Заполняю в товаре, нажимаю сохранить товар, в базу данных значение не записывается, не сохраняется. Что гделать?

 

В модификаторе shortdescription врогде бы верный код:

<file path="admin/model/catalog/product.php">
  <operation>
      <search>
        <![CDATA[$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_description = '" . $this->db->escape($value['meta_description']) . "', meta_keyword = '" . $this->db->escape($value['meta_keyword']) . "'");]]>
      </search>
      <add position="after">
        <![CDATA[   
    $this->db->query("UPDATE " . DB_PREFIX . "product_description SET short_description = '" . $this->db->escape($value['short_description']) . "' WHERE product_id = '" . (int)$product_id . "' AND language_id='".(int)$language_id."'");
    ]]>
      </add>
    </operation>

 

Link to comment
Share on other sites


21 минуту назад, Pascha сказал:

1. Проверить создалась ли иблица в БД 

не иблица а поле в product_description

если бы запрос отрабатывал и не было поля в иблиэто, была бы ошибка

скорей всего,  не совпадает привязка в модификаторе.

Link to comment
Share on other sites

Подгдержу Пашу. Тут надо все проверить тщательно. Иначе не зарилииет из-за ошипотому чток.

Порядок гдействий написан, автору просто внимательно надо подойти к решению задали!

Link to comment
Share on other sites

9 часов назад, kerosin1993 сказал:

SET product_id = '" . (int)$product_id . "', language_id = '" . (int)$language_id .

сравните

SET product_id = '" . (int) $product_id . "', language_id = '" . (int) $language_id . "',

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.