1
0
Fork 0
mirror of synced 2025-04-09 12:02:04 +00:00

fix catalog formation

This commit is contained in:
Sergey 2017-09-01 14:58:19 +03:00
parent eadf35edf5
commit 516b098e05

View file

@ -281,11 +281,13 @@ class MoySkladICMLParser
} else {
$url = '';
}
if ($url != '') {
$image = $this->requestImage($url);
if (!empty($this->options['imgur'])) {
if ($url != '') {
$image = $this->requestImage($url);
}
}
$products[$assortiment['id']] = array(
'id' => !empty($assortiment['product']['externalCode']) ?
($assortiment['product']['externalCode'] . '#' . $assortiment['externalCode']) :
@ -559,6 +561,7 @@ class MoySkladICMLParser
curl_setopt($curlHandler, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curlHandler, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($curlHandler, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curlHandler, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curlHandler, CURLOPT_TIMEOUT, self::TIMEOUT);
curl_setopt($curlHandler, CURLOPT_CONNECTTIMEOUT, 60);
curl_setopt($curlHandler, CURLOPT_HTTPHEADER, array(