在opencart 2.0.3.1中添加许多产品选项时出现500内部服务器错误

时间:2016-03-16 21:44:04

标签: php opencart internal-server-error

请帮助我们,我只是一个开放式新手,我现在有一个错误。

当我在opencart 2.0.3.1管理面板的产品页面中保存许多选项时,我收到500内部服务器错误。当我查看错误日志时,我得到了这一行。

2016-03-16 19:03:34 - PHP Notice:  Undefined index: points in W:\vhosts\contax4u.com.au\httpdocs\admin\model\catalog\product.php on line 131
2016-03-16 19:03:34 - PHP Notice:  Undefined index: points in W:\vhosts\contax4u.com.au\httpdocs\admin\model\catalog\product.php on line 175
2016-03-16 19:03:34 - PHP Notice:  Undefined index: weight in W:\vhosts\contax4u.com.au\httpdocs\admin\model\catalog\product.php on line 175
2016-03-16 19:03:34 - PHP Notice:  Undefined index: weight_prefix in W:\vhosts\contax4u.com.au\httpdocs\admin\model\catalog\product.php on line 175

错误表明这些行

第131行:

$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'] . "',product_type = '" . (int)$data['product_type'] . "', date_modified = NOW() WHERE product_id = '" . (int)$product_id . "'");

第175行:

foreach ($product_option['product_option_value'] as $product_option_value) {
                        $this->db->query("INSERT INTO " . DB_PREFIX . "product_option_value SET product_option_value_id = '" . (int)$product_option_value['product_option_value_id'] . "', product_option_id = '" . (int)$product_option_id . "', product_id = '" . (int)$product_id . "', option_id = '" . (int)$product_option['option_id'] . "', option_value_id = '" . (int)$product_option_value['option_value_id'] . "', quantity = '" . (int)$product_option_value['quantity'] . "', subtract = '" . (int)$product_option_value['subtract'] . "', price = '" . (float)$product_option_value['price'] . "', price_prefix = '" . $this->db->escape($product_option_value['price_prefix']) . "', points = '" . (int)$product_option_value['points'] . "', points_prefix = '" . $this->db->escape($product_option_value['points_prefix']) . "', weight = '" . (float)$product_option_value['weight'] . "', weight_prefix = '" . $this->db->escape($product_option_value['weight_prefix']) . "'");
                    }

如何解决这个问题,请帮帮我们。

0 个答案:

没有答案