From 76a4fa6b707c8df78ac4287dc90c550e07a491db Mon Sep 17 00:00:00 2001 From: Alex Lushpai Date: Fri, 15 Aug 2014 13:44:09 +0400 Subject: [PATCH] fix image & url path --- catalog/export/intarocrm.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/catalog/export/intarocrm.php b/catalog/export/intarocrm.php index 02bd6a7..4367129 100644 --- a/catalog/export/intarocrm.php +++ b/catalog/export/intarocrm.php @@ -70,13 +70,19 @@ class ControllerExportIntarocrm extends Controller { $e->appendChild($this->dd->createElement('price', $offer['price'])); if ($offer['image']) { - $image = $this->model_tool_image->resize($offer['image'], $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height')); - } else { - $image = false; + $e->appendChild( + $this->dd->createElement( + 'picture', + $this->model_tool_image->resize($offer['image'], $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height')) + ) + ); } - $e->appendChild($this->dd->createElement('picture', $image)); - $e->appendChild($this->dd->createElement('url'))->appendChild($this->dd->createTextNode(HTTP_SERVER . 'order-now/')); + $e->appendChild($this->dd->createElement('url'))->appendChild( + $this->dd->createTextNode( + $this->url->link('product/product&product_id=' . $offer['product_id']) + ) + ); $sku = $this->dd->createElement('param'); $sku->setAttribute('name', 'article');