Version Notes
Release 1.91.3
Download this release
Release Info
| Developer | Codisto |
| Extension | codistoconnect |
| Version | 1.91.3 |
| Comparing to | |
| See all releases | |
Code changes from version 1.91.1 to 1.91.3
- app/code/community/Codisto/Sync/Model/Sync.php +80 -17
- app/code/community/Codisto/Sync/data/codisto_setup/{data-install-1.91.1.php → data-install-1.91.3.php} +0 -0
- app/code/community/Codisto/Sync/etc/config.xml +1 -1
- app/code/community/Codisto/Sync/sql/codisto_setup/{mysql4-install-1.91.1.php → mysql4-install-1.91.3.php} +0 -0
- package.xml +6 -6
app/code/community/Codisto/Sync/Model/Sync.php
CHANGED
|
@@ -1382,36 +1382,99 @@ class Codisto_Sync_Model_Sync
|
|
| 1382 |
}
|
| 1383 |
|
| 1384 |
$hasImage = false;
|
|
|
|
| 1385 |
$product->load('media_gallery');
|
| 1386 |
|
|
|
|
|
|
|
| 1387 |
$primaryImage = isset($productData['image']) ? $productData['image'] : '';
|
| 1388 |
|
| 1389 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1390 |
|
| 1391 |
-
$
|
| 1392 |
|
| 1393 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1394 |
|
| 1395 |
-
if($image['file'] == $primaryImage)
|
| 1396 |
-
{
|
| 1397 |
-
$tag = '';
|
| 1398 |
-
$sequence = 0;
|
| 1399 |
}
|
| 1400 |
-
|
|
|
|
| 1401 |
{
|
| 1402 |
-
$
|
| 1403 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1404 |
$tag = '';
|
| 1405 |
-
|
| 1406 |
-
|
| 1407 |
-
$sequence = 1;
|
| 1408 |
else
|
| 1409 |
-
|
| 1410 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1411 |
|
| 1412 |
-
|
| 1413 |
|
| 1414 |
-
|
|
|
|
| 1415 |
|
| 1416 |
}
|
| 1417 |
|
| 1382 |
}
|
| 1383 |
|
| 1384 |
$hasImage = false;
|
| 1385 |
+
|
| 1386 |
$product->load('media_gallery');
|
| 1387 |
|
| 1388 |
+
$galleryImages = $product->getMediaGalleryImages();
|
| 1389 |
+
|
| 1390 |
$primaryImage = isset($productData['image']) ? $productData['image'] : '';
|
| 1391 |
|
| 1392 |
+
if($primaryImage && $galleryImages->getSize() == 0) {
|
| 1393 |
+
|
| 1394 |
+
if(preg_match('/^https?:\/\//', $primaryImage)) {
|
| 1395 |
+
$imgURL = $primaryImage;
|
| 1396 |
+
} else {
|
| 1397 |
+
$imgURL = $product->getMediaConfig()->getMediaUrl($primaryImage);
|
| 1398 |
+
}
|
| 1399 |
|
| 1400 |
+
$insertImageSQL->execute(array($product_id, $imgURL, '', 0, -1));
|
| 1401 |
|
| 1402 |
+
$hasImage = true;
|
| 1403 |
+
|
| 1404 |
+
} else {
|
| 1405 |
+
|
| 1406 |
+
$imagesVisited = array();
|
| 1407 |
+
|
| 1408 |
+
foreach ($galleryImages as $image) {
|
| 1409 |
+
|
| 1410 |
+
$imagesVisited[$image['file']] = true;
|
| 1411 |
+
|
| 1412 |
+
if(preg_match('/^https?:\/\//', $image['file'])) {
|
| 1413 |
+
$imgURL = $image['file'];
|
| 1414 |
+
} else {
|
| 1415 |
+
$imgURL = $product->getMediaConfig()->getMediaUrl($image['file']);
|
| 1416 |
+
}
|
| 1417 |
+
|
| 1418 |
+
if($image['file'] == $primaryImage)
|
| 1419 |
+
{
|
| 1420 |
+
$tag = '';
|
| 1421 |
+
$sequence = 0;
|
| 1422 |
+
}
|
| 1423 |
+
else
|
| 1424 |
+
{
|
| 1425 |
+
$tag = $image['label'];
|
| 1426 |
+
if(!$tag)
|
| 1427 |
+
$tag = '';
|
| 1428 |
+
$sequence = $image['position'];
|
| 1429 |
+
if(!$sequence)
|
| 1430 |
+
$sequence = 1;
|
| 1431 |
+
else
|
| 1432 |
+
$sequence++;
|
| 1433 |
+
}
|
| 1434 |
+
|
| 1435 |
+
$insertImageSQL->execute(array($product_id, $imgURL, $tag, $sequence, -1));
|
| 1436 |
+
|
| 1437 |
+
$hasImage = true;
|
| 1438 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1439 |
}
|
| 1440 |
+
|
| 1441 |
+
foreach ($product->getMediaGallery('images') as $image)
|
| 1442 |
{
|
| 1443 |
+
if (isset($image['disabled']) && $image['disabled'] == 0) {
|
| 1444 |
+
continue;
|
| 1445 |
+
}
|
| 1446 |
+
|
| 1447 |
+
if(isset($imagesVisited[$image['file']])) {
|
| 1448 |
+
continue;
|
| 1449 |
+
}
|
| 1450 |
+
|
| 1451 |
+
if(preg_match('/^https?:\/\//', $image['file'])) {
|
| 1452 |
+
$imgURL = $image['file'];
|
| 1453 |
+
} else {
|
| 1454 |
+
$imgURL = $product->getMediaConfig()->getMediaUrl($image['file']);
|
| 1455 |
+
}
|
| 1456 |
+
|
| 1457 |
+
if($image['file'] == $primaryImage)
|
| 1458 |
+
{
|
| 1459 |
$tag = '';
|
| 1460 |
+
$sequence = 0;
|
| 1461 |
+
}
|
|
|
|
| 1462 |
else
|
| 1463 |
+
{
|
| 1464 |
+
$tag = $image['label'];
|
| 1465 |
+
if(!$tag)
|
| 1466 |
+
$tag = '';
|
| 1467 |
+
$sequence = $image['position'];
|
| 1468 |
+
if(!$sequence)
|
| 1469 |
+
$sequence = 1;
|
| 1470 |
+
else
|
| 1471 |
+
$sequence++;
|
| 1472 |
+
}
|
| 1473 |
|
| 1474 |
+
$insertImageSQL->execute(array($product_id, $imgURL, $tag, $sequence, 0));
|
| 1475 |
|
| 1476 |
+
$hasImage = true;
|
| 1477 |
+
}
|
| 1478 |
|
| 1479 |
}
|
| 1480 |
|
app/code/community/Codisto/Sync/data/codisto_setup/{data-install-1.91.1.php → data-install-1.91.3.php}
RENAMED
|
File without changes
|
app/code/community/Codisto/Sync/etc/config.xml
CHANGED
|
@@ -23,7 +23,7 @@
|
|
| 23 |
<config>
|
| 24 |
<modules>
|
| 25 |
<Codisto_Sync>
|
| 26 |
-
<version>1.91.
|
| 27 |
<depends>
|
| 28 |
<Mage_Payment/>
|
| 29 |
</depends>
|
| 23 |
<config>
|
| 24 |
<modules>
|
| 25 |
<Codisto_Sync>
|
| 26 |
+
<version>1.91.3</version>
|
| 27 |
<depends>
|
| 28 |
<Mage_Payment/>
|
| 29 |
</depends>
|
app/code/community/Codisto/Sync/sql/codisto_setup/{mysql4-install-1.91.1.php → mysql4-install-1.91.3.php}
RENAMED
|
File without changes
|
package.xml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>codistoconnect</name>
|
| 4 |
-
<version>1.91.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://opensource.org/licenses/Apache-2.0">Apache 2</license>
|
| 7 |
<channel>community</channel>
|
|
@@ -16,11 +16,11 @@ Only simple products are supported.
|
|
| 16 |
You will be required to authorise us to make listings on your behalf. This is easy to do and can be done in 3 steps.
|
| 17 |

