<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script src="https://staging.kinsta.cloud/wp-content/plugins/mango-supplier/scripts/jquery.fileDownload.js"></script>


<script>

	function selectResults(type)
	{
		var keyword = jQuery("#searchBox").val();

		var chk_industry = [];
		var chk_process = [];
		var chk_country = [];
		var chk_volume = [];
		var chk_variety = [];

		//--> Push Values into array
		jQuery(".chk_industry:checked").each(function() {
			chk_industry.push(this.value);
		});

		jQuery(".chk_process:checked").each(function() {
			chk_process.push(this.value);
		});

		jQuery(".chk_country:checked").each(function() {
			chk_country.push(this.value);
		});

		jQuery(".chk_volume:checked").each(function() {
			chk_volume.push(this.value);
		});

		jQuery(".chk_variety:checked").each(function() {
			chk_variety.push(this.value);
		});

		var find_suppliers_type = jQuery('#find_suppliers_type').val() || type;

	  jQuery.ajax({
			type: "POST",
			data: 'mode=Suppliers&keyword='+keyword+'&industry='+chk_industry+'&country='+chk_country+'&process='+chk_process+'&volume='+chk_volume+'&variety='+chk_variety+'&find_suppliers_type='+find_suppliers_type+'&'+type ,
			url: 'https://staging.kinsta.cloud/wp-content/plugins/mango-supplier/sp-ajax.php',
		}).done(function( msg ) {
			jQuery("#SupplierSearchResult").css("display", "inline-block");
			jQuery("#SupplierSearchResult").html(msg);
			jQuery("#searchAreaC").css("display", "none");
		});
	}

	function findAllSuppliers()
	{
		jQuery('#find_suppliers_type').val("entire");
		selectResults("entire");
	}

	function DownloadCsv(keyword, countryC, processC, varietyC, industryC, volumeC)
	{
	  jQuery.ajax({
			type: "POST",
			data: 'mode=CSV&keyword='+keyword+'&industry='+industryC+'&country='+countryC+'&process='+processC+'&volume='+volumeC+'&variety='+varietyC,
			url: 'https://staging.kinsta.cloud/wp-content/plugins/mango-supplier/expost-csv.php',
		}).done(function( msg ) {
			jQuery.fileDownload(msg);
		});
	}
	function printDiv()
	{
		var myStyle = '<link rel="stylesheet" href="https://staging.kinsta.cloud/wp-content/plugins/mango-supplier/css/frontend-supplier.css" />';
		var divToPrint=document.getElementById('suppliersC');
		var newWin=window.open('','Print-Window');
		newWin.document.open();
		newWin.document.write('<html><head><link rel="stylesheet" href="https://www.mango.org/wp-content/themes/balloon/assets/css/animate.css?ver=1.0.0"  /><link rel="stylesheet" href="https://www.mango.org/wp-content/themes/balloon/assets/css/balloon.css?ver=1.0.0" /><title>Mango Suppliers</title></head><body onload="window.print()">'+myStyle+divToPrint.innerHTML+'</html>');
		newWin.document.close();
		setTimeout(function(){newWin.close();},10);
	}

</script>

<script type="text/javascript" src="https://staging.kinsta.cloud/wp-content/plugins/mango-supplier/scripts/iframeResizer.contentWindow.min.js"></script>
<script src="https://staging.kinsta.cloud/wp-content/plugins/mango-supplier/scripts/jquery.pajinate.js"></script>
<script src="https://staging.kinsta.cloud/wp-content/plugins/mango-supplier/scripts/suppliers.min.js"></script>
<script src="https://staging.kinsta.cloud/wp-content/plugins/mango-supplier/scripts/csvToArray.js"></script>
<script src="https://staging.kinsta.cloud/wp-content/plugins/mango-supplier/scripts/jlinq.js"></script>
<script src="https://staging.kinsta.cloud/wp-content/plugins/mango-supplier/scripts/angular.min.js"></script>
<link rel="stylesheet" href="https://staging.kinsta.cloud/wp-content/plugins/mango-supplier/css/frontend-supplier.css" />
<style>
	h3 {
	  outline:none;
	}
</style>
<div class="x-column x-sm x-1-1">
	<a href="javascript:void(0);" onclick="findAllSuppliers();" class="view-entire-database">{ view entire database } </a>
    <input type="hidden" name="find_suppliers_type" id="find_suppliers_type" value="" />
</div>

<div id="suppliersC">
<div id="searchAreaC">


