$target_id = tep_db_prepare_input($_POST['target_id']);
     $price_uvp = tep_db_prepare_input($_POST['price_uvp']);
     $price_default = tep_db_prepare_input($_POST['price_default']);
     $price_uvp_sp = $_POST['price_uvp_sp'];
     $price_selling_b2c = isset($_POST['price_selling_b2c']) ? $_POST['price_selling_b2c'] : array();
     $price_selling_b2b = isset($_POST['price_selling_b2b']) ? $_POST['price_selling_b2b'] : array();
     $price_option = $_POST['price_option'];
     $target_id_exp = explode('-', $target_id);
     $product_id = $target_id_exp[2];
     $product = new Product($product_id);
     if (!SERVER_IS_LOCAL) {
         $product->updatePrice($price_uvp, $price_default);
     }
     foreach ($price_selling_b2c as $spid => $price) {
         $show_discount = $price_option[$spid] == 'true';
         $product->updatePriceSelling($spid, $price_uvp_sp[$spid], $price, $show_discount);
     }
     foreach ($price_selling_b2b as $spid => $prices) {
         $activate_discount = $price_option[$spid] == 'true';
         $product->updatePriceSellingB2B($spid, $prices['nd'], $prices['d'], $activate_discount);
     }
     $message = 'Price has been saved successfully';
     $product_table = drawProductPriceTable($product, $message);
     echo utf8_encode($product_table);
     exit;
 } elseif ($_POST['me_action'] == 'PREVIEWPRICE') {
     $price = tep_db_prepare_input($_POST['price']);
     $price_old = tep_db_prepare_input($_POST['price_old']);
     echo utf8_encode(Product::generatePricePreview($price_old, $price));
     exit;
 }