Version Notes
Stable release. Compatible with older versions. Feed creation has been optimized to handle larger loads. The option to choose the store is now available. Can retrieve associated products for grouped types.Bug fixes.Has support for PHP V5.2. Quantity script has now been added. Flat Catalog support has been added,
Download this release
Release Info
Developer | Intelligent Reach |
Extension | Intelligent_Reach |
Version | 1.0.34 |
Comparing to | |
See all releases |
Code changes from version 1.0.33 to 1.0.34
- intelligentreach_integration.php +55 -23
- package.xml +4 -4
intelligentreach_integration.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
/** Version 1.0.
|
4 |
ini_set('display_errors', 1);
|
5 |
ini_set('max_execution_time', 1800);
|
6 |
include_once 'app/Mage.php';
|
@@ -160,6 +160,7 @@ class IntelligentReach
|
|
160 |
|
161 |
public function printProducts($args)
|
162 |
{
|
|
|
163 |
$baseUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
|
164 |
|
165 |
$product = Mage::getModel('catalog/product')->load($args['row']['entity_id']);
|
@@ -208,8 +209,24 @@ class IntelligentReach
|
|
208 |
if((isset($parentProduct)) && ($parentProduct->getStatus() == Mage_Catalog_Model_Product_Status::STATUS_DISABLED))
|
209 |
$value = "Disabled";
|
210 |
}
|
211 |
-
|
212 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
213 |
$value = $this->stripInvalidXMLCharacters($value);
|
214 |
|
215 |
$value = "<![CDATA[$value]]>";
|
@@ -220,10 +237,38 @@ class IntelligentReach
|
|
220 |
echo '<' . $key . '>' . $value . '</' . $key . '>';
|
221 |
}
|
222 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
223 |
|
224 |
$categories = $product->getCategoryIds();
|
225 |
if((count($categories) == 0) && isset($parentProduct))
|
226 |
$categories = $parentProduct->getCategoryIds();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
227 |
$category = Mage::getModel('catalog/category')->setStoreId($_GET["storeid"])->load($categories[0]);
|
228 |
|
229 |
/** Old Category Path code: will be deleted in the future. **/
|
@@ -288,24 +333,7 @@ class IntelligentReach
|
|
288 |
echo '<ir_longest_category_path><![CDATA['.$path.']]></ir_longest_category_path>';
|
289 |
/** End of New longest Category Path code **/
|
290 |
|
291 |
-
|
292 |
-
{
|
293 |
-
if(isset($_GET["includeAllParentFields"]))
|
294 |
-
$this->printAllParentFields($parentProduct);
|
295 |
-
else
|
296 |
-
{
|
297 |
-
echo '<ir_parent_entity_id><![CDATA['.$this->stripInvalidXMLCharacters($parentProduct->getId()).']]></ir_parent_entity_id>';
|
298 |
-
echo '<ir_parent_sku><![CDATA['.$this->stripInvalidXMLCharacters($parentProduct->getSku()).']]></ir_parent_sku>';
|
299 |
-
echo '<ir_parent_url><![CDATA[' . $this->stripInvalidXMLCharacters(trim(str_replace('/intelligentreach_integration.php', '', $parentProduct->getProductUrl()))) . ']]></ir_parent_url>';
|
300 |
-
echo '<ir_parent_image><![CDATA['.$this->stripInvalidXMLCharacters($baseUrl . 'media/catalog/product' . $parentProduct->getImage()).']]></ir_parent_image>';
|
301 |
-
}
|
302 |
-
$gallery = $parentProduct->getMediaGallery();
|
303 |
-
if(count($gallery['images']) != 0)
|
304 |
-
{
|
305 |
-
for($i = 0; $i < count($gallery['images']); $i++)
|
306 |
-
echo " <ir_parent_image_".($i + 1)."><![CDATA[". $baseUrl . "media/catalog/product" . $gallery['images'][$i]['file']."]]></ir_parent_image_".($i + 1).">";
|
307 |
-
}
|
308 |
-
}
|
309 |
|
310 |
echo '</product>';
|
311 |
if (is_object($parentIds))
|
@@ -330,8 +358,12 @@ class IntelligentReach
|
|
330 |
|
331 |
if ($key == 'thumbnail')
|
332 |
$value = $baseUrl . "media/catalog/product" . $value;
|
333 |
-
|
334 |
-
$value =
|
|
|
|
|
|
|
|
|
335 |
$value = $this->stripInvalidXMLCharacters($value);
|
336 |
|
337 |
$value = "<![CDATA[$value]]>";
|
1 |
<?php
|
2 |
|
3 |
+
/** Version 1.0.34 Last updated by Kire on 03/02/2016 **/
|
4 |
ini_set('display_errors', 1);
|
5 |
ini_set('max_execution_time', 1800);
|
6 |
include_once 'app/Mage.php';
|
160 |
|
161 |
public function printProducts($args)
|
162 |
{
|
163 |
+
$parentIds = null;
|
164 |
$baseUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
|
165 |
|
166 |
$product = Mage::getModel('catalog/product')->load($args['row']['entity_id']);
|
209 |
if((isset($parentProduct)) && ($parentProduct->getStatus() == Mage_Catalog_Model_Product_Status::STATUS_DISABLED))
|
210 |
$value = "Disabled";
|
211 |
}
|
212 |
+
if(is_array($value))
|
213 |
+
{
|
214 |
+
foreach($value as $vkey => $vvalue)
|
215 |
+
{
|
216 |
+
foreach($vvalue as $pkey => $pvalue)
|
217 |
+
{
|
218 |
+
echo "<".$key."_".$vkey."_".$pkey.">";
|
219 |
+
echo $pvalue;
|
220 |
+
echo "</".$key."_".$vkey."_".$pkey.">";
|
221 |
+
}
|
222 |
+
}
|
223 |
+
continue;
|
224 |
+
}
|
225 |
+
|
226 |
+
if(version_compare(PHP_VERSION, '5.4.0', '>='))
|
227 |
+
$value = htmlentities($value, ENT_COMPAT | ENT_SUBSTITUTE, "UTF-8");
|
228 |
+
else
|
229 |
+
$value = htmlentities($value, ENT_COMPAT, "UTF-8");
|
230 |
$value = $this->stripInvalidXMLCharacters($value);
|
231 |
|
232 |
$value = "<![CDATA[$value]]>";
|
237 |
echo '<' . $key . '>' . $value . '</' . $key . '>';
|
238 |
}
|
239 |
}
|
240 |
+
|
241 |
+
if(isset($parentProduct))
|
242 |
+
{
|
243 |
+
if(isset($_GET["includeAllParentFields"]))
|
244 |
+
$this->printAllParentFields($parentProduct);
|
245 |
+
else
|
246 |
+
{
|
247 |
+
echo '<ir_parent_entity_id><![CDATA['.$this->stripInvalidXMLCharacters($parentProduct->getId()).']]></ir_parent_entity_id>';
|
248 |
+
echo '<ir_parent_sku><![CDATA['.$this->stripInvalidXMLCharacters($parentProduct->getSku()).']]></ir_parent_sku>';
|
249 |
+
echo '<ir_parent_url><![CDATA[' . $this->stripInvalidXMLCharacters(trim(str_replace('/intelligentreach_integration.php', '', $parentProduct->getProductUrl()))) . ']]></ir_parent_url>';
|
250 |
+
echo '<ir_parent_image><![CDATA['.$this->stripInvalidXMLCharacters($baseUrl . 'media/catalog/product' . $parentProduct->getImage()).']]></ir_parent_image>';
|
251 |
+
}
|
252 |
+
$gallery = $parentProduct->getMediaGallery();
|
253 |
+
if(count($gallery['images']) != 0)
|
254 |
+
{
|
255 |
+
for($i = 0; $i < count($gallery['images']); $i++)
|
256 |
+
echo " <ir_parent_image_".($i + 1)."><![CDATA[". $baseUrl . "media/catalog/product" . $gallery['images'][$i]['file']."]]></ir_parent_image_".($i + 1).">";
|
257 |
+
}
|
258 |
+
}
|
259 |
|
260 |
$categories = $product->getCategoryIds();
|
261 |
if((count($categories) == 0) && isset($parentProduct))
|
262 |
$categories = $parentProduct->getCategoryIds();
|
263 |
+
if(count($categories) == 0)
|
264 |
+
{
|
265 |
+
echo '</product>';
|
266 |
+
if (is_object($parentIds))
|
267 |
+
unset($parentIds);
|
268 |
+
|
269 |
+
unset($product);
|
270 |
+
return;
|
271 |
+
}
|
272 |
$category = Mage::getModel('catalog/category')->setStoreId($_GET["storeid"])->load($categories[0]);
|
273 |
|
274 |
/** Old Category Path code: will be deleted in the future. **/
|
333 |
echo '<ir_longest_category_path><![CDATA['.$path.']]></ir_longest_category_path>';
|
334 |
/** End of New longest Category Path code **/
|
335 |
|
336 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
337 |
|
338 |
echo '</product>';
|
339 |
if (is_object($parentIds))
|
358 |
|
359 |
if ($key == 'thumbnail')
|
360 |
$value = $baseUrl . "media/catalog/product" . $value;
|
361 |
+
|
362 |
+
$value = is_array($value) ? implode(" ", $value) : $value;
|
363 |
+
if(version_compare(PHP_VERSION, '5.4.0', '>='))
|
364 |
+
$value = htmlentities($value, ENT_COMPAT | ENT_SUBSTITUTE, "UTF-8");
|
365 |
+
else
|
366 |
+
$value = htmlentities($value, ENT_COMPAT, "UTF-8");
|
367 |
$value = $this->stripInvalidXMLCharacters($value);
|
368 |
|
369 |
$value = "<![CDATA[$value]]>";
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Intelligent_Reach</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/OSL-3.0">OSL</license>
|
7 |
<channel>community</channel>
|
@@ -17,9 +17,9 @@ Intelligent reach also offers advanced insight and trading services; whilst ensu
|
|
17 |
Contact us to arrange a free E-commerce therapy session. Get advice about e-privacy compliance, tag management, analytics or BI implementations and Data quality as well as any key pain points or challenges which are hampering your growth.</description>
|
18 |
<notes>Stable release. Compatible with older versions. Feed creation has been optimized to handle larger loads. The option to choose the store is now available. Can retrieve associated products for grouped types.Bug fixes.Has support for PHP V5.2. Quantity script has now been added. Flat Catalog support has been added,</notes>
|
19 |
<authors><author><name>Intelligent Reach</name><user>IR</user><email>development@intelligentreach.com</email></author></authors>
|
20 |
-
<date>2016-
|
21 |
-
<time>12:
|
22 |
-
<contents><target name="mage"><dir name="."><file name="intelligentreach_integration.php" hash="
|
23 |
<compatible/>
|
24 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
25 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Intelligent_Reach</name>
|
4 |
+
<version>1.0.34</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/OSL-3.0">OSL</license>
|
7 |
<channel>community</channel>
|
17 |
Contact us to arrange a free E-commerce therapy session. Get advice about e-privacy compliance, tag management, analytics or BI implementations and Data quality as well as any key pain points or challenges which are hampering your growth.</description>
|
18 |
<notes>Stable release. Compatible with older versions. Feed creation has been optimized to handle larger loads. The option to choose the store is now available. Can retrieve associated products for grouped types.Bug fixes.Has support for PHP V5.2. Quantity script has now been added. Flat Catalog support has been added,</notes>
|
19 |
<authors><author><name>Intelligent Reach</name><user>IR</user><email>development@intelligentreach.com</email></author></authors>
|
20 |
+
<date>2016-02-03</date>
|
21 |
+
<time>12:37:25</time>
|
22 |
+
<contents><target name="mage"><dir name="."><file name="intelligentreach_integration.php" hash="1c5dc20cc246e3fbe32b083c5bec1928"/><file name="intelligentreach_integration_qty.php" hash="003796f50dcabb7b739332d21b6b44e9"/></dir><dir><dir name="app"><dir name="etc"><dir name="modules"><file name="IntelligentReach_Integration.xml" hash="6cdd19a11572e7073dbb3d746b6b57b6"/><file name="IntelligentReach_AmazonPayment.xml" hash="10faf651f19ea2298217be1a95707b7c"/><file name="IntelligentReach_EbayPayment.xml" hash="eb9acbd1b55da29e10b09981f0b7af8f"/><file name="IntelligentReach_DebenhamsPayment.xml" hash="649e25d5edf93ea84ce0a35240441ecb"/><file name="IntelligentReach_LazadaPayment.xml" hash="74ebd9f7bab6023049128e6de012b52c"/><file name="IntelligentReach_PlayPayment.xml" hash="c711e18f9a79c24bcddce4143ffb6fb6"/><file name="IntelligentReach_RakutenPayment.xml" hash="d70ce1efcf60b29ecc02fcea8df1f7e9"/><file name="IntelligentReach_TradeMePayment.xml" hash="367154d17430c1000c3798454be25dcb"/><file name="IntelligentReach_WestfieldPayment.xml" hash="b0ae5878bb26f86674ce88a50876496b"/><file name="IntelligentReach_IRShipping.xml" hash="f0e21aff453dc0436541117f33d58e74"/></dir></dir><dir name="code"><dir name="local"><dir name="IntelligentReach"><dir name="Integration"><dir name="etc"><file name="config.xml" hash="f8da524206712b6151dc35f5a9200de2"/></dir></dir><dir name="AmazonPayment"><dir name="etc"><file name="config.xml" hash="6720937f2a31c200d9590f0126093f84"/><file name="system.xml" hash="7b236978b8022dc4deda628640ea8689"/></dir><dir name="Helper"><file name="Data.php" hash="2e4ef89b210d0f992cd25b8ef5f4b96e"/></dir><dir name="Model"><file name="Pay.php" hash="4f706307986b9cd0f7cb64f69402cbd5"/></dir></dir><dir name="EbayPayment"><dir name="etc"><file name="config.xml" hash="00022bd8d740dfaa5306928e6a2f55ac"/><file name="system.xml" hash="7246fbf64d238328f74bd6445cc05b29"/></dir><dir name="Helper"><file name="Data.php" hash="0e112e22a4786f3624216628dee796a0"/></dir><dir name="Model"><file name="Pay.php" hash="9195dd4e2dbdeae9170220d78efc9f7b"/></dir></dir><dir name="DebenhamsPayment"><dir name="etc"><file name="config.xml" hash="cac60dae93b3a916934cdd6039a422cd"/><file name="system.xml" hash="fab15158ef26748821326174ca9d91eb"/></dir><dir name="Helper"><file name="Data.php" hash="24e03a8fb06b27480aae4e37f2dc54d8"/></dir><dir name="Model"><file name="Pay.php" hash="45162537d76f8c9e9ccc1ec493c59691"/></dir></dir><dir name="LazadaPayment"><dir name="etc"><file name="config.xml" hash="00811c4e05ea478c644e82ba281a0358"/><file name="system.xml" hash="bf34e8ec60287c727d8221163f436c9c"/></dir><dir name="Helper"><file name="Data.php" hash="7eee4edb781ab93817979b61f314787f"/></dir><dir name="Model"><file name="Pay.php" hash="d52eafb63ab3bad2a390e2f83ebfab6e"/></dir></dir><dir name="PlayPayment"><dir name="etc"><file name="config.xml" hash="f76e7283ddc11c20b5f1441d6e282c3b"/><file name="system.xml" hash="4afb9b545ca22d4043b0606222d734a6"/></dir><dir name="Helper"><file name="Data.php" hash="486d43158da7188608eb07d3c9e45845"/></dir><dir name="Model"><file name="Pay.php" hash="78432762a0020455de623fbe79166045"/></dir></dir><dir name="RakutenPayment"><dir name="etc"><file name="config.xml" hash="9832377a43ca80640a9b26f8c3af961a"/><file name="system.xml" hash="6c19c11b0ad20305d3dd705a0e3f71b9"/></dir><dir name="Helper"><file name="Data.php" hash="87cc7e597d4f70a26911c861358d5695"/></dir><dir name="Model"><file name="Pay.php" hash="b52e5cb4fdb78db91c23bc929e8a70eb"/></dir></dir><dir name="TradeMePayment"><dir name="etc"><file name="config.xml" hash="97a488e63568f142543cf72f8cd988fb"/><file name="system.xml" hash="98893010b7a44f27611421780a09cd6a"/></dir><dir name="Helper"><file name="Data.php" hash="b789a1164f2296882e81d4dced4897a0"/></dir><dir name="Model"><file name="Pay.php" hash="74ba42a1af907d6159fcd8c507d533de"/></dir></dir><dir name="WestfieldPayment"><dir name="etc"><file name="config.xml" hash="1fa26336247ecf5e8d325f76b2547c6e"/><file name="system.xml" hash="de52dce1e16aaa20f62253a4a22f419f"/></dir><dir name="Helper"><file name="Data.php" hash="1d1fcc723fc60d73b004173094a8499e"/></dir><dir name="Model"><file name="Pay.php" hash="d398e69f34d1b7b4105d264eccf01799"/></dir></dir><dir name="IRShipping"><dir name="etc"><file name="api.xml" hash="e6a94fbe12b32f3c7ff52d1a5e0f1641"/><file name="config.xml" hash="d37a1aef5b9ea0e535d1ffbf4a3d1e1f"/><file name="system.xml" hash="a8557991e72769db9da9f2ac90b0b9a5"/><file name="wsdl.xml" hash="ffc7012d4eece41205102d41c8c6b953"/><file name="wsi.xml" hash="77ce37c2b3adb664c3b9f2cc4f901388"/></dir><dir name="Model"><file name="Carrier.php" hash="262539a4ab189952a4e6f914bb0855d8"/><dir name="Cart"><file name="Api.php" hash="9eac552aecc9f4de277b4e15976ea7b5"/><dir name="Api"><file name="V2.php" hash="0f02ea1b2ba3e88d166b0fdaea8444d1"/></dir><dir name="Shipping"><file name="Api.php" hash="75a01931a00a72b74890858f1fc994a9"/><dir name="Api"><file name="V2.php" hash="ca18e89a5d9846423682dedb58e72762"/></dir></dir></dir><dir name="Quote"><dir name="Address"><dir name="Total"><file name="Shipping.php" hash="5f6b34bd1fc668481580010573091e38"/></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="d2d25617c465d0dce4dd52b9eac7649f"/></dir></dir></dir></dir></dir><dir name="design"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="intelligentreach_integration.xml" hash="c45eb729e1e4b5025b25c20ac2723eeb"/></dir><dir name="template"><dir name="intelligentreach_integration"><file name="intelligentreach_integration.phtml" hash="cfcf6e1c2de50fa66258a820fb296775"/><dir name="product"><file name="intelligentreach_integration.phtml" hash="0d1f3ce4a57d977d8955176b01e2f87d"/></dir><dir name="basket"><file name="intelligentreach_integration.phtml" hash="983743acab4cd1c2819ea4fb6eebe0b5"/></dir><dir name="checkout"><dir name="onepage"><file name="intelligentreach_integration.phtml" hash="dfcfe625fadaf06fb3b069cb9257b4cc"/></dir><dir name="multishipping"><file name="intelligentreach_integration.phtml" hash="206d1fe72ab530829ca274fd52e90108"/></dir></dir></dir></dir></dir></dir><dir name="enterprise"><dir name="default"><dir name="layout"><file name="intelligentreach_integration.xml" hash="c45eb729e1e4b5025b25c20ac2723eeb"/></dir><dir name="template"><dir name="intelligentreach_integration"><file name="intelligentreach_integration.phtml" hash="cfcf6e1c2de50fa66258a820fb296775"/><dir name="product"><file name="intelligentreach_integration.phtml" hash="0d1f3ce4a57d977d8955176b01e2f87d"/></dir><dir name="basket"><file name="intelligentreach_integration.phtml" hash="983743acab4cd1c2819ea4fb6eebe0b5"/></dir><dir name="checkout"><dir name="onepage"><file name="intelligentreach_integration.phtml" hash="dfcfe625fadaf06fb3b069cb9257b4cc"/></dir><dir name="multishipping"><file name="intelligentreach_integration.phtml" hash="206d1fe72ab530829ca274fd52e90108"/></dir></dir></dir></dir></dir></dir><dir name="default"><dir name="default"><dir name="layout"><file name="intelligentreach_integration.xml" hash="c45eb729e1e4b5025b25c20ac2723eeb"/></dir><dir name="template"><dir name="intelligentreach_integration"><file name="intelligentreach_integration.phtml" hash="cfcf6e1c2de50fa66258a820fb296775"/><dir name="product"><file name="intelligentreach_integration.phtml" hash="0d1f3ce4a57d977d8955176b01e2f87d"/></dir><dir name="basket"><file name="intelligentreach_integration.phtml" hash="983743acab4cd1c2819ea4fb6eebe0b5"/></dir><dir name="checkout"><dir name="onepage"><file name="intelligentreach_integration.phtml" hash="dfcfe625fadaf06fb3b069cb9257b4cc"/></dir><dir name="multishipping"><file name="intelligentreach_integration.phtml" hash="206d1fe72ab530829ca274fd52e90108"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></dir></target></contents>
|
23 |
<compatible/>
|
24 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
25 |
</package>
|