Пример #1
0
     }
 }
 if ($user_price_action != 1) {
     if ($discount_type == 1 || $discount_type == 3) {
         $price -= round($price * $discount_amount / 100, 2);
         $sales_price -= round($sales_price * $discount_amount / 100, 2);
     } elseif ($discount_type == 2) {
         $price -= round($discount_amount, 2);
         $sales_price -= round($discount_amount, 2);
     } elseif ($discount_type == 4) {
         $price -= round(($price - $buying_price) * $discount_amount / 100, 2);
         $sales_price -= round(($sales_price - $buying_price) * $discount_amount / 100, 2);
     }
 }
 $item_price = calculate_price($price, $is_sales, $sales_price);
 $data = show_items_properties($item_id, $item_id, $item_type_id, $item_price, $item_tax_id, $tax_free, "details", $product_params, true, $price_matrix_details);
 $is_properties = $data["params"]["is_any"];
 $properties_ids = $data["params"]["ids"];
 $selected_price = $data["params"]["price"];
 $components_price = $data["params"]["components_price"];
 $components_tax_price = $data["params"]["components_tax_price"];
 $components_points_price = $data["params"]["components_points_price"];
 $components_reward_points = $data["params"]["components_reward_points"];
 $components_reward_credits = $data["params"]["components_reward_credits"];
 if ($new_product_enable) {
     $new_product_date = $db->f("new_product_date");
     $is_new_product = is_new_product($new_product_date);
 } else {
     $is_new_product = false;
 }
 if ($is_new_product) {
Пример #2
0
 }
 if ($user_price_action != 1) {
     if ($discount_type == 1 || $discount_type == 3) {
         $price -= round($price * $discount_amount / 100, 2);
         $sales_price -= round($sales_price * $discount_amount / 100, 2);
     } elseif ($discount_type == 2) {
         $price -= round($discount_amount, 2);
         $sales_price -= round($discount_amount, 2);
     } elseif ($discount_type == 4) {
         $price -= round(($price - $buying_price) * $discount_amount / 100, 2);
         $sales_price -= round(($sales_price - $buying_price) * $discount_amount / 100, 2);
     }
 }
 $item_price = calculate_price($price, $is_sales, $sales_price);
 $parse_template = true;
 $data = show_items_properties($form_id, $item_id, $item_type_id, $item_price, $tax_id, $tax_free, $options_type, $product_params, $parse_template, $price_matrix_list);
 $is_properties = $data["params"]["is_any"];
 $properties_ids = $data["params"]["ids"];
 $selected_price = $data["params"]["price"];
 $components_price = $data["params"]["components_price"];
 $components_tax_price = $data["params"]["components_tax_price"];
 $components_points_price = $data["params"]["components_points_price"];
 $components_reward_points = $data["params"]["components_reward_points"];
 $components_reward_credits = $data["params"]["components_reward_credits"];
 $t->set_var("item_id", $item_id);
 if ($friendly_urls && strlen($friendly_url)) {
     //$t->set_var("product_details_url", htmlspecialchars($friendly_url.$friendly_extension . $details_query));
     $t->set_var("product_details_url", htmlspecialchars($friendly_url . $friendly_extension));
 } else {
     $t->set_var("product_details_url", htmlspecialchars($product_link . $item_id));
 }