|
| 18 |
</description>
|
| 19 |
-
<notes>Release 1.91.
|
| 20 |
<authors><author><name>Codisto</name><user>codistodev</user><email>ebay@codisto.com</email></author></authors>
|
| 21 |
-
<date>2017-
|
| 22 |
-
<time>
|
| 23 |
-
<contents><target name="magecommunity"><dir name="Codisto"><dir name="Sync"><dir name="Block"><file name="PaymentInfo.php" hash="7aa15fed37766d20d9d5a7d707aff80d"/></dir><dir name="Controller"><file name="Router.php" hash="9dbb9e0e72e5eb0eda425f450542e4db"/></dir><dir name="Ebaypayment"><dir name="Model"><file name="Paymentmethod.php" hash="480787461a5b952a739f20a752bffb5d"/></dir></dir><dir name="Helper"><file name="CmsContent.php" hash="f00b4523d681c60c660089d0de0f2e03"/><file name="Data.php" hash="8a0721d8d2d882c4ba64e9dab9de4fe9"/><file name="Signal.php" hash="998380ec7df67fe41a27475fc7fe7ed2"/></dir><dir name="Model"><dir name="Indexer"><file name="Ebay.php" hash="556b1aabc7c3202f31a2e6c250e7d590"/></dir><file name="Observer.php" hash="3349b89012cb681a7a61cecbd4a9f7bf"/><dir name="Resource"><dir name="Mysql4"><file name="Setup.php" hash="6a6664ea18d93bcdd0f45530caa56244"/></dir></dir><file name="Sync.php" hash="
|
| 24 |
<compatible/>
|
| 25 |
-
<dependencies><required><php><min>5.2.0</min><max>
|
| 26 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>codistoconnect</name>
|
| 4 |
+
<version>1.91.3</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://opensource.org/licenses/Apache-2.0">Apache 2</license>
|
| 7 |
<channel>community</channel>
|
| 16 |
You will be required to authorise us to make listings on your behalf. This is easy to do and can be done in 3 steps.
|
| 17 |