<div class="x-column x-sm x-1-1 mr-tp-40"><div class="search-database-heading">Search Database by Keyword</div></div>
<div class="x-column x-sm x-1-1 mr-tp-40"><input type="text" class="txtBox-search" id="searchBox" value="" /> <a href="javascript:void(0);" onclick="selectResults('keyword')"> <img src="https://staging.kinsta.cloud/wp-content/plugins/mango-supplier/images/supplier-search.jpg" width="123" height="39" style="vertical-align: bottom;" /></a> </div>
<div class="x-column x-sm x-1-1 mr-tp-40" id="suppliersOptionC"><div class="search-database-heading">Search Database by options</div></div>

<div id="searchIndicatorC" class="mr-tp-40"><span id="ind1" class="ind">1. Industry</span><span id="ind2" class="ind">2. Country</span><span id="ind3" class="ind">3. Volume</span><span id="ind4" class="ind">4. Mango Variety</span><span id="ind5" class="ind">5. Mango Process</span></div>
        <div id="Q1" class="questions">
          <p>What type of mango Industry member are you searching for?</p>
          <input type="checkbox" class="chk_industry" name="industry" value="All Types" checked>All Types<br>
					<input type="checkbox" class="chk_industry" name="industry" value="7">Wholesaler<br>
					<input type="checkbox" class="chk_industry" name="industry" value="8">U.S. Grower<br>
					<input type="checkbox" class="chk_industry" name="industry" value="9">Packer<br>
					<input type="checkbox" class="chk_industry" name="industry" value="10">Importer (into U.S.)<br>
					<input type="checkbox" class="chk_industry" name="industry" value="11">Grower Outside U.S.<br>
					<input type="checkbox" class="chk_industry" name="industry" value="12">First Handler<br>
					<input type="checkbox" class="chk_industry" name="industry" value="13">Exporter (into U.S.)<br>
					<input type="checkbox" class="chk_industry" name="industry" value="14">Customs Broker<br>
					<input type="checkbox" class="chk_industry" name="industry" value="15">Broker<br>
					<input type="checkbox" class="chk_industry" name="industry" value="16">Processor<br>
					<input type="checkbox" class="chk_industry" name="industry" value="19">Transportation<br>
					<input type="checkbox" class="chk_industry" name="industry" value="20">Educational Institution<br>
					<input type="checkbox" class="chk_industry" name="industry" value="21">Fresh-Cut Processor<br>
					<input type="checkbox" class="chk_industry" name="industry" value="22">Forced Air Ripening/Conditioning<br>
					<input type="checkbox" class="chk_industry" name="industry" value="23">Other<br>

          <br><a href="#" class="btn next">Next ></a>
        </div>

        <div id="Q2" style="display: none;" class="questions">
          <p>Handling mangos from which country?</p>
          <input type="checkbox" class="chk_country" name="country" value="All Countries" checked>All Countries<br>

					<input type="checkbox" class="chk_country" name="country" value="4">Africa<br>
					<input type="checkbox" class="chk_country" name="country" value="5">Australia<br>
					<input type="checkbox" class="chk_country" name="country" value="6">Brazil<br>
					<input type="checkbox" class="chk_country" name="country" value="7">Canada<br>
					<input type="checkbox" class="chk_country" name="country" value="8">Colombia<br>
					<input type="checkbox" class="chk_country" name="country" value="9">Costa Rica<br>
					<input type="checkbox" class="chk_country" name="country" value="10">Dominican Republic<br>
					<input type="checkbox" class="chk_country" name="country" value="11">Ecuador<br>
					<input type="checkbox" class="chk_country" name="country" value="12">El Salvador<br>
					<input type="checkbox" class="chk_country" name="country" value="13">Fiji<br>
					<input type="checkbox" class="chk_country" name="country" value="14">Germany<br>
					<input type="checkbox" class="chk_country" name="country" value="15">Guatemala<br>
					<input type="checkbox" class="chk_country" name="country" value="16">Haiti<br>
					<input type="checkbox" class="chk_country" name="country" value="17">Honduras<br>
					<input type="checkbox" class="chk_country" name="country" value="18">India<br>
					<input type="checkbox" class="chk_country" name="country" value="27">Jamaica<br>
					<input type="checkbox" class="chk_country" name="country" value="19">Mexico<br>
					<input type="checkbox" class="chk_country" name="country" value="20">Nicaragua<br>
					<input type="checkbox" class="chk_country" name="country" value="21">Pakistan<br>
					<input type="checkbox" class="chk_country" name="country" value="22">Peru<br>
					<input type="checkbox" class="chk_country" name="country" value="23">Philippines<br>
					<input type="checkbox" class="chk_country" name="country" value="24">Puerto Rico<br>
					<input type="checkbox" class="chk_country" name="country" value="25">Spain<br>
					<input type="checkbox" class="chk_country" name="country" value="26">USA<br>
					<input type="checkbox" class="chk_country" name="country" value="28">Vietnam<br>
          <br><a href="#" class="btn backBtn back">< Back</a><a href="#" class="btn next">Next ></a>
        </div>


		<div id="Q3" style="display:none;" class="questions">
          <p>Mango volume handled?</p>
          <input type="checkbox" class="chk_volume" name="volume[]" value="All Volume" checked>All Volume<br>
          <input type="checkbox" class="chk_volume" name="volume[]" value="Less than 500,000 lbs.">Less than 500,000 lbs.<br>
          <input type="checkbox" class="chk_volume" name="volume[]" value="500,000 to 39,000,000 lbs.">500,000 to 39,000,000 lbs.<br>
          <input type="checkbox" class="chk_volume" name="volume[]" value="40,000,000 to 60,000,000 lbs.">40,000,000 to 60,000,000 lbs.<br>
          <input type="checkbox" class="chk_volume" name="volume[]" value="Greater than 60,000,000 lbs.">Greater than 60,000,000 lbs.<br><br><a href="#" class="btn backBtn back">< Back</a><a href="#" class="btn next">Next ></a>
        </div>


        <div id="Q4" style="display: none;" class="questions">
          <p>What mango variety?</p>
					<input type="checkbox" class="chk_variety" name="mangovariety[]" value="4" >Ataulfo (Honey)<br>
					<input type="checkbox" class="chk_variety" name="mangovariety[]" value="5" >Haden<br>
					<input type="checkbox" class="chk_variety" name="mangovariety[]" value="6" >Kent<br>
					<input type="checkbox" class="chk_variety" name="mangovariety[]" value="7" >Francis<br>
					<input type="checkbox" class="chk_variety" name="mangovariety[]" value="8" >Keitt<br>
					<input type="checkbox" class="chk_variety" name="mangovariety[]" value="9" >Other<br>
					<input type="checkbox" class="chk_variety" name="mangovariety[]" value="10" >Tommy Atkins<br>
          			<br><a href="#" class="btn backBtn back">< Back</a><a href="#" class="btn next">Next ></a>
        </div>
        <div id="Q5" style="display: none;" class="questions">
          <p>Are you searching for any processed method?</p>
                    			<input type="checkbox" class="chk_process" name="mangoprocess[]" value="5" >Frozen<br>

          			<input type="checkbox" class="chk_process" name="mangoprocess[]" value="6" >Puree<br>

          			<input type="checkbox" class="chk_process" name="mangoprocess[]" value="7" >Juice<br>

          			<input type="checkbox" class="chk_process" name="mangoprocess[]" value="8" >Preserved/Prepared<br>

          			<input type="checkbox" class="chk_process" name="mangoprocess[]" value="9" >Dried<br>

          			<input type="checkbox" class="chk_process" name="mangoprocess[]" value="10" >Freeze dried<br>

          			<br><a href="javascript:void(0);" class="btn backBtn back">< Back</a><a href="#" onclick="selectResults('option')" class="btn search">Search ></a>
        </div>


