<?php echo 'Category Master'; ?> - Chefpro India "get_category_by_id", "Category_id" => $decrypted_par_id ); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $curl_post_data); $curl_response = curl_exec($curl); curl_close($curl); $result_category = json_decode($curl_response, true); } if (isset($decrypted_par_id)) { $service_url = $server_url; $curl = curl_init($service_url); $curl_post_data = array( "function" => "get_category_by_id_ed", "category_id" => $decrypted_par_id ); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $curl_post_data); $curl_response = curl_exec($curl); curl_close($curl); $result_parent_category = json_decode($curl_response, true); } $total_category += count($result_category); $result_category[$total_category]['CategoryId'] = $decrypted_par_id; $result_counter = 0; for ($i = 0; $i < count($result_category); $i++) { $service_url = $server_url; $curl = curl_init($service_url); $curl_post_data = array( "function" => "get_realted_products_by_cat_id", "category_id" => $result_category[$i]['CategoryId'] ); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $curl_post_data); $curl_response = curl_exec($curl); curl_close($curl); $product_result[$i] = json_decode($curl_response, true); $result_counter++; } $categoryArray = $_POST['product_category']; $productTypesArray = $_POST['product_types']; $brandArray = $_POST['brand']; $ind = 0; foreach ($product_result as $key => $val) { foreach ($val as $subkey => $subval) { $numbers[$ind++] = $subval['ProductOfferPrice']; } } $initminPrice = min($numbers); $initmaxPrice = max($numbers); if (!empty($categoryArray)) { for ($i = 0; $i < count($categoryArray); $i++) { if ($decrypted_id != $categoryArray[$i]) { $service_url = $server_url; $curl = curl_init($service_url); $curl_post_data = array( "function" => "get_product_by_category_id", "category_id" => $categoryArray[$i] ); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $curl_post_data); $curl_response = curl_exec($curl); curl_close($curl); $result2 = json_decode($curl_response, true); $product_result = array_merge((array) $product_result, (array) $result2/* , $arrayN, $arrayN */); } } } if (!empty($productTypesArray)) { $result2 = []; foreach ($product_result as $key) { foreach ($key as $id => $value) { if (in_array($value['ProductType'], $productTypesArray)) { //print_r($i); $result2[] = $key[$id]; } else { unset($key[$id]); } } } $result2 = array_values($result2); $product_result[0] = $result2; $result_counter = 1; } if (!empty($brandArray)) { for ($i = 0; $i < count($product_result); $i++) { for ($j = 0; $j < count($brandArray); $j++) { if ($product_result[$i]['ProductManufacturer'] == $brandArray[$j]) { } else { unset($product_result[$i]); } } } $product_result = array_values($product_result); $result_counter = count($product_result); } if (isset($_POST['hdnmin'])) { $j = 0; $x = 0; $z = 0; $result3 = []; foreach ($product_result as $products) { $flag = 0; foreach ($products as $key => $value) { if ($value['ProductOfferPrice'] >= $_POST['hdnmin'] && $value['ProductOfferPrice'] <= $_POST['hdnmax']) { $result3[$z][$j++] = $products[$key]; } } } $product_result = []; $product_result = $result3; $product_result = array_values($product_result); $result_counter = count($product_result); } $service_url = $server_url; $curl = curl_init($service_url); $curl_post_data = array( "function" => "get_category_by_id", "Category_id" => $decrypted_par_id ); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $curl_post_data); $curl_response = curl_exec($curl); curl_close($curl); $result_category = json_decode($curl_response, true); ?> $b['ProductOfferPrice'] ? -1 : 1; }); } function getAddress() { $protocol = $_SERVER['HTTPS'] == 'on' ? 'https' : 'http'; return $protocol . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; } ?>

'; ?>

' . $product_result[$j][$k]['ProductName'] . '

₹ ' . $product_result[$j][$k]['ProductOfferPrice'] . ' ₹ ' . $product_result[$j][$k]['ProductPrice'] . '
'; } } } } else { echo '

There are no products in this category!!!

'; } ?>
'; echo''; echo''; echo''; if(file_exists('img/cahced/product/'.$product_result[$j][$k]['ImageFilePath'])){ echo''; }else{ echo''; } echo''; //echo'
'; } } ?>

Filter By

Product Types
    "get_product_types" ); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $curl_post_data); $curl_response = curl_exec($curl); curl_close($curl); $result_product_types = json_decode($curl_response, true); for ($i = 0; $i < count($result_product_types); $i++) { $flag = 0; for ($j = 0; $j < count($productTypesArray); $j++) { if ($productTypesArray[$j] == $result_product_types[$i]['TypeId']) { echo'
  • ' . $result_product_types[$i]['TypeName'] . '
  • '; $flag = 1; } } if ($flag == 0) { echo'
  • ' . $result_product_types[$i]['TypeName'] . '
  • '; } } ?>
$val) { foreach ($val as $subkey => $subval) { $numbers[$ind++] = $subval['ProductOfferPrice']; } } $minPrice = min($numbers); $maxPrice = max($numbers); ?>
Price

" style="border: 0; color:#7a7a7a;" />

"get_realted_products_by_cat_id", "category_id" => $result_category[$i]['CategoryId'] ); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $curl_post_data); $curl_response = curl_exec($curl); curl_close($curl); $product_result[$i] = json_decode($curl_response, true); $result_counter++; } ?>