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

ошибки в админке


Recommended Posts

admin-model-catalog-category

похоже бесхозные WHERE  параметры запросов

public function getCategoryRelated($category_id) {
   $category_related_data = array();
   
   $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_related_wb WHERE product_id = '" . (int)$product_id . "'");
   
   foreach ($query->rows as $result) {
      $product_related_data[] = $result['related_id'];
   }
   
   return $product_related_data;
}

public function getCategoryRelated_article($category_id) {
   $category_related_data = array();
   
   $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "article_related_wb WHERE article_id = '" . (int)$article_id . "'");
   
   foreach ($query->rows as $result) {
      $article_related_data[] = $result['related_id'];
   }
   
   return $article_related_data;
}
Edited by PeletonTver
исправил имя файла
Link to comment
Share on other sites


36 минут назад, PeletonTver сказал:

public function getCategoryRelated($category_id) { $category_related_data = array(); $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_related_wb WHERE product_id = '" . (int)$product_id . "'");

Откуда берется product_id, если функция получает $category_Id? Кто код ваял?

Link to comment
Share on other sites

46 минут назад, PeletonTver сказал:

admin-model-catalog-attribute_group

похоже бесхозные WHERE  параметры запросов

синдартно в движках opencart 3x / ocStore 3020

в файле admin\model\catalog\attribute_group.php

вообещё нет подобных методов getCategoryRelated / getCategoryRelated_article

 

ик что этот вопрос нужно задавать тому кто их добавил

Link to comment
Share on other sites

Да им сразу видно, что запрос игдет к несиндартной иблиэто

product_related_wb

ик что все вопросы нужно задавать автору модуля

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.