Version Notes
Download this release
Release Info
| Developer | Codisto |
| Extension | codistoconnect |
| Version | 1.90.21 |
| Comparing to | |
| See all releases | |
Code changes from version 1.90.20 to 1.90.21
- app/code/community/Codisto/Sync/Controller/Router.php +66 -61
- app/code/community/Codisto/Sync/Model/Observer.php +3 -1
- app/code/community/Codisto/Sync/Model/Sync.php +10 -8
- app/code/community/Codisto/Sync/controllers/IndexController.php +5 -2
- app/code/community/Codisto/Sync/controllers/SyncController.php +6 -5
- app/code/community/Codisto/Sync/data/codisto_setup/{data-install-1.90.20.php → data-install-1.90.21.php} +0 -0
- app/code/community/Codisto/Sync/etc/config.xml +1 -1
- app/code/community/Codisto/Sync/sql/codisto_setup/{mysql4-install-1.90.20.php → mysql4-install-1.90.21.php} +0 -0
- package.xml +1 -1
app/code/community/Codisto/Sync/Controller/Router.php
CHANGED
|
@@ -165,7 +165,11 @@ class Codisto_Sync_Controller_Router extends Mage_Core_Controller_Varien_Router_
|
|
| 165 |
$storematch = array();
|
| 166 |
|
| 167 |
// get store context from request
|
| 168 |
-
if(
|
|
|
|
|
|
|
|
|
|
|
|
|
| 169 |
{
|
| 170 |
$storeId = (int)$storematch[1];
|
| 171 |
|
|
@@ -176,12 +180,44 @@ class Codisto_Sync_Controller_Router extends Mage_Core_Controller_Varien_Router_
|
|
| 176 |
$storeId = (int)$request->getCookie('storeid', '0');
|
| 177 |
}
|
| 178 |
|
| 179 |
-
|
| 180 |
-
$
|
| 181 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 182 |
|
| 183 |
// register merchant on default admin store if config isn't present
|
| 184 |
-
if(
|
| 185 |
{
|
| 186 |
try
|
| 187 |
{
|
|
@@ -204,84 +240,53 @@ class Codisto_Sync_Controller_Router extends Mage_Core_Controller_Varien_Router_
|
|
| 204 |
|
| 205 |
return true;
|
| 206 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 207 |
}
|
| 208 |
|
| 209 |
-
if($
|
| 210 |
{
|
| 211 |
-
$
|
| 212 |
-
|
| 213 |
-
<p>This is usually easily fixed - please contact <a href="mailto:support@codisto.com">support@codisto.com</a> and our team will help to resolve the issue</p></body></html>');
|
| 214 |
|
| 215 |
-
|
| 216 |
}
|
| 217 |
-
|
| 218 |
-
$MerchantID = Zend_Json::decode($MerchantID);
|
| 219 |
-
if(is_array($MerchantID))
|
| 220 |
{
|
| 221 |
$merchantmatch = array();
|
| 222 |
|
| 223 |
-
if(preg_match('/^\/codisto\/ebaytab\/(\d+)/', $path, $merchantmatch))
|
| 224 |
{
|
| 225 |
$requestedMerchantID = (int)$merchantmatch[1];
|
| 226 |
|
| 227 |
-
if(in_array($requestedMerchantID, $
|
| 228 |
{
|
| 229 |
$MerchantID = $requestedMerchantID;
|
| 230 |
}
|
| 231 |
else
|
| 232 |
{
|
| 233 |
-
$MerchantID = $
|
| 234 |
}
|
| 235 |
|
| 236 |
-
$path = preg_replace('/(^\/codisto\/ebaytab\/)(\d+\/?)/', '$1', $path);
|
| 237 |
-
}
|
| 238 |
-
else if(preg_match('/^\/codisto\/ebaypayment\/(\d+)/', $path, $merchantmatch))
|
| 239 |
-
{
|
| 240 |
-
$requestedMerchantID = (int)$merchantmatch[1];
|
| 241 |
-
if(in_array($requestedMerchantID, $MerchantID))
|
| 242 |
-
{
|
| 243 |
-
$MerchantID = $requestedMerchantID;
|
| 244 |
-
}
|
| 245 |
-
else
|
| 246 |
-
{
|
| 247 |
-
$MerchantID = $MerchantID[0];
|
| 248 |
-
}
|
| 249 |
-
$path = preg_replace('/(^\/codisto\/ebaypayment\/)(\d+\/?)/', '$1', $path);
|
| 250 |
-
}
|
| 251 |
-
else if(preg_match('/^\/codisto\/ebaysale\/(\d+)/', $path, $merchantmatch))
|
| 252 |
-
{
|
| 253 |
-
$requestedMerchantID = (int)$merchantmatch[1];
|
| 254 |
-
if(in_array($requestedMerchantID, $MerchantID))
|
| 255 |
-
{
|
| 256 |
-
$MerchantID = $requestedMerchantID;
|
| 257 |
-
}
|
| 258 |
-
else
|
| 259 |
-
{
|
| 260 |
-
$MerchantID = $MerchantID[0];
|
| 261 |
-
}
|
| 262 |
-
$path = preg_replace('/(^\/codisto\/ebaysale\/)(\d+\/?)/', '$1', $path);
|
| 263 |
-
}
|
| 264 |
-
else if(preg_match('/^\/codisto\/ebayuser\/(\d+)/', $path, $merchantmatch))
|
| 265 |
-
{
|
| 266 |
-
$requestedMerchantID = (int)$merchantmatch[1];
|
| 267 |
-
if(in_array($requestedMerchantID, $MerchantID))
|
| 268 |
-
{
|
| 269 |
-
$MerchantID = $requestedMerchantID;
|
| 270 |
-
}
|
| 271 |
-
else
|
| 272 |
-
{
|
| 273 |
-
$MerchantID = $MerchantID[0];
|
| 274 |
-
}
|
| 275 |
-
$path = preg_replace('/(^\/codisto\/ebayuser\/)(\d+\/?)/', '$1', $path);
|
| 276 |
}
|
| 277 |
else
|
| 278 |
{
|
| 279 |
-
$MerchantID = $
|
| 280 |
}
|
| 281 |
-
|
| 282 |
-
|
| 283 |
-
{
|
| 284 |
-
$path = preg_replace('/(^\/codisto\/ebaytab\/)(\d+\/?)/', '$1', $path);
|
| 285 |
}
|
| 286 |
|
| 287 |
// product page iframe
|
| 165 |
$storematch = array();
|
| 166 |
|
| 167 |
// get store context from request
|
| 168 |
+
if($request->getQuery('storeid'))
|
| 169 |
+
{
|
| 170 |
+
$storeId = (int)$request->getQuery('storeid');
|
| 171 |
+
}
|
| 172 |
+
else if(preg_match('/^\/codisto\/ebaytab\/(\d+)\/\d+/', $path, $storematch))
|
| 173 |
{
|
| 174 |
$storeId = (int)$storematch[1];
|
| 175 |
|
| 180 |
$storeId = (int)$request->getCookie('storeid', '0');
|
| 181 |
}
|
| 182 |
|
| 183 |
+
$Merchants = array();
|
| 184 |
+
$HostKeys = array();
|
| 185 |
+
|
| 186 |
+
$stores = Mage::getModel('core/store')->getCollection();
|
| 187 |
+
foreach ($stores as $store)
|
| 188 |
+
{
|
| 189 |
+
$MerchantList = $store->getConfig('codisto/merchantid');
|
| 190 |
+
|
| 191 |
+
if($MerchantList)
|
| 192 |
+
{
|
| 193 |
+
$MerchantList = Zend_Json::decode($MerchantList);
|
| 194 |
+
if(is_array($MerchantList))
|
| 195 |
+
{
|
| 196 |
+
foreach($MerchantList as $MerchantID)
|
| 197 |
+
{
|
| 198 |
+
if(is_int($MerchantID))
|
| 199 |
+
{
|
| 200 |
+
array_push($Merchants, $MerchantID);
|
| 201 |
+
$HostKeys[$MerchantID] = $store->getConfig('codisto/hostkey');
|
| 202 |
+
}
|
| 203 |
+
}
|
| 204 |
+
}
|
| 205 |
+
else if(is_int($MerchantList))
|
| 206 |
+
{
|
| 207 |
+
$MerchantID = (int)$MerchantList;
|
| 208 |
+
|
| 209 |
+
array_push($Merchants, $MerchantID);
|
| 210 |
+
$HostKeys[$MerchantID] = $store->getConfig('codisto/hostkey');
|
| 211 |
+
}
|
| 212 |
+
}
|
| 213 |
+
}
|
| 214 |
+
|
| 215 |
+
$Merchants = array_unique($Merchants);
|
| 216 |
+
|
| 217 |
+
$MerchantID = null;
|
| 218 |
|
| 219 |
// register merchant on default admin store if config isn't present
|
| 220 |
+
if(empty($Merchants))
|
| 221 |
{
|
| 222 |
try
|
| 223 |
{
|
| 240 |
|
| 241 |
return true;
|
| 242 |
}
|
| 243 |
+
|
| 244 |
+
if($MerchantID == null)
|
| 245 |
+
{
|
| 246 |
+
$response->setBody('<!DOCTYPE html><html><head></head><body><h1>Unable to Register</h1><p>Sorry, we are currently unable to register your Codisto account.
|
| 247 |
+
In most cases, this is due to your server configuration being unable to make outbound communication to the Codisto servers.</p>
|
| 248 |
+
<p>This is usually easily fixed - please contact <a href="mailto:support@codisto.com">support@codisto.com</a> and our team will help to resolve the issue</p></body></html>');
|
| 249 |
+
|
| 250 |
+
return true;
|
| 251 |
+
}
|
| 252 |
+
|
| 253 |
+
$Merchants[0] = $MerchantID;
|
| 254 |
+
$HostKey = Mage::getStoreConfig('codisto/hostkey');
|
| 255 |
+
$HostKeys[$MerchantID] = $HostKey;
|
| 256 |
}
|
| 257 |
|
| 258 |
+
if(count($Merchants) == 1)
|
| 259 |
{
|
| 260 |
+
$MerchantID = $Merchants[0];
|
| 261 |
+
$HostKey = $HostKeys[$MerchantID];
|
|
|
|
| 262 |
|
| 263 |
+
$path = preg_replace('/(^\/codisto\/[^\/]+\/)(\d+\/?)/', '$1', $path);
|
| 264 |
}
|
| 265 |
+
else
|
|
|
|
|
|
|
| 266 |
{
|
| 267 |
$merchantmatch = array();
|
| 268 |
|
| 269 |
+
if(preg_match('/^\/codisto\/(?:ebaytab|ebaypayment|ebaysale|ebayuser)\/(\d+)/', $path, $merchantmatch))
|
| 270 |
{
|
| 271 |
$requestedMerchantID = (int)$merchantmatch[1];
|
| 272 |
|
| 273 |
+
if(in_array($requestedMerchantID, $Merchants))
|
| 274 |
{
|
| 275 |
$MerchantID = $requestedMerchantID;
|
| 276 |
}
|
| 277 |
else
|
| 278 |
{
|
| 279 |
+
$MerchantID = $Merchants[0];
|
| 280 |
}
|
| 281 |
|
| 282 |
+
$path = preg_replace('/(^\/codisto\/(?:ebaytab|ebaypayment|ebaysale|ebayuser)\/)(\d+\/?)/', '$1', $path);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 283 |
}
|
| 284 |
else
|
| 285 |
{
|
| 286 |
+
$MerchantID = $Merchants[0];
|
| 287 |
}
|
| 288 |
+
|
| 289 |
+
$HostKey = $HostKeys[$MerchantID];
|
|
|
|
|
|
|
| 290 |
}
|
| 291 |
|
| 292 |
// product page iframe
|
app/code/community/Codisto/Sync/Model/Observer.php
CHANGED
|
@@ -341,7 +341,9 @@ class Codisto_Sync_Model_Observer
|
|
| 341 |
$order = $payment->getOrder();
|
| 342 |
$orderid = $order->getCodistoOrderid();
|
| 343 |
$storeid = $order->getStoreId();
|
| 344 |
-
$merchantid = $
|
|
|
|
|
|
|
| 345 |
|
| 346 |
if($paypaltransactionid)
|
| 347 |
{
|
| 341 |
$order = $payment->getOrder();
|
| 342 |
$orderid = $order->getCodistoOrderid();
|
| 343 |
$storeid = $order->getStoreId();
|
| 344 |
+
$merchantid = $order->getCodistoMerchantid();
|
| 345 |
+
if(!$merchantid)
|
| 346 |
+
$merchantid = $helper->getMerchantId($storeid);
|
| 347 |
|
| 348 |
if($paypaltransactionid)
|
| 349 |
{
|
app/code/community/Codisto/Sync/Model/Sync.php
CHANGED
|
@@ -552,6 +552,8 @@ class Codisto_Sync_Model_Sync
|
|
| 552 |
$parentProduct->getTypeInstance(true)->processConfiguration($addInfo, $parentProduct, Mage_Catalog_Model_Product_Type_Abstract::PROCESS_MODE_LITE);
|
| 553 |
|
| 554 |
$price = $this->getExTaxPrice($parentProduct, $parentProduct->getFinalPrice(), $store);
|
|
|
|
|
|
|
| 555 |
|
| 556 |
if ($currentProductWebsiteId == 0) {
|
| 557 |
$store->setStoreId($currentStoreId);
|
|
@@ -821,10 +823,10 @@ class Codisto_Sync_Model_Sync
|
|
| 821 |
$checkProductSQL->execute(array($product_id));
|
| 822 |
if($checkProductSQL->fetchColumn())
|
| 823 |
{
|
| 824 |
-
|
| 825 |
return;
|
| 826 |
}
|
| 827 |
-
|
| 828 |
}
|
| 829 |
|
| 830 |
$product = Mage::getModel('catalog/product');
|
|
@@ -2002,22 +2004,22 @@ class Codisto_Sync_Model_Sync
|
|
| 2002 |
$db->exec('BEGIN EXCLUSIVE TRANSACTION');
|
| 2003 |
|
| 2004 |
$qry = $db->query('SELECT CASE WHEN '.
|
| 2005 |
-
'EXISTS(SELECT 1 FROM sqlite_master WHERE type
|
| 2006 |
-
'EXISTS(SELECT 1 FROM ChangeDb.sqlite_master WHERE type
|
| 2007 |
'THEN -1 ELSE 0 END');
|
| 2008 |
$processProductChange = $qry->fetchColumn();
|
| 2009 |
$qry->closeCursor();
|
| 2010 |
|
| 2011 |
$qry = $db->query('SELECT CASE WHEN '.
|
| 2012 |
-
'EXISTS(SELECT 1 FROM sqlite_master WHERE type
|
| 2013 |
-
'EXISTS(SELECT 1 FROM ChangeDb.sqlite_master WHERE type
|
| 2014 |
'THEN -1 ELSE 0 END');
|
| 2015 |
$processCategoryChange = $qry->fetchColumn();
|
| 2016 |
$qry->closeCursor();
|
| 2017 |
|
| 2018 |
$qry = $db->query('SELECT CASE WHEN '.
|
| 2019 |
-
'EXISTS(SELECT 1 FROM sqlite_master WHERE type
|
| 2020 |
-
'EXISTS(SELECT 1 FROM ChangeDb.sqlite_master WHERE type
|
| 2021 |
'THEN -1 ELSE 0 END');
|
| 2022 |
$processOrderChange = $qry->fetchColumn();
|
| 2023 |
$qry->closeCursor();
|
| 552 |
$parentProduct->getTypeInstance(true)->processConfiguration($addInfo, $parentProduct, Mage_Catalog_Model_Product_Type_Abstract::PROCESS_MODE_LITE);
|
| 553 |
|
| 554 |
$price = $this->getExTaxPrice($parentProduct, $parentProduct->getFinalPrice(), $store);
|
| 555 |
+
if(is_null($price))
|
| 556 |
+
$price = 0;
|
| 557 |
|
| 558 |
if ($currentProductWebsiteId == 0) {
|
| 559 |
$store->setStoreId($currentStoreId);
|
| 823 |
$checkProductSQL->execute(array($product_id));
|
| 824 |
if($checkProductSQL->fetchColumn())
|
| 825 |
{
|
| 826 |
+
$checkProductSQL->closeCursor();
|
| 827 |
return;
|
| 828 |
}
|
| 829 |
+
$checkProductSQL->closeCursor();
|
| 830 |
}
|
| 831 |
|
| 832 |
$product = Mage::getModel('catalog/product');
|
| 2004 |
$db->exec('BEGIN EXCLUSIVE TRANSACTION');
|
| 2005 |
|
| 2006 |
$qry = $db->query('SELECT CASE WHEN '.
|
| 2007 |
+
'EXISTS(SELECT 1 FROM sqlite_master WHERE type = \'table\' AND name = \'ProductChange\') AND '.
|
| 2008 |
+
'EXISTS(SELECT 1 FROM ChangeDb.sqlite_master WHERE type = \'table\' AND name = \'ProductChangeProcessed\') '.
|
| 2009 |
'THEN -1 ELSE 0 END');
|
| 2010 |
$processProductChange = $qry->fetchColumn();
|
| 2011 |
$qry->closeCursor();
|
| 2012 |
|
| 2013 |
$qry = $db->query('SELECT CASE WHEN '.
|
| 2014 |
+
'EXISTS(SELECT 1 FROM sqlite_master WHERE type = \'table\' AND name = \'CategoryChange\') AND '.
|
| 2015 |
+
'EXISTS(SELECT 1 FROM ChangeDb.sqlite_master WHERE type = \'table\' AND name = \'CategoryChangeProcessed\') '.
|
| 2016 |
'THEN -1 ELSE 0 END');
|
| 2017 |
$processCategoryChange = $qry->fetchColumn();
|
| 2018 |
$qry->closeCursor();
|
| 2019 |
|
| 2020 |
$qry = $db->query('SELECT CASE WHEN '.
|
| 2021 |
+
'EXISTS(SELECT 1 FROM sqlite_master WHERE type = \'table\' AND name = \'OrderChange\') AND '.
|
| 2022 |
+
'EXISTS(SELECT 1 FROM ChangeDb.sqlite_master WHERE type = \'table\' AND name = \'OrderChangeProcessed\') '.
|
| 2023 |
'THEN -1 ELSE 0 END');
|
| 2024 |
$processOrderChange = $qry->fetchColumn();
|
| 2025 |
$qry->closeCursor();
|
app/code/community/Codisto/Sync/controllers/IndexController.php
CHANGED
|
@@ -677,7 +677,7 @@ class Codisto_Sync_IndexController extends Mage_Core_Controller_Front_Action
|
|
| 677 |
if($weight == 0)
|
| 678 |
$weight = 1;
|
| 679 |
|
| 680 |
-
$weight_total += $weight;
|
| 681 |
|
| 682 |
$orderItem = $quoteConverter->itemToOrderItem($quoteItems[$quoteIdx]);
|
| 683 |
|
|
@@ -1242,7 +1242,7 @@ class Codisto_Sync_IndexController extends Mage_Core_Controller_Front_Action
|
|
| 1242 |
if($weight == 0)
|
| 1243 |
$weight = 1;
|
| 1244 |
|
| 1245 |
-
$weight_total += $weight;
|
| 1246 |
|
| 1247 |
$itemFound = false;
|
| 1248 |
foreach($order->getAllItems() as $item)
|
|
@@ -1983,6 +1983,9 @@ class Codisto_Sync_IndexController extends Mage_Core_Controller_Front_Action
|
|
| 1983 |
$checkoutSession->setData('customer_comment', $customerInstruction);
|
| 1984 |
$checkoutSession->setData('destination_type', 'residence');
|
| 1985 |
|
|
|
|
|
|
|
|
|
|
| 1986 |
$shippingAddress = $quote->getShippingAddress();
|
| 1987 |
$shippingAddress->setSubtotal($ordersubtotal);
|
| 1988 |
$shippingAddress->setBaseSubtotal($ordersubtotal);
|
| 677 |
if($weight == 0)
|
| 678 |
$weight = 1;
|
| 679 |
|
| 680 |
+
$weight_total += $weight * $qty;
|
| 681 |
|
| 682 |
$orderItem = $quoteConverter->itemToOrderItem($quoteItems[$quoteIdx]);
|
| 683 |
|
| 1242 |
if($weight == 0)
|
| 1243 |
$weight = 1;
|
| 1244 |
|
| 1245 |
+
$weight_total += $weight * $qty;
|
| 1246 |
|
| 1247 |
$itemFound = false;
|
| 1248 |
foreach($order->getAllItems() as $item)
|
| 1983 |
$checkoutSession->setData('customer_comment', $customerInstruction);
|
| 1984 |
$checkoutSession->setData('destination_type', 'residence');
|
| 1985 |
|
| 1986 |
+
$customerSession = Mage::getSingleton('customer/session');
|
| 1987 |
+
$customerSession->setCustomer($customer);
|
| 1988 |
+
|
| 1989 |
$shippingAddress = $quote->getShippingAddress();
|
| 1990 |
$shippingAddress->setSubtotal($ordersubtotal);
|
| 1991 |
$shippingAddress->setBaseSubtotal($ordersubtotal);
|
app/code/community/Codisto/Sync/controllers/SyncController.php
CHANGED
|
@@ -198,7 +198,7 @@ class Codisto_Sync_SyncController extends Mage_Core_Controller_Front_Action
|
|
| 198 |
|
| 199 |
$db->exec('BEGIN EXCLUSIVE TRANSACTION');
|
| 200 |
|
| 201 |
-
$qry = $db->query('SELECT CASE WHEN EXISTS(SELECT 1 FROM SyncDb.sqlite_master WHERE type
|
| 202 |
$syncComplete = $qry->fetchColumn();
|
| 203 |
$qry->closeCursor();
|
| 204 |
if(!$syncComplete)
|
|
@@ -208,7 +208,7 @@ class Codisto_Sync_SyncController extends Mage_Core_Controller_Front_Action
|
|
| 208 |
throw new Exception('Attempting to download partial sync db - incremental');
|
| 209 |
}
|
| 210 |
|
| 211 |
-
$qry = $db->query('SELECT CASE WHEN EXISTS(SELECT 1 FROM SyncDb.sqlite_master WHERE type
|
| 212 |
$productChange = $qry->fetchColumn();
|
| 213 |
$qry->closeCursor();
|
| 214 |
if($productChange)
|
|
@@ -238,7 +238,7 @@ class Codisto_Sync_SyncController extends Mage_Core_Controller_Front_Action
|
|
| 238 |
}
|
| 239 |
}
|
| 240 |
|
| 241 |
-
$qry = $db->query('SELECT CASE WHEN EXISTS(SELECT 1 FROM SyncDb.sqlite_master WHERE type
|
| 242 |
$categoryChange = $qry->fetchColumn();
|
| 243 |
$qry->closeCursor();
|
| 244 |
if($categoryChange)
|
|
@@ -254,7 +254,7 @@ class Codisto_Sync_SyncController extends Mage_Core_Controller_Front_Action
|
|
| 254 |
}
|
| 255 |
}
|
| 256 |
|
| 257 |
-
$qry = $db->query('SELECT CASE WHEN EXISTS(SELECT 1 FROM SyncDb.sqlite_master WHERE type
|
| 258 |
$orderChange = $qry->fetchColumn();
|
| 259 |
$qry->closeCursor();
|
| 260 |
if($orderChange)
|
|
@@ -285,7 +285,8 @@ class Codisto_Sync_SyncController extends Mage_Core_Controller_Front_Action
|
|
| 285 |
if(!$request->getQuery('first'))
|
| 286 |
{
|
| 287 |
$db = new PDO('sqlite:' . $syncDb);
|
| 288 |
-
$
|
|
|
|
| 289 |
$syncComplete = $qry->fetchColumn();
|
| 290 |
$qry->closeCursor();
|
| 291 |
}
|
| 198 |
|
| 199 |
$db->exec('BEGIN EXCLUSIVE TRANSACTION');
|
| 200 |
|
| 201 |
+
$qry = $db->query('SELECT CASE WHEN EXISTS(SELECT 1 FROM SyncDb.sqlite_master WHERE type = \'table\' AND name = \'Sync\') THEN -1 ELSE 0 END');
|
| 202 |
$syncComplete = $qry->fetchColumn();
|
| 203 |
$qry->closeCursor();
|
| 204 |
if(!$syncComplete)
|
| 208 |
throw new Exception('Attempting to download partial sync db - incremental');
|
| 209 |
}
|
| 210 |
|
| 211 |
+
$qry = $db->query('SELECT CASE WHEN EXISTS(SELECT 1 FROM SyncDb.sqlite_master WHERE type = \'table\' AND name = \'ProductChange\') THEN -1 ELSE 0 END');
|
| 212 |
$productChange = $qry->fetchColumn();
|
| 213 |
$qry->closeCursor();
|
| 214 |
if($productChange)
|
| 238 |
}
|
| 239 |
}
|
| 240 |
|
| 241 |
+
$qry = $db->query('SELECT CASE WHEN EXISTS(SELECT 1 FROM SyncDb.sqlite_master WHERE type = \'table\' AND name = \'CategoryChange\') THEN -1 ELSE 0 END');
|
| 242 |
$categoryChange = $qry->fetchColumn();
|
| 243 |
$qry->closeCursor();
|
| 244 |
if($categoryChange)
|
| 254 |
}
|
| 255 |
}
|
| 256 |
|
| 257 |
+
$qry = $db->query('SELECT CASE WHEN EXISTS(SELECT 1 FROM SyncDb.sqlite_master WHERE type = \'table\' AND name = \'OrderChange\') THEN -1 ELSE 0 END');
|
| 258 |
$orderChange = $qry->fetchColumn();
|
| 259 |
$qry->closeCursor();
|
| 260 |
if($orderChange)
|
| 285 |
if(!$request->getQuery('first'))
|
| 286 |
{
|
| 287 |
$db = new PDO('sqlite:' . $syncDb);
|
| 288 |
+
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
| 289 |
+
$qry = $db->query('SELECT CASE WHEN EXISTS(SELECT 1 FROM sqlite_master WHERE type = \'table\' AND name = \'Sync\') THEN -1 ELSE 0 END');
|
| 290 |
$syncComplete = $qry->fetchColumn();
|
| 291 |
$qry->closeCursor();
|
| 292 |
}
|
app/code/community/Codisto/Sync/data/codisto_setup/{data-install-1.90.20.php → data-install-1.90.21.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.90.
|
| 27 |
<depends>
|
| 28 |
<Mage_Payment/>
|
| 29 |
</depends>
|
| 23 |
<config>
|
| 24 |
<modules>
|
| 25 |
<Codisto_Sync>
|
| 26 |
+
<version>1.90.21</version>
|
| 27 |
<depends>
|
| 28 |
<Mage_Payment/>
|
| 29 |
</depends>
|
app/code/community/Codisto/Sync/sql/codisto_setup/{mysql4-install-1.90.20.php → mysql4-install-1.90.21.php}
RENAMED
|
File without changes
|
package.xml
CHANGED
|
@@ -1,2 +1,2 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
-
<package><name>codistoconnect</name><version>1.90.
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
+
<package><name>codistoconnect</name><version>1.90.21</version><stability>stable</stability><license>OSL-3.0</license><channel>community</channel><extends></extends><summary>Fastest, Easiest eBay listing</summary><description>CodistoConnect enables you to list on eBay in the simplest way possible with maximum performance</description><notes></notes><authors><author><name>Codisto</name><user>Codisto</user><email>hello@codisto.com</email></author></authors><date>2016-10-31</date><time>17:33:32</time><compatible></compatible><dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies><contents><target name="mage"><dir name="app"><dir name="design"><dir name="ebay"><file name="README" hash="8a3f3351f68ccde9f161cdbe3960392f"/></dir></dir><dir name="code"><dir name="community"><dir name="Codisto"><dir name="Sync"><dir name="Helper"><file name="CmsContent.php" hash="f00b4523d681c60c660089d0de0f2e03"/><file name="Data.php" hash="8a0721d8d2d882c4ba64e9dab9de4fe9"/><file name="Signal.php" hash="998380ec7df67fe41a27475fc7fe7ed2"/></dir><dir name="controllers"><file name="CodistoController.php" hash="eccbf167582d60ae559b7455b9b8e7ea"/><file name="IndexController.php" hash="ae5bda4113d57f5bac9d9a323ccea02a"/><file name="SyncController.php" hash="53b704f555e96f83e125151434dc763f"/></dir><dir name="Controller"><file name="Router.php" hash="9dbb9e0e72e5eb0eda425f450542e4db"/></dir><dir name="Test"><file name="README" hash="8299e52f9198536ff5fd3fb42f4a29d8"/><dir name="Config"><file name="AdminHtml.php" hash="6ee6404e52ed6376ad41b7556f265c32"/><file name="Config.php" hash="2e9023fcbab484d03936394934f44f13"/><dir name="Config"><dir name="expectations"><file name="testCodistoCoreConfig.yaml" hash="4a4e07f62981139ff6eb8a63420cbf0d"/></dir></dir></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="Controller"><file name="Router.php" hash="8afc0dca269dd0977ff6b3ac6802d0ee"/></dir><dir name="Model"><file name="Paymentmethod.php" hash="862365909073ffbba057f6f152933826"/><file name="Sync.php" hash="10a38bbb62260208a8b1529e762b7b75"/></dir></dir><dir name="sql"><dir name="codisto_setup"><file name="mysql4-install-1.90.21.php" hash="f5e7410bdb70ae4c021e3d257ccbf9a9"/></dir></dir><dir name="data"><dir name="codisto_setup"><file name="data-install-1.90.21.php" hash="29334830432cf1a02e4a992b9a42d6c5"/></dir></dir><dir name="Block"><file name="PaymentInfo.php" hash="7aa15fed37766d20d9d5a7d707aff80d"/></dir><dir name="Ebaypayment"><dir name="Model"><file name="Paymentmethod.php" hash="480787461a5b952a739f20a752bffb5d"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="9503ace98df8dfa2f2ec460b30e1053d"/><file name="config.xml" hash="590c004405ca2449fce5e429b3cfb141"/></dir><dir name="Model"><file name="Observer.php" hash="3349b89012cb681a7a61cecbd4a9f7bf"/><file name="Sync.php" hash="ff65f14d0d85f44014a4c2f575145dac"/><dir name="Indexer"><file name="Ebay.php" hash="556b1aabc7c3202f31a2e6c250e7d590"/></dir><dir name="Resource"><dir name="Mysql4"><file name="Setup.php" hash="6a6664ea18d93bcdd0f45530caa56244"/></dir></dir></dir></dir></dir></dir></dir><dir name="etc"><dir name="modules"><file name="Codisto_Sync.xml" hash="a791bc2a9302d085eb29edf77421f525"/></dir></dir></dir></target></contents></package>
|
