when add or edit product appear this error : Notice: Undefined index: stock_status_id in /home/linkysoft/public_html/demo.linkysoft.com/m3rad/admin/model/catalog/product.php on line 138Warning: Cannot modify header information - headers already sent by (output started at /home/linkysoft/public_html/demo.linkysoft.com/m3rad/admin/controller/startup/error.php:34) in /home/linkysoft/public_html/demo.linkysoft.com/storage/modification/system/library/response.php on line 36
but it add or edit suceessfully when return to product ??
but it add or edit suceessfully when return to product ??
you do actually have an issue here as admin/model/catalog/product.php on line 138 is the product update query and in that query
index stock_status_id should not be undefined.
Code: Select all
stock_status_id = '" . (int)$data['stock_status_id']
Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces
“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.
I also have the same problem, OC 3.0.2.0,
Notice: Undefined index: stock_status_id in /home/smarteye/public_html/galaxysecurity.com/storage/modification/admin/model/catalog/product.php on line 164Notice: Undefined index: stock_statuses in /home/smarteye/public_html/galaxysecurity.com/storage/modification/admin/controller/localisation/stock_status.php on line 213Warning: Invalid argument supplied for foreach() in /home/smarteye/public_html/galaxysecurity.com/storage/modification/admin/controller/localisation/stock_status.php on line 213Warning: Cannot modify header information - headers already sent by (output started at /home/smarteye/public_html/galaxysecurity.com/admin/controller/startup/error.php:34) in /home/smarteye/public_html/galaxysecurity.com/storage/modification/system/library/response.php on line 42
code line 164 :
public function editProduct($product_id, $data) {
$this->db->query("UPDATE " . DB_PREFIX . "product SET model = '" . $this->db->escape($data['model']) . "', sku = '" . $this->db->escape($data['sku']) . "', upc = '" . $this->db->escape($data['upc']) . "', ean = '" . $this->db->escape($data['ean']) . "', jan = '" . $this->db->escape($data['jan']) . "', isbn = '" . $this->db->escape($data['isbn']) . "', mpn = '" . $this->db->escape($data['mpn']) . "', location = '" . $this->db->escape($data['location']) . "', quantity = '" . (int)$data['quantity'] . "', minimum = '" . (int)$data['minimum'] . "', subtract = '" . (int)$data['subtract'] . "', stock_status_id = '" . (int)$data['stock_status_id'] . "', date_available = '" . $this->db->escape($data['date_available']) . "', manufacturer_id = '" . (int)$data['manufacturer_id'] . "', shipping = '" . (int)$data['shipping'] . "', price = '" . (float)$data['price'] . "', points = '" . (int)$data['points'] . "', weight = '" . (float)$data['weight'] . "', weight_class_id = '" . (int)$data['weight_class_id'] . "', length = '" . (float)$data['length'] . "', width = '" . (float)$data['width'] . "', height = '" . (float)$data['height'] . "', length_class_id = '" . (int)$data['length_class_id'] . "', status = '" . (int)$data['status'] . "', tax_class_id = '" . (int)$data['tax_class_id'] . "', sort_order = '" . (int)$data['sort_order'] . "', date_modified = NOW() WHERE product_id = '" . (int)$product_id . "'");
Notice: Undefined index: stock_status_id in /home/smarteye/public_html/galaxysecurity.com/storage/modification/admin/model/catalog/product.php on line 164Notice: Undefined index: stock_statuses in /home/smarteye/public_html/galaxysecurity.com/storage/modification/admin/controller/localisation/stock_status.php on line 213Warning: Invalid argument supplied for foreach() in /home/smarteye/public_html/galaxysecurity.com/storage/modification/admin/controller/localisation/stock_status.php on line 213Warning: Cannot modify header information - headers already sent by (output started at /home/smarteye/public_html/galaxysecurity.com/admin/controller/startup/error.php:34) in /home/smarteye/public_html/galaxysecurity.com/storage/modification/system/library/response.php on line 42
code line 164 :
public function editProduct($product_id, $data) {
$this->db->query("UPDATE " . DB_PREFIX . "product SET model = '" . $this->db->escape($data['model']) . "', sku = '" . $this->db->escape($data['sku']) . "', upc = '" . $this->db->escape($data['upc']) . "', ean = '" . $this->db->escape($data['ean']) . "', jan = '" . $this->db->escape($data['jan']) . "', isbn = '" . $this->db->escape($data['isbn']) . "', mpn = '" . $this->db->escape($data['mpn']) . "', location = '" . $this->db->escape($data['location']) . "', quantity = '" . (int)$data['quantity'] . "', minimum = '" . (int)$data['minimum'] . "', subtract = '" . (int)$data['subtract'] . "', stock_status_id = '" . (int)$data['stock_status_id'] . "', date_available = '" . $this->db->escape($data['date_available']) . "', manufacturer_id = '" . (int)$data['manufacturer_id'] . "', shipping = '" . (int)$data['shipping'] . "', price = '" . (float)$data['price'] . "', points = '" . (int)$data['points'] . "', weight = '" . (float)$data['weight'] . "', weight_class_id = '" . (int)$data['weight_class_id'] . "', length = '" . (float)$data['length'] . "', width = '" . (float)$data['width'] . "', height = '" . (float)$data['height'] . "', length_class_id = '" . (int)$data['length_class_id'] . "', status = '" . (int)$data['status'] . "', tax_class_id = '" . (int)$data['tax_class_id'] . "', sort_order = '" . (int)$data['sort_order'] . "', date_modified = NOW() WHERE product_id = '" . (int)$product_id . "'");
It will be caused by an extension that is modifying the product editor.
Also you need make sure display errors in set to off in all 3 places. Your PHP settings, in system/config/default.php and in the settings. Not only can this cause minor notices and warnings to cause bigger errors, it can also be a security risk.
Also you need make sure display errors in set to off in all 3 places. Your PHP settings, in system/config/default.php and in the settings. Not only can this cause minor notices and warnings to cause bigger errors, it can also be a security risk.
Could you specify where exactly in the code I need to change to make the error notify shut off??
1. In your PHP settings make sure display_errors is set to Off. Use phpinfo() to check. It should be off by default, but there are lots of rubbish hosts out there.developer123123 wrote: ↑Wed Dec 08, 2021 5:35 amCould you specify where exactly in the code I need to change to make the error notify shut off??
2. In system/config/default.php set error_display to false.
3. In your OpenCart Setting on the server tab set Display Errors to No.
Well, just disabling the error output is not "solved" (in my opinion).developer123123 wrote: ↑Thu Dec 09, 2021 12:05 amthanks, it solved.
after turn of all display error to false
Just hiding the errors.
It would be much better if you really solve them by eleminating what it's causing.
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
Who is online
Users browsing this forum: niagato and 651 guests