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

Ошибка Undefined index product id - помогите разобраться?


lansmoscow
 Share

Recommended Posts

Добрый гдень, уважаемые.

 

На самом гделе перерыл интернет и никак не могу найти решение. В обещём при добавлении нового товара в OpenCart 1.5.5.1.2 в начно страницы выскакивает ошибка:

--------

"Notice: Undefined index: product_id in /var/www/vqmod/vqcache/vq2-admin_controller_catalog_product.php on line 1530Notice: Undefined index: product_id in /var/www/vqmod/vqcache/vq2-admin_controller_catalog_product.php on line 1539"

-------

 

Немного разобравшись, я понял что ошибку создает некий файл VQmod'a -  vqmod_additional_product_tabs.xml который добавляет дополнительные вкладки(ибы) к товарам. И я ик понимаю что переменной product_id не суещёствует при добавлении товара, ик как при редактировании икой ошибки не выскакивает. Вот и выскакивает ошибка ингдексации переменной product_id.

 

Просьба помочь разобраться с кодом, что подправить подскажите пожалуйси.




$this->data['entry_layout'] = $this->language->get('entry_layout');
]]>
$this->data['entry_feature'] = $this->language->get('entry_feature');
$this->data['entry_additional'] = $this->language->get('entry_additional');
$this->data['tab_additional'] = $this->language->get('tab_additional');
]]>



if (isset($this->request->post['points'])) {
]]>

$this->data['product_additional'] = array();

$related_info = $this->model_catalog_product->getProductAdditional($this->request->get['product_id']);
if($related_info){
$this->data['product_additional'] = array(
'product_id' => $related_info['product_id'],
'features' => $related_info['features'],
'additions' => $related_info['additions']
);
}else{
$this->data['product_additional'] = array(
'product_id' => $this->request->get['product_id'],
'features' =>'',
'additions' => ''
);
}

]]>


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.