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;
}
?>