1
0
mirror of synced 2025-02-12 02:09:23 +03:00

fix catalog formation (#25)

This commit is contained in:
Sergey 2017-09-04 11:41:12 +03:00 committed by Alex Lushpai
parent 7bb2b4101f
commit e9e405781d

View File

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