</div>

<div id="SupplierSearchResult" style="margin-top:40px; display:none">

</div>

</div>

{"id":43917,"date":"2022-01-10T17:28:59","date_gmt":"2022-01-10T17:28:59","guid":{"rendered":"https:\/\/staging.kinsta.cloud\/encontrar-proveedores\/"},"modified":"2022-06-22T09:12:46","modified_gmt":"2022-06-22T13:12:46","slug":"encontrar-proveedores","status":"publish","type":"page","link":"https:\/\/staging.kinsta.cloud\/es\/encontrar-proveedores\/","title":{"rendered":"Encontrar Proveedores"},"content":{"rendered":"<div id=\"cs-content\" class=\"cs-content\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>BUSCAR BASE DE DATOS La cadena de suministro del mango est\u00e1 compuesta por miles de personas trabajadoras de cientos de&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"visual-builder-template.php","meta":{"wprm-recipe-roundup-name":"","wprm-recipe-roundup-description":"","footnotes":""},"_links":{"self":[{"href":"https:\/\/staging.kinsta.cloud\/es\/wp-json\/wp\/v2\/pages\/43917"}],"collection":[{"href":"https:\/\/staging.kinsta.cloud\/es\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/staging.kinsta.cloud\/es\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/staging.kinsta.cloud\/es\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/staging.kinsta.cloud\/es\/wp-json\/wp\/v2\/comments?post=43917"}],"version-history":[{"count":0,"href":"https:\/\/staging.kinsta.cloud\/es\/wp-json\/wp\/v2\/pages\/43917\/revisions"}],"wp:attachment":[{"href":"https:\/\/staging.kinsta.cloud\/es\/wp-json\/wp\/v2\/media?parent=43917"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}