建立新的分类 ... 例如 商品档案 编辑分类 ... 设置商品类型: 文档-普通 新建商品:商品档案 因为该分类属于文档类,所以会显示在单独的边框中,而不是一般商品目录列表的边框中。 替换 /admin/includes/modules/update_product.php 文件中的下面这段代码: 代码: 全选 // Data-cleaning to prevent MySQL5 data-type mismatch errors: $tmp_value = zen_db_prepare_input($_POST['products_quantity']); $products_quantity = (!zen_not_null($tmp_value) || $tmp_value=='' || $tmp_value == 0) ? 0 : $tmp_value; $tmp_value = zen_db_prepare_input($_POST['products_price']); $products_price = (!zen_not_null($tmp_value) || $tmp_value=='' || $tmp_value == 0) ? 0 : $tmp_value; $tmp_value = zen_db_prepare_input($_POST['products_weight']); $products_weight = (!zen_not_null($tmp_value) || $tmp_value=='' || $tmp_value == 0) ? 0 : $tmp_value; $tmp_value = zen_db_prepare_input($_POST['products_quantity']); $products_virtual = (!zen_not_null($tmp_value) || $tmp_value=='' || $tmp_value == 0) ? 0 : $tmp_value; $tmp_value = zen_db_prepare_input($_POST['products_virtual']); $products_tax_class_id = (!zen_not_null($tmp_value) || $tmp_value=='' || $tmp_value == 0) ? 0 : $tmp_value; $tmp_value = zen_db_prepare_input($_POST['products_tax_class_id']); $products_priced_by_attribute = (!zen_not_null($tmp_value) || $tmp_value=='' || $tmp_value == 0) ? 0 : $tmp_value; $tmp_value = zen_db_prepare_input($_POST['products_priced_by_attribute']); $product_is_free = (!zen_not_null($tmp_value) || $tmp_value=='' || $tmp_value == 0) ? 0 : $tmp_value; $tmp_value = zen_db_prepare_input($_POST['product_is_free']); $product_is_call = (!zen_not_null($tmp_value) || $tmp_value=='' || $tmp_value == 0) ? 0 : $tmp_value; $tmp_value = zen_db_prepare_input($_POST['product_is_call']); $products_quantity_mixed = (!zen_not_null($tmp_value) || $tmp_value=='' || $tmp_value == 0) ? 0 : $tmp_value; $tmp_value = zen_db_prepare_input($_POST['products_quantity_mixed']); $product_is_always_free_shipping = (!zen_not_null($tmp_value) || $tmp_value=='' || $tmp_value == 0) ? 0 : $tmp_value; $tmp_value = zen_db_prepare_input($_POST['product_is_always_free_shipping']); $products_qty_box_status = (!zen_not_null($tmp_value) || $tmp_value=='' || $tmp_value == 0) ? 0 : $tmp_value; $tmp_value = zen_db_prepare_input($_POST['products_qty_box_status']); $products_quantity_order_max = (!zen_not_null($tmp_value) || $tmp_value=='' || $tmp_value == 0) ? 0 : $tmp_value; $tmp_value = zen_db_prepare_input($_POST['products_quantity_order_max']); $manufacturers_id = (!zen_not_null($tmp_value) || $tmp_value=='' || $tmp_value == 0) ? 0 : $tmp_value; $sql_data_array = array('products_quantity' => $products_quantity, 'products_type' => zen_db_prepare_input($_GET['product_type']), 'products_model' => zen_db_prepare_input($_POST['products_model']), 'products_price' => $products_price, 'products_date_available' => $products_date_available, 'products_weight' => $products_weight, 'products_status' => zen_db_prepare_input($_POST['products_status']), 'products_virtual' => $products_virtual, 'products_tax_class_id' => $products_tax_class_id, 'manufacturers_id' => $manufacturers_id, 'products_quantity_order_min' => zen_db_prepare_input($_POST['products_quantity_order_min']), 'products_quantity_order_units' => zen_db_prepare_input($_POST['products_quantity_order_units']), 'products_priced_by_attribute' => $products_priced_by_attribute, 'product_is_free' => $product_is_free, 'product_is_call' => $product_is_call, 'products_quantity_mixed' => $products_quantity_mixed, 'product_is_always_free_shipping' => $product_is_always_free_shipping, 'products_qty_box_status' => $products_qty_box_status, 'products_quantity_order_max' => $products_quantity_order_max, 'products_sort_order' => (int)zen_db_prepare_input($_POST['products_sort_order']), 'products_discount_type' => zen_db_prepare_input($_POST['products_discount_type']), 'products_discount_type_from' => zen_db_prepare_input($_POST['products_discount_type_from']), 'products_price_sorter' => zen_db_prepare_input($_POST['products_price_sorter']) ); (责任编辑:好模板) |