|
| 18 |
</description>
|
| 19 |
+
<notes>Release 1.91.3</notes>
|
| 20 |
<authors><author><name>Codisto</name><user>codistodev</user><email>ebay@codisto.com</email></author></authors>
|
| 21 |
+
<date>2017-06-09</date>
|
| 22 |
+
<time>06:46:21</time>
|
| 23 |
+
<contents><target name="magecommunity"><dir name="Codisto"><dir name="Sync"><dir name="Block"><file name="PaymentInfo.php" hash="7aa15fed37766d20d9d5a7d707aff80d"/></dir><dir name="Controller"><file name="Router.php" hash="9dbb9e0e72e5eb0eda425f450542e4db"/></dir><dir name="Ebaypayment"><dir name="Model"><file name="Paymentmethod.php" hash="480787461a5b952a739f20a752bffb5d"/></dir></dir><dir name="Helper"><file name="CmsContent.php" hash="f00b4523d681c60c660089d0de0f2e03"/><file name="Data.php" hash="8a0721d8d2d882c4ba64e9dab9de4fe9"/><file name="Signal.php" hash="998380ec7df67fe41a27475fc7fe7ed2"/></dir><dir name="Model"><dir name="Indexer"><file name="Ebay.php" hash="556b1aabc7c3202f31a2e6c250e7d590"/></dir><file name="Observer.php" hash="3349b89012cb681a7a61cecbd4a9f7bf"/><dir name="Resource"><dir name="Mysql4"><file name="Setup.php" hash="6a6664ea18d93bcdd0f45530caa56244"/></dir></dir><file name="Sync.php" hash="c79d825d8e3f755af2e79ee347fa94ec"/></dir><dir name="Test"><dir name="Config"><file name="AdminHtml.php" hash="6ee6404e52ed6376ad41b7556f265c32"/><dir name="Config"><dir name="expectations"><file name="testCodistoCoreConfig.yaml" hash="4a4e07f62981139ff6eb8a63420cbf0d"/></dir></dir><file name="Config.php" hash="2e9023fcbab484d03936394934f44f13"/></dir><dir name="Controller"><file name="Router.php" hash="8afc0dca269dd0977ff6b3ac6802d0ee"/></dir><dir name="Controllers"><file name="CodistoController.php" hash="a2be4faeac73ff1847c0d7dc4fbdc0e0"/><file name="IndexController.php" hash="f7252fae8d2f7b67397ae56524db49d1"/><file name="SyncController.php" hash="33436e4935631488073765d723a82ff7"/></dir><dir name="Model"><file name="Paymentmethod.php" hash="862365909073ffbba057f6f152933826"/><file name="Sync.php" hash="10a38bbb62260208a8b1529e762b7b75"/></dir><file name="README" hash="8299e52f9198536ff5fd3fb42f4a29d8"/></dir><dir name="controllers"><file name="CodistoController.php" hash="eccbf167582d60ae559b7455b9b8e7ea"/><file name="IndexController.php" hash="74bd637544cee0014d70665ea54b4e24"/><file name="IndexController.php.save" hash="24cc504720034f8c02ad9b889676abd0"/><file name="SyncController.php" hash="34561518a75844c480722129c780dfdf"/></dir><dir name="data"><dir name="codisto_setup"><file name="data-install-1.91.3.php" hash="29334830432cf1a02e4a992b9a42d6c5"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="a1225ee5783c6cd41408e9c26091d1a2"/><file name="config.xml" hash="0eb54123f5106dbcc90ca0712b1e9245"/></dir><dir name="sql"><dir name="codisto_setup"><file name="mysql4-install-1.91.3.php" hash="f5e7410bdb70ae4c021e3d257ccbf9a9"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Codisto_Sync.xml" hash="a791bc2a9302d085eb29edf77421f525"/></dir></target></contents>
|
| 24 |
<compatible/>
|
| 25 |
+
<dependencies><required><php><min>5.2.0</min><max>8.0.0</max></php></required></dependencies>
|
| 26 |
</package>
|
