cancel
Showing results for 
Search instead for 
Did you mean: 

ISS integration

ISS integration

 

hello
 
I’ve got to connect to ISS to pol the products stocks for each time a new person loads the product.
The connection cod works grate but when I put it inside Magento files the product description page lodes blank
 
<?php 

$_product = $block->getProduct();
$id_neom=$_product->getData('idneom');
    if($id_neom){
	$wsdl = 'http://x.x.x.x:xxx/InterfacesWS/IInterfacesBO3.asmx?WSDL';
	$trace = true;
	$exceptions = false;
	$client = new SoapClient($wsdl, array('trace' => $trace,'exceptions' => $exceptions));
	  $xml_array = array();
	 ....
	$clientToken = $client->LogIn($xml_array)->LogInResult;
	unset($xml_array);
	$xml_array = array();
	$xml_array['ClientToken'] = $clientToken;
	$xml_array['pstrEntitate'] = 'Stoc';
	$xml_array['pstrFiltersAsXML'] = 

	'<Filters><Filter>
		<Name>ID_NomGeneral</Name>
		<Values><Value>'.$id_neom.'</Value></Values>
		</Filter><Filter>
		<Name>Gestiune</Name>
		<Values><Value>1</Value></Values>
	</Filter></Filters>';

	$response = $client->Export($xml_array)->ExportResult;

  echo $response ;				

	$xml_array = array();
	$xml_array['ClientToken'] = $clientToken;
	$response = $client->LogOut($xml_array)->LogOutResult;


	}

?>

 

1 REPLY

Re: ISS integration

Hi @adrian_alin,

 

If you're getting a blank page is probably you're getting an error 500.

Please take a look to your server error log (also the Magento logs could help you to find the error).

--
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution"