From b64edefd1f02ac283d73ecaec333e22514622fbd Mon Sep 17 00:00:00 2001 From: Dmitriy Belousov Date: Sun, 18 Sep 2016 15:42:32 +0300 Subject: [PATCH] Revert "6.4.3 RELEASE FINAL" This reverts commit 31a52faebf3247c07cf7c7e24540aeff8047d4cf. --- .../Common/Amazon/Listing/Other/View/Grid.php | 2 + .../Common/Amazon/Listing/Search/Grid.php | 6 +- app/code/community/Ess/M2ePro/CHANGELOG | 19 - .../Ess/M2ePro/Helper/Component/Amazon.php | 2 +- .../community/Ess/M2ePro/Helper/Module.php | 2 +- .../Ess/M2ePro/Helper/Module/License.php | 3 +- .../community/Ess/M2ePro/Model/Account.php | 5 - .../Ess/M2ePro/Model/Amazon/Listing/Other.php | 2 - .../Ess/M2ePro/Model/Amazon/Marketplace.php | 20 +- .../Orders/Receive/Requester.php | 53 - .../Synchronization/OtherListings/Title.php | 2 +- .../Synchronization/OtherListings/Update.php | 17 +- .../OtherListings/Update/Responser.php | 16 +- .../Synchronization/Templates/Revise.php | 10 - .../Model/Amazon/Template/Description.php | 6 - .../Buy/Synchronization/Templates/Revise.php | 10 - .../Amazon/Inventory/Get/ItemsRequester.php | 7 +- .../Connector/Ebay/Item/List/Multiple.php | 19 - .../Model/Connector/Ebay/Item/List/Single.php | 18 - .../Connector/Ebay/Item/Relist/Single.php | 3 +- .../Connector/Ebay/Item/Revise/Single.php | 3 +- .../Connector/Ebay/Order/Receive/Items.php | 94 - .../Ebay/Listing/Action/Configurator.php | 125 + .../Product/Action/Request/Shipping.php | 1 - .../Product/Action/Request/Variations.php | 15 - .../Product/Action/Type/List/Request.php | 7 - .../Product/Action/Type/Relist/Response.php | 1 - .../Listing/Product/Action/Type/Response.php | 14 - .../Product/Action/Type/Revise/Response.php | 1 - .../Ebay/Synchronization/Orders/Receive.php | 4 +- .../Ebay/Synchronization/Templates/Relist.php | 13 +- .../community/Ess/M2ePro/Model/Listing.php | 68 +- .../Model/Listing/Product/QtyCalculator.php | 2 +- .../Model/Magento/Product/Variation.php | 6 +- .../Amazon/Template/DescriptionController.php | 1 - .../Wizard/InstallationCommonController.php | 4 +- .../Wizard/InstallationEbayController.php | 4 +- app/code/community/Ess/M2ePro/etc/config.xml | 2 +- .../sql/M2ePro_setup/mysql4-install-6.4.4.php | 3410 ----------------- .../mysql4-upgrade-6.4.3-6.4.4.php | 44 - .../installation/license.phtml | 21 +- .../installation/license.phtml | 21 +- js/M2ePro/Wizard/InstallationCommon.js | 2 +- js/M2ePro/Wizard/InstallationEbay.js | 2 +- 44 files changed, 187 insertions(+), 3900 deletions(-) delete mode 100644 app/code/community/Ess/M2ePro/Model/Connector/Ebay/Order/Receive/Items.php delete mode 100644 app/code/community/Ess/M2ePro/sql/M2ePro_setup/mysql4-install-6.4.4.php delete mode 100644 app/code/community/Ess/M2ePro/sql/M2ePro_setup/mysql4-upgrade-6.4.3-6.4.4.php diff --git a/app/code/community/Ess/M2ePro/Block/Adminhtml/Common/Amazon/Listing/Other/View/Grid.php b/app/code/community/Ess/M2ePro/Block/Adminhtml/Common/Amazon/Listing/Other/View/Grid.php index 78001d5c0..d50c454f6 100644 --- a/app/code/community/Ess/M2ePro/Block/Adminhtml/Common/Amazon/Listing/Other/View/Grid.php +++ b/app/code/community/Ess/M2ePro/Block/Adminhtml/Common/Amazon/Listing/Other/View/Grid.php @@ -280,6 +280,8 @@ public function callbackColumnProductTitle($value, $row, $column, $isExport) { if (is_null($value)) { $value = 'receiving...'; + } elseif ($value == '') { + $value = 'none'; } else { $value = '' . Mage::helper('M2ePro')->escapeHtml($value) . ''; } diff --git a/app/code/community/Ess/M2ePro/Block/Adminhtml/Common/Amazon/Listing/Search/Grid.php b/app/code/community/Ess/M2ePro/Block/Adminhtml/Common/Amazon/Listing/Search/Grid.php index 8e6903393..3b035e20b 100644 --- a/app/code/community/Ess/M2ePro/Block/Adminhtml/Common/Amazon/Listing/Search/Grid.php +++ b/app/code/community/Ess/M2ePro/Block/Adminhtml/Common/Amazon/Listing/Search/Grid.php @@ -458,11 +458,7 @@ public function callbackColumnProductId($value, $row, $column, $isExport) public function callbackColumnProductTitle($value, $row, $column, $isExport) { - if (is_null($value)) { - $value = 'receiving...'; - } else { - $value = '' .Mage::helper('M2ePro')->escapeHtml($value). ''; - } + $value = ''.Mage::helper('M2ePro')->escapeHtml($value).''; if (!is_null($row->getData('listing_id'))) { $urlParams = array(); diff --git a/app/code/community/Ess/M2ePro/CHANGELOG b/app/code/community/Ess/M2ePro/CHANGELOG index 677fb1250..e08bae765 100644 --- a/app/code/community/Ess/M2ePro/CHANGELOG +++ b/app/code/community/Ess/M2ePro/CHANGELOG @@ -1,22 +1,3 @@ -* 6.4.4 (r10771) (18/09/2016) - -* Added: Ability to install module via composer (composer.json file added) -* Added: Ability to install module via modman (modman file added) -* Added: [Amazon] Ability to create new ASIN/ISBN in Canada Marketplace using Description Policy -* Improvement: [eBay] Variation Options label can be renamed now without further errors from eBay Trading API -* Improvement: [eBay] Preventing the eBay Trading API errors if Magento Child Product will be unassigned from Parent -* Improvement: [eBay] Preventing the eBay Trading API errors if Magento Child Product will be totally removed -* Improvement: [eBay] Price will be sent to the eBay each time during Relist action (together with QTY and Variations Data) -* Fix: Quantity could be calculated incorrectly in some special cases (high limited range of cases) -* Fix: [eBay] Items duplicates because User could List Items with "Listed (Hidden)" status manually -* Fix: [eBay] Orders Synchronization could not work correctly sometimes if there are a lot of changes on eBay side -* Fix: [eBay] Wrong QTY could be set for Item after Relist action for items with "Listed (Hidden)" status -* Fix: [eBay] Excluded locations were not removed from eBay when they were removed from Shipping Policy before -* Fix: [eBay] Error "The Product was Listed as a Simple Product as it has limitation for Multi-Variation Items" during list item even if requirements are met -* Fix: [Amazon] Full revise by Description Policy did not work, if change was performed on Definition tab -* Fix: [Amazon] Synchronization was broken due to error "Call to a member function getOptions() on a non-object" -* Fix: [Amazon/Rakuten.com] Product was not revised if their Policy settings were changed and it was in "Revise in progress" state - * 6.4.3 (r10536) (20/04/2016) * Improvement: [eBay] If category of listed Item starts to require UPC/EAN/ISBN identifier, M2E will send full Details to prevent an error diff --git a/app/code/community/Ess/M2ePro/Helper/Component/Amazon.php b/app/code/community/Ess/M2ePro/Helper/Component/Amazon.php index a66ba911c..8836d4b48 100644 --- a/app/code/community/Ess/M2ePro/Helper/Component/Amazon.php +++ b/app/code/community/Ess/M2ePro/Helper/Component/Amazon.php @@ -202,7 +202,7 @@ public function getMarketplacesAvailableForApiCreation() public function getMarketplacesAvailableForAsinCreation() { $collection = $this->getMarketplacesAvailableForApiCreation(); - return $collection->addFieldToFilter('is_new_asin_available', 1); + return $collection->addFieldToFilter('is_asin_available', 1); } //######################################## diff --git a/app/code/community/Ess/M2ePro/Helper/Module.php b/app/code/community/Ess/M2ePro/Helper/Module.php index cacacae40..33251fc36 100644 --- a/app/code/community/Ess/M2ePro/Helper/Module.php +++ b/app/code/community/Ess/M2ePro/Helper/Module.php @@ -72,7 +72,7 @@ public function getVersion() public function getRevision() { - $revision = '10771'; + $revision = '10536'; if ($revision == str_replace('|','#','|REVISION|')) { $revision = (int)exec('svnversion'); diff --git a/app/code/community/Ess/M2ePro/Helper/Module/License.php b/app/code/community/Ess/M2ePro/Helper/Module/License.php index aa0afe0bf..5a1dfcfdb 100644 --- a/app/code/community/Ess/M2ePro/Helper/Module/License.php +++ b/app/code/community/Ess/M2ePro/Helper/Module/License.php @@ -243,7 +243,7 @@ public function getIntervalBeforeExpirationDate($component) //######################################## public function obtainRecord($email = NULL, $firstName = NULL, $lastName = NULL, - $country = NULL, $city = NULL, $postalCode = NULL, $phone = NULL) + $country = NULL, $city = NULL, $postalCode = NULL) { $requestParams = array( 'domain' => Mage::helper('M2ePro/Client')->getDomain(), @@ -253,7 +253,6 @@ public function obtainRecord($email = NULL, $firstName = NULL, $lastName = NULL, !is_null($email) && $requestParams['email'] = $email; !is_null($firstName) && $requestParams['first_name'] = $firstName; !is_null($lastName) && $requestParams['last_name'] = $lastName; - !is_null($phone) && $requestParams['phone'] = $phone; !is_null($country) && $requestParams['country'] = $country; !is_null($city) && $requestParams['city'] = $city; !is_null($postalCode) && $requestParams['postal_code'] = $postalCode; diff --git a/app/code/community/Ess/M2ePro/Model/Account.php b/app/code/community/Ess/M2ePro/Model/Account.php index 5db4aa669..6afea3b85 100644 --- a/app/code/community/Ess/M2ePro/Model/Account.php +++ b/app/code/community/Ess/M2ePro/Model/Account.php @@ -117,11 +117,6 @@ public function getTitle() return $this->getData('title'); } - public function getAdditionalData() - { - return $this->getData('additional_data'); - } - /** * @return bool */ diff --git a/app/code/community/Ess/M2ePro/Model/Amazon/Listing/Other.php b/app/code/community/Ess/M2ePro/Model/Amazon/Listing/Other.php index 4365c621a..ae1c1e282 100644 --- a/app/code/community/Ess/M2ePro/Model/Amazon/Listing/Other.php +++ b/app/code/community/Ess/M2ePro/Model/Amazon/Listing/Other.php @@ -11,8 +11,6 @@ */ class Ess_M2ePro_Model_Amazon_Listing_Other extends Ess_M2ePro_Model_Component_Child_Amazon_Abstract { - const EMPTY_TITLE_PLACEHOLDER = '--'; - //######################################## public function _construct() diff --git a/app/code/community/Ess/M2ePro/Model/Amazon/Marketplace.php b/app/code/community/Ess/M2ePro/Model/Amazon/Marketplace.php index 85ae1a0c9..c24e3169b 100644 --- a/app/code/community/Ess/M2ePro/Model/Amazon/Marketplace.php +++ b/app/code/community/Ess/M2ePro/Model/Amazon/Marketplace.php @@ -62,9 +62,9 @@ public function getDefaultCurrency() /** * @return bool */ - public function isNewAsinAvailable() + public function isAsinAvailable() { - return (bool)$this->getData('is_new_asin_available'); + return (bool)$this->getData('is_asin_available'); } /** @@ -77,6 +77,22 @@ public function isMerchantFulfillmentAvailable() //######################################## + /** + * @return bool + */ + public function isNewAsinAvailable() + { + $newAsinNotImplementedMarketplaces = array( + Ess_M2ePro_Helper_Component_Amazon::MARKETPLACE_CA, + Ess_M2ePro_Helper_Component_Amazon::MARKETPLACE_JP, + Ess_M2ePro_Helper_Component_Amazon::MARKETPLACE_CN, + ); + + return !in_array((int)$this->getId(),$newAsinNotImplementedMarketplaces); + } + + //######################################## + public function save() { Mage::helper('M2ePro/Data_Cache_Permanent')->removeTagValues('marketplace'); diff --git a/app/code/community/Ess/M2ePro/Model/Amazon/Synchronization/Orders/Receive/Requester.php b/app/code/community/Ess/M2ePro/Model/Amazon/Synchronization/Orders/Receive/Requester.php index 81b6c0cff..959a41538 100644 --- a/app/code/community/Ess/M2ePro/Model/Amazon/Synchronization/Orders/Receive/Requester.php +++ b/app/code/community/Ess/M2ePro/Model/Amazon/Synchronization/Orders/Receive/Requester.php @@ -9,10 +9,6 @@ class Ess_M2ePro_Model_Amazon_Synchronization_Orders_Receive_Requester extends Ess_M2ePro_Model_Connector_Amazon_Orders_Get_ItemsRequester { - const TIMEOUT_ERRORS_COUNT_TO_RISE = 3; - const TIMEOUT_RISE_ON_ERROR = 30; - const TIMEOUT_RISE_MAX_VALUE = 1500; - //######################################## /** @@ -42,53 +38,4 @@ public function setProcessingLocks(Ess_M2ePro_Model_Processing_Request $processi } //######################################## - - public function process() - { - $cacheConfig = Mage::helper('M2ePro/Module')->getCacheConfig(); - $cacheConfigGroup = '/amazon/synchronization/orders/receive/timeout'; - - try { - - parent::process(); - - } catch (Ess_M2ePro_Model_Exception_Connection $exception) { - - $data = $exception->getAdditionalData(); - if (!empty($data['curl_error_number']) && $data['curl_error_number'] == CURLE_OPERATION_TIMEOUTED) { - - $fails = (int)$cacheConfig->getGroupValue($cacheConfigGroup, 'fails'); - $fails++; - - $rise = (int)$cacheConfig->getGroupValue($cacheConfigGroup, 'rise'); - $rise += self::TIMEOUT_RISE_ON_ERROR; - - if ($fails >= self::TIMEOUT_ERRORS_COUNT_TO_RISE && $rise <= self::TIMEOUT_RISE_MAX_VALUE) { - - $fails = 0; - $cacheConfig->setGroupValue($cacheConfigGroup, 'rise', $rise); - } - $cacheConfig->setGroupValue($cacheConfigGroup, 'fails', $fails); - } - - throw $exception; - } - - $cacheConfig->setGroupValue($cacheConfigGroup, 'fails', 0); - } - - //######################################## - - protected function getRequestTimeout() - { - $cacheConfig = Mage::helper('M2ePro/Module')->getCacheConfig(); - $cacheConfigGroup = '/amazon/synchronization/orders/receive/timeout'; - - $rise = (int)$cacheConfig->getGroupValue($cacheConfigGroup, 'rise'); - $rise > self::TIMEOUT_RISE_MAX_VALUE && $rise = self::TIMEOUT_RISE_MAX_VALUE; - - return 300 + $rise; - } - - //######################################## } \ No newline at end of file diff --git a/app/code/community/Ess/M2ePro/Model/Amazon/Synchronization/OtherListings/Title.php b/app/code/community/Ess/M2ePro/Model/Amazon/Synchronization/OtherListings/Title.php index 001012e82..ff20ca5dc 100644 --- a/app/code/community/Ess/M2ePro/Model/Amazon/Synchronization/OtherListings/Title.php +++ b/app/code/community/Ess/M2ePro/Model/Amazon/Synchronization/OtherListings/Title.php @@ -220,7 +220,7 @@ private function updateNotReceivedTitles($neededItems, $responseData) { $connWrite->update( $aloTable, - array('title' => Ess_M2ePro_Model_Amazon_Listing_Other::EMPTY_TITLE_PLACEHOLDER), + array('title' => ''), array('general_id = ?' => (string)$generalId) ); } diff --git a/app/code/community/Ess/M2ePro/Model/Amazon/Synchronization/OtherListings/Update.php b/app/code/community/Ess/M2ePro/Model/Amazon/Synchronization/OtherListings/Update.php index fdc434be0..18d3bf4f5 100644 --- a/app/code/community/Ess/M2ePro/Model/Amazon/Synchronization/OtherListings/Update.php +++ b/app/code/community/Ess/M2ePro/Model/Amazon/Synchronization/OtherListings/Update.php @@ -106,18 +106,9 @@ protected function performActions() 'Process Account '.$account->getTitle() ); - $params = array(); - if (!$this->isFullItemsDataAlreadyReceived($account)) { - $params['full_items_data'] = true; - - $additionalData = (array)json_decode($account->getAdditionalData(), true); - $additionalData['is_amazon_other_listings_full_items_data_already_received'] = true; - $account->setSettings('additional_data', $additionalData)->save(); - } - $dispatcherObject = Mage::getModel('M2ePro/Connector_Amazon_Dispatcher'); $connectorObj = $dispatcherObject->getConnector('otherListings', 'update' ,'requester', - $params, $account, 'Ess_M2ePro_Model_Amazon_Synchronization'); + array(), $account, 'Ess_M2ePro_Model_Amazon_Synchronization'); $dispatcherObject->process($connectorObj); @@ -147,11 +138,5 @@ private function isLockedAccount(Ess_M2ePro_Model_Account $account) return $lockItem->isExist(); } - private function isFullItemsDataAlreadyReceived(Ess_M2ePro_Model_Account $account) - { - $additionalData = (array)json_decode($account->getAdditionalData(), true); - return !empty($additionalData['is_amazon_other_listings_full_items_data_already_received']); - } - //######################################## } \ No newline at end of file diff --git a/app/code/community/Ess/M2ePro/Model/Amazon/Synchronization/OtherListings/Update/Responser.php b/app/code/community/Ess/M2ePro/Model/Amazon/Synchronization/OtherListings/Update/Responser.php index 8453b7f78..1badfad1c 100644 --- a/app/code/community/Ess/M2ePro/Model/Amazon/Synchronization/OtherListings/Update/Responser.php +++ b/app/code/community/Ess/M2ePro/Model/Amazon/Synchronization/OtherListings/Update/Responser.php @@ -144,7 +144,7 @@ protected function updateReceivedOtherListings($receivedItems) $newData = array( 'general_id' => (string)$receivedItem['identifiers']['general_id'], - 'title' => (string)$receivedItem['title'], + 'title' => !empty($receivedItem['title']) ? (string)$receivedItem['title'] : NULL, 'online_price' => (float)$receivedItem['price'], 'online_qty' => (int)$receivedItem['qty'], 'is_afn_channel' => (bool)$receivedItem['channel']['is_afn'], @@ -172,10 +172,8 @@ protected function updateReceivedOtherListings($receivedItems) 'status' => (int)$existingItem['status'] ); - if (is_null($receivedItem['title']) || - $receivedItem['title'] == Ess_M2ePro_Model_Amazon_Listing_Other::EMPTY_TITLE_PLACEHOLDER) { - - unset($newData['title'], $existingData['title']); + if (is_null($newData['title']) && !is_null($existingData['title'])) { + $newData['title'] = $existingData['title']; } if ($newData == $existingData) { @@ -302,7 +300,7 @@ protected function createNotExistedOtherListings($receivedItems) 'general_id' => (string)$receivedItem['identifiers']['general_id'], 'sku' => (string)$receivedItem['identifiers']['sku'], - 'title' => $receivedItem['title'], + 'title' => !empty($receivedItem['title']) ? (string)$receivedItem['title'] : NULL, 'online_price' => (float)$receivedItem['price'], 'online_qty' => (int)$receivedItem['qty'], @@ -311,12 +309,6 @@ protected function createNotExistedOtherListings($receivedItems) 'is_isbn_general_id' => (bool)$receivedItem['identifiers']['is_isbn'] ); - if (isset($this->params['full_items_data']) && $this->params['full_items_data'] && - $newData['title'] == Ess_M2ePro_Model_Amazon_Listing_Other::EMPTY_TITLE_PLACEHOLDER) { - - $newData['title'] = NULL; - } - if ((bool)$newData['is_afn_channel']) { $newData['online_qty'] = NULL; $newData['status'] = Ess_M2ePro_Model_Listing_Product::STATUS_UNKNOWN; diff --git a/app/code/community/Ess/M2ePro/Model/Amazon/Synchronization/Templates/Revise.php b/app/code/community/Ess/M2ePro/Model/Amazon/Synchronization/Templates/Revise.php index e564cdb2a..f481ff117 100644 --- a/app/code/community/Ess/M2ePro/Model/Amazon/Synchronization/Templates/Revise.php +++ b/app/code/community/Ess/M2ePro/Model/Amazon/Synchronization/Templates/Revise.php @@ -304,16 +304,6 @@ private function executeNeedSynchronize() $listingProductCollection->addFieldToFilter('synch_status',Ess_M2ePro_Model_Listing_Product::SYNCH_STATUS_NEED); $listingProductCollection->addFieldToFilter('is_variation_parent', 0); - $tag = 'in_action'; - $modelName = Mage::getModel('M2ePro/Listing_Product')->getResourceName(); - - $listingProductCollection->getSelect()->joinLeft( - array('lo' => Mage::getResourceModel('M2ePro/LockedObject')->getMainTable()), - "lo.object_id = main_table.id AND lo.tag='{$tag}' AND lo.model_name = '{$modelName}'", - array() - ); - $listingProductCollection->addFieldToFilter('lo.id', array('null' => true)); - $listingProductCollection->getSelect()->limit(100); /** @var $listingProduct Ess_M2ePro_Model_Listing_Product */ diff --git a/app/code/community/Ess/M2ePro/Model/Amazon/Template/Description.php b/app/code/community/Ess/M2ePro/Model/Amazon/Template/Description.php index 6f709df44..c7f8da66d 100644 --- a/app/code/community/Ess/M2ePro/Model/Amazon/Template/Description.php +++ b/app/code/community/Ess/M2ePro/Model/Amazon/Template/Description.php @@ -158,12 +158,6 @@ public function setMarketplace(Ess_M2ePro_Model_Marketplace $instance) // --------------------------------------- - public function setDefinitionTemplate(Ess_M2ePro_Model_Amazon_Template_Description_Definition $template) - { - $this->descriptionDefinitionModel = $template; - return $this; - } - /** * @return Ess_M2ePro_Model_Amazon_Template_Description_Definition */ diff --git a/app/code/community/Ess/M2ePro/Model/Buy/Synchronization/Templates/Revise.php b/app/code/community/Ess/M2ePro/Model/Buy/Synchronization/Templates/Revise.php index 8c3263e01..30aba532a 100644 --- a/app/code/community/Ess/M2ePro/Model/Buy/Synchronization/Templates/Revise.php +++ b/app/code/community/Ess/M2ePro/Model/Buy/Synchronization/Templates/Revise.php @@ -126,16 +126,6 @@ private function executeNeedSynchronize() $listingProductCollection->addFieldToFilter('status', Ess_M2ePro_Model_Listing_Product::STATUS_LISTED); $listingProductCollection->addFieldToFilter('synch_status',Ess_M2ePro_Model_Listing_Product::SYNCH_STATUS_NEED); - $tag = 'in_action'; - $modelName = Mage::getModel('M2ePro/Listing_Product')->getResourceName(); - - $listingProductCollection->getSelect()->joinLeft( - array('lo' => Mage::getResourceModel('M2ePro/LockedObject')->getMainTable()), - "lo.object_id = main_table.id AND lo.tag='{$tag}' AND lo.model_name = '{$modelName}'", - array() - ); - $listingProductCollection->addFieldToFilter('lo.id', array('null' => true)); - $listingProductCollection->getSelect()->limit(100); /** @var $listingProduct Ess_M2ePro_Model_Listing_Product */ diff --git a/app/code/community/Ess/M2ePro/Model/Connector/Amazon/Inventory/Get/ItemsRequester.php b/app/code/community/Ess/M2ePro/Model/Connector/Amazon/Inventory/Get/ItemsRequester.php index 4271cb94c..510f20978 100644 --- a/app/code/community/Ess/M2ePro/Model/Connector/Amazon/Inventory/Get/ItemsRequester.php +++ b/app/code/community/Ess/M2ePro/Model/Connector/Amazon/Inventory/Get/ItemsRequester.php @@ -32,12 +32,7 @@ protected function getResponserParams() protected function getRequestData() { - $requestData = array(); - if (isset($this->params['full_items_data'])) { - $requestData['full_items_data'] = $this->params['full_items_data']; - } - - return $requestData; + return array(); } //######################################## diff --git a/app/code/community/Ess/M2ePro/Model/Connector/Ebay/Item/List/Multiple.php b/app/code/community/Ess/M2ePro/Model/Connector/Ebay/Item/List/Multiple.php index 9ced3727b..2d287ca94 100644 --- a/app/code/community/Ess/M2ePro/Model/Connector/Ebay/Item/List/Multiple.php +++ b/app/code/community/Ess/M2ePro/Model/Connector/Ebay/Item/List/Multiple.php @@ -75,25 +75,6 @@ protected function filterManualListingsProducts() continue; } - if ($listingProduct->isHidden()) { - - $message = array( - // M2ePro_TRANSLATIONS - // The List action cannot be executed for this Item as it has a Listed (Hidden) status. You have to stop Item manually first to run the List action for it. - parent::MESSAGE_TEXT_KEY => 'The List action cannot be executed for this Item as it has - a Listed (Hidden) status. You have to stop Item manually first - to run the List action for it.', - parent::MESSAGE_TYPE_KEY => parent::MESSAGE_TYPE_ERROR - ); - - $this->getLogger()->logListingProductMessage( - $listingProduct, $message, Ess_M2ePro_Model_Log_Abstract::PRIORITY_MEDIUM - ); - - $this->removeAndUnlockListingProduct($listingProduct); - continue; - } - if (!$listingProduct->getChildObject()->isSetCategoryTemplate()) { $message = array( diff --git a/app/code/community/Ess/M2ePro/Model/Connector/Ebay/Item/List/Single.php b/app/code/community/Ess/M2ePro/Model/Connector/Ebay/Item/List/Single.php index 618ff68b5..89102a99e 100644 --- a/app/code/community/Ess/M2ePro/Model/Connector/Ebay/Item/List/Single.php +++ b/app/code/community/Ess/M2ePro/Model/Connector/Ebay/Item/List/Single.php @@ -68,24 +68,6 @@ protected function filterManualListingProduct() return false; } - if ($this->listingProduct->isHidden()) { - - $message = array( - // M2ePro_TRANSLATIONS - // The List action cannot be executed for this Item as it has a Listed (Hidden) status. You have to stop Item manually first to run the List action for it. - parent::MESSAGE_TEXT_KEY => 'The List action cannot be executed for this Item as it has - a Listed (Hidden) status. You have to stop Item manually first - to run the List action for it.', - parent::MESSAGE_TYPE_KEY => parent::MESSAGE_TYPE_ERROR - ); - - $this->getLogger()->logListingProductMessage( - $this->listingProduct, $message, Ess_M2ePro_Model_Log_Abstract::PRIORITY_MEDIUM - ); - - return false; - } - if (!$this->listingProduct->getChildObject()->isSetCategoryTemplate()) { $message = array( diff --git a/app/code/community/Ess/M2ePro/Model/Connector/Ebay/Item/Relist/Single.php b/app/code/community/Ess/M2ePro/Model/Connector/Ebay/Item/Relist/Single.php index b48772936..fb3ce325a 100644 --- a/app/code/community/Ess/M2ePro/Model/Connector/Ebay/Item/Relist/Single.php +++ b/app/code/community/Ess/M2ePro/Model/Connector/Ebay/Item/Relist/Single.php @@ -96,7 +96,8 @@ public function process() $result = parent::process(); if ($this->params['status_changer'] == Ess_M2ePro_Model_Listing_Product::STATUS_CHANGER_SYNCH && - $this->listingProduct->getActionConfigurator()->isPartialMode() && + ($this->listingProduct->getActionConfigurator()->isPartialMode() || + $this->listingProduct->getActionConfigurator()->isEmptyMode()) && $this->isNewRequiredSpecificNeeded($this->messages)) { $this->processRelistActionWithAllDataAction(); diff --git a/app/code/community/Ess/M2ePro/Model/Connector/Ebay/Item/Revise/Single.php b/app/code/community/Ess/M2ePro/Model/Connector/Ebay/Item/Revise/Single.php index 33c40d97b..42475f55f 100644 --- a/app/code/community/Ess/M2ePro/Model/Connector/Ebay/Item/Revise/Single.php +++ b/app/code/community/Ess/M2ePro/Model/Connector/Ebay/Item/Revise/Single.php @@ -80,7 +80,8 @@ public function process() $result = parent::process(); if ($this->params['status_changer'] == Ess_M2ePro_Model_Listing_Product::STATUS_CHANGER_SYNCH && - $this->listingProduct->getActionConfigurator()->isPartialMode() && + ($this->listingProduct->getActionConfigurator()->isPartialMode() || + $this->listingProduct->getActionConfigurator()->isEmptyMode()) && $this->isNewRequiredSpecificNeeded($this->messages)) { $this->processReviseActionWithAllDataAction(); diff --git a/app/code/community/Ess/M2ePro/Model/Connector/Ebay/Order/Receive/Items.php b/app/code/community/Ess/M2ePro/Model/Connector/Ebay/Order/Receive/Items.php deleted file mode 100644 index 315187636..000000000 --- a/app/code/community/Ess/M2ePro/Model/Connector/Ebay/Order/Receive/Items.php +++ /dev/null @@ -1,94 +0,0 @@ - $this->params['last_update'], - ); - } - - // ######################################## - - public function process() - { - $cacheConfig = Mage::helper('M2ePro/Module')->getCacheConfig(); - $cacheConfigGroup = '/ebay/synchronization/orders/receive/timeout'; - - try { - - $result = parent::process(); - - } catch (Ess_M2ePro_Model_Exception_Connection $exception) { - - $data = $exception->getAdditionalData(); - if (!empty($data['curl_error_number']) && $data['curl_error_number'] == CURLE_OPERATION_TIMEOUTED) { - - $fails = (int)$cacheConfig->getGroupValue($cacheConfigGroup, 'fails'); - $fails++; - - $rise = (int)$cacheConfig->getGroupValue($cacheConfigGroup, 'rise'); - $rise += self::TIMEOUT_RISE_ON_ERROR; - - if ($fails >= self::TIMEOUT_ERRORS_COUNT_TO_RISE && $rise <= self::TIMEOUT_RISE_MAX_VALUE) { - - $fails = 0; - $cacheConfig->setGroupValue($cacheConfigGroup, 'rise', $rise); - } - $cacheConfig->setGroupValue($cacheConfigGroup, 'fails', $fails); - } - - throw $exception; - } - - $cacheConfig->setGroupValue($cacheConfigGroup, 'fails', 0); - - return $result; - } - - // ######################################## - - protected function getRequestTimeout() - { - $cacheConfig = Mage::helper('M2ePro/Module')->getCacheConfig(); - $cacheConfigGroup = '/ebay/synchronization/orders/receive/timeout'; - - $rise = (int)$cacheConfig->getGroupValue($cacheConfigGroup, 'rise'); - $rise > self::TIMEOUT_RISE_MAX_VALUE && $rise = self::TIMEOUT_RISE_MAX_VALUE; - - return 300 + $rise; - } - - // ######################################## - - protected function validateResponseData($response) - { - return true; - } - - protected function prepareResponseData($response) - { - return $response; - } - - // ######################################## -} \ No newline at end of file diff --git a/app/code/community/Ess/M2ePro/Model/Ebay/Listing/Action/Configurator.php b/app/code/community/Ess/M2ePro/Model/Ebay/Listing/Action/Configurator.php index fbbcf3971..208fae16b 100644 --- a/app/code/community/Ess/M2ePro/Model/Ebay/Listing/Action/Configurator.php +++ b/app/code/community/Ess/M2ePro/Model/Ebay/Listing/Action/Configurator.php @@ -9,6 +9,8 @@ abstract class Ess_M2ePro_Model_Ebay_Listing_Action_Configurator extends Ess_M2ePro_Model_Listing_Product_Action_Configurator { + const MODE_EMPTY = 'empty'; + const DATA_TYPE_GENERAL = 'general'; const DATA_TYPE_QTY = 'qty'; const DATA_TYPE_PRICE = 'price'; @@ -18,6 +20,37 @@ abstract class Ess_M2ePro_Model_Ebay_Listing_Action_Configurator //######################################## + /** + * @return array + */ + public function getAllModes() + { + return array_merge( + parent::getAllModes(), + array(self::MODE_EMPTY) + ); + } + + //######################################## + + /** + * @return bool + */ + public function isEmptyMode() + { + return $this->mode == self::MODE_EMPTY; + } + + /** + * @return $this + */ + public function setEmptyMode() + { + return $this->setMode(self::MODE_EMPTY); + } + + //######################################## + /** * @return array */ @@ -35,6 +68,64 @@ public function getAllDataTypes() //######################################## + /** + * @return bool + */ + public function isAllAllowed() + { + if ($this->isEmptyMode()) { + return false; + } + + return parent::isAllAllowed(); + } + + /** + * @return array + */ + public function getAllowedDataTypes() + { + if ($this->isEmptyMode()) { + return array(); + } + + return parent::getAllowedDataTypes(); + } + + //######################################## + + /** + * @param $dataType + * @return bool + */ + public function isAllowed($dataType) + { + if ($this->isEmptyMode()) { + return false; + } + + return parent::isAllowed($dataType); + } + + /** + * @param $dataType + * @return $this + * @throws Ess_M2ePro_Model_Exception_Logic + */ + public function allow($dataType) + { + $this->validateDataType($dataType); + + if ($this->isAllowed($dataType) || $this->isEmptyMode()) { + return $this; + } + + $this->allowedDataTypes[] = $dataType; + return $this; + } + + //######################################## + /** * @return bool */ @@ -190,4 +281,38 @@ public function disallowDescription() } //######################################## + + /** + * @param Ess_M2ePro_Model_Listing_Product_Action_Configurator $configurator + * @return bool + */ + public function isDataConsists(Ess_M2ePro_Model_Listing_Product_Action_Configurator $configurator) + { + if ($configurator->isEmptyMode()) { + return true; + } + + if ($this->isEmptyMode()) { + return false; + } + + return parent::isDataConsists($configurator); + } + + // --------------------------------------- + + /** + * @param Ess_M2ePro_Model_Listing_Product_Action_Configurator $configurator + * @return $this + */ + public function mergeData(Ess_M2ePro_Model_Listing_Product_Action_Configurator $configurator) + { + if ($configurator->isEmptyMode()) { + return $this; + } + + return parent::mergeData($configurator); + } + + //######################################## } \ No newline at end of file diff --git a/app/code/community/Ess/M2ePro/Model/Ebay/Listing/Product/Action/Request/Shipping.php b/app/code/community/Ess/M2ePro/Model/Ebay/Listing/Product/Action/Request/Shipping.php index e41f2b63f..ee60f45fc 100644 --- a/app/code/community/Ess/M2ePro/Model/Ebay/Listing/Product/Action/Request/Shipping.php +++ b/app/code/community/Ess/M2ePro/Model/Ebay/Listing/Product/Action/Request/Shipping.php @@ -58,7 +58,6 @@ public function getData() $data['cross_border_trade'] = self::CROSS_BORDER_TRADE_NONE; } - $data['excluded_locations'] = array(); foreach ($this->getShippingTemplate()->getExcludedLocations() as $location) { $data['excluded_locations'][] = $location['code']; } diff --git a/app/code/community/Ess/M2ePro/Model/Ebay/Listing/Product/Action/Request/Variations.php b/app/code/community/Ess/M2ePro/Model/Ebay/Listing/Product/Action/Request/Variations.php index 3d738e3f4..1f1db28e6 100644 --- a/app/code/community/Ess/M2ePro/Model/Ebay/Listing/Product/Action/Request/Variations.php +++ b/app/code/community/Ess/M2ePro/Model/Ebay/Listing/Product/Action/Request/Variations.php @@ -37,10 +37,6 @@ public function getData() $data['variation_image'] = $this->getImagesData(); - if ($variationsThatCanNotBeDeleted = $this->getVariationsThatCanNotBeDeleted()) { - $data['variations_that_can_not_be_deleted'] = $variationsThatCanNotBeDeleted; - } - return $data; } @@ -150,17 +146,6 @@ public function getSetsData() return false; } - public function getVariationsThatCanNotBeDeleted() - { - $additionalData = $this->getListingProduct()->getAdditionalData(); - - if (isset($additionalData['variations_that_can_not_be_deleted'])) { - return $additionalData['variations_that_can_not_be_deleted']; - } - - return false; - } - /** * @return array */ diff --git a/app/code/community/Ess/M2ePro/Model/Ebay/Listing/Product/Action/Type/List/Request.php b/app/code/community/Ess/M2ePro/Model/Ebay/Listing/Product/Action/Type/List/Request.php index 6569fab8b..6cc3a98be 100644 --- a/app/code/community/Ess/M2ePro/Model/Ebay/Listing/Product/Action/Type/List/Request.php +++ b/app/code/community/Ess/M2ePro/Model/Ebay/Listing/Product/Action/Type/List/Request.php @@ -39,13 +39,6 @@ public function getActionData() public function resetVariations() { $variations = $this->getListingProduct()->getVariations(true); - if (empty($variations)) { - return; - } - - $additionalData = $this->getListingProduct()->getAdditionalData(); - $additionalData['variations_that_can_not_be_deleted'] = []; - $this->getListingProduct()->setSettings('additional_data', $additionalData)->save(); foreach ($variations as $variation) { diff --git a/app/code/community/Ess/M2ePro/Model/Ebay/Listing/Product/Action/Type/Relist/Response.php b/app/code/community/Ess/M2ePro/Model/Ebay/Listing/Product/Action/Type/Relist/Response.php index 372dcc034..51eb77fdd 100644 --- a/app/code/community/Ess/M2ePro/Model/Ebay/Listing/Product/Action/Type/Relist/Response.php +++ b/app/code/community/Ess/M2ePro/Model/Ebay/Listing/Product/Action/Type/Relist/Response.php @@ -39,7 +39,6 @@ public function processSuccess(array $response, array $responseParams = array()) $data = $this->removeConditionNecessary($data); $data = $this->appendIsVariationMpnFilledValue($data); - $data = $this->appendVariationsThatCanNotBeDeleted($data, $response); if (isset($data['additional_data'])) { $data['additional_data'] = json_encode($data['additional_data']); diff --git a/app/code/community/Ess/M2ePro/Model/Ebay/Listing/Product/Action/Type/Response.php b/app/code/community/Ess/M2ePro/Model/Ebay/Listing/Product/Action/Type/Response.php index 74434e8f3..2080c31e3 100644 --- a/app/code/community/Ess/M2ePro/Model/Ebay/Listing/Product/Action/Type/Response.php +++ b/app/code/community/Ess/M2ePro/Model/Ebay/Listing/Product/Action/Type/Response.php @@ -512,19 +512,5 @@ protected function appendIsVariationMpnFilledValue($data) return $data; } - protected function appendVariationsThatCanNotBeDeleted(array $data, array $response) - { - if (!$this->getRequestData()->isVariationItem()) { - return $data; - } - - $variations = isset($response['variations_that_can_not_be_deleted']) - ? $response['variations_that_can_not_be_deleted'] : array(); - - $data['additional_data']['variations_that_can_not_be_deleted'] = $variations; - - return $data; - } - //######################################## } \ No newline at end of file diff --git a/app/code/community/Ess/M2ePro/Model/Ebay/Listing/Product/Action/Type/Revise/Response.php b/app/code/community/Ess/M2ePro/Model/Ebay/Listing/Product/Action/Type/Revise/Response.php index 729dc981f..ee689ad41 100644 --- a/app/code/community/Ess/M2ePro/Model/Ebay/Listing/Product/Action/Type/Revise/Response.php +++ b/app/code/community/Ess/M2ePro/Model/Ebay/Listing/Product/Action/Type/Revise/Response.php @@ -36,7 +36,6 @@ public function processSuccess(array $response, array $responseParams = array()) $data = $this->appendGalleryImagesValues($data, $response, $responseParams); $data = $this->appendIsVariationMpnFilledValue($data); - $data = $this->appendVariationsThatCanNotBeDeleted($data, $response); if (isset($data['additional_data'])) { $data['additional_data'] = json_encode($data['additional_data']); diff --git a/app/code/community/Ess/M2ePro/Model/Ebay/Synchronization/Orders/Receive.php b/app/code/community/Ess/M2ePro/Model/Ebay/Synchronization/Orders/Receive.php index cacbdd27e..f6a97b6ea 100644 --- a/app/code/community/Ess/M2ePro/Model/Ebay/Synchronization/Orders/Receive.php +++ b/app/code/community/Ess/M2ePro/Model/Ebay/Synchronization/Orders/Receive.php @@ -121,9 +121,9 @@ private function processEbayOrders($account) $fromTime = $this->prepareFromTime($account); $dispatcherObj = Mage::getModel('M2ePro/Connector_Ebay_Dispatcher'); - $connectorObj = $dispatcherObj->getConnector('order', 'receive', 'items', + $connectorObj = $dispatcherObj->getVirtualConnector('sales', 'get', 'list', array('last_update' => $fromTime), - NULL, $account); + NULL, NULL, $account); $response = $dispatcherObj->process($connectorObj); $this->processResponseMessages($connectorObj); diff --git a/app/code/community/Ess/M2ePro/Model/Ebay/Synchronization/Templates/Relist.php b/app/code/community/Ess/M2ePro/Model/Ebay/Synchronization/Templates/Relist.php index 7469510ec..8e1bc9a81 100644 --- a/app/code/community/Ess/M2ePro/Model/Ebay/Synchronization/Templates/Relist.php +++ b/app/code/community/Ess/M2ePro/Model/Ebay/Synchronization/Templates/Relist.php @@ -269,10 +269,17 @@ private function prepareConfigurator(Ess_M2ePro_Model_Listing_Product $listingPr /** @var Ess_M2ePro_Model_Ebay_Listing_Product $ebayListingProduct */ $ebayListingProduct = $listingProduct->getChildObject(); - if (!$ebayListingProduct->getEbaySynchronizationTemplate()->isRelistSendData()) { - $configurator->setPartialMode(); - $configurator->allowQty()->allowPrice()->allowVariations(); + if ($ebayListingProduct->getEbaySynchronizationTemplate()->isRelistSendData()) { + return; } + + if (!$listingProduct->isHidden() && $action == Ess_M2ePro_Model_Listing_Product::ACTION_RELIST) { + $configurator->setEmptyMode(); + return; + } + + $configurator->setPartialMode(); + $configurator->allowQty()->allowVariations(); } //######################################## diff --git a/app/code/community/Ess/M2ePro/Model/Listing.php b/app/code/community/Ess/M2ePro/Model/Listing.php index 0b241df80..a8731fa52 100644 --- a/app/code/community/Ess/M2ePro/Model/Listing.php +++ b/app/code/community/Ess/M2ePro/Model/Listing.php @@ -563,7 +563,7 @@ public function removeDeletedProduct($product) ->addFieldToFilter('product_id', $productId) ->getItems(); - $processedVariationsIds = array(); + $deletedVariationsIds = array(); /** @var $variationOption Ess_M2ePro_Model_Listing_Product_Variation_Option */ foreach ($variationOptions as $variationOption) { @@ -571,55 +571,9 @@ public function removeDeletedProduct($product) /** @var $listingProduct Ess_M2ePro_Model_Listing_Product */ $listingProduct = $variationOption->getListingProduct(); - if (!in_array($variationOption->getListingProductVariationId(),$processedVariationsIds)) { - - $processedVariationsIds[] = $variationOption->getListingProductVariationId(); - - if ($variationOption->isComponentModeEbay()) { - - $variation = $variationOption->getListingProductVariation(); - - /** @var Ess_M2ePro_Model_Ebay_Listing_Product_Variation $ebayVariation */ - $ebayVariation = $variation->getChildObject(); - - if (!$ebayVariation->isNotListed()) { - $additionalData = $listingProduct->getAdditionalData(); - $variationsThatCanNotBeDeleted = isset($additionalData['variations_that_can_not_be_deleted']) - ? $additionalData['variations_that_can_not_be_deleted'] : array(); - - $specifics = array(); - - foreach ($variation->getOptions(true) as $option) { - $specifics[$option->getAttribute()] = $option->getOption(); - } - - $variationsThatCanNotBeDeleted[] = array( - 'qty' => 0, - 'price' => $ebayVariation->getPrice(), - 'sku' => $ebayVariation->getOnlineSku(), - 'add' => 0, - 'delete' => 1, - 'specifics' => $specifics, - 'has_sales' => $ebayVariation->hasSales(), - ); - - $additionalData['variations_that_can_not_be_deleted'] = $variationsThatCanNotBeDeleted; - - $listingProduct->setSettings('additional_data', $additionalData)->save(); - } - - $variation->deleteInstance(); - } else { - $listingProduct->deleteObjectLocks(); - - if ($listingProduct->isStoppable()) { - Mage::getModel('M2ePro/StopQueue')->add($listingProduct); - $listingProduct->setStatus(Ess_M2ePro_Model_Listing_Product::STATUS_STOPPED)->save(); - } - - $listingsProductsForRemove[$listingProduct->getId()] = $listingProduct; - } - + if (!in_array($variationOption->getListingProductVariationId(),$deletedVariationsIds)) { + $variationOption->getListingProductVariation()->deleteInstance(); + $deletedVariationsIds[] = $variationOption->getListingProductVariationId(); } $listingId = $listingProduct->getListingId(); @@ -647,20 +601,6 @@ public function removeDeletedProduct($product) } foreach ($listingsProductsForRemove as $listingProduct) { - if ($listingProduct->isComponentModeAmazon()) { - /** @var Ess_M2ePro_Model_Amazon_Listing_Product $amazonListingProduct */ - $amazonListingProduct = $listingProduct->getChildObject(); - $variationManager = $amazonListingProduct->getVariationManager(); - - if ($variationManager->isRelationChildType()) { - /** @var Ess_M2ePro_Model_Amazon_Listing_Product $amazonParentListingProduct */ - $amazonParentListingProduct = $variationManager->getTypeModel()->getAmazonParentListingProduct(); - $listingProduct->deleteInstance(); - $amazonParentListingProduct->getVariationManager()->getTypeModel()->getProcessor()->process(); - continue; - } - } - $listingProduct->deleteInstance(); } // --------------------------------------- diff --git a/app/code/community/Ess/M2ePro/Model/Listing/Product/QtyCalculator.php b/app/code/community/Ess/M2ePro/Model/Listing/Product/QtyCalculator.php index 56024dd46..792729f10 100644 --- a/app/code/community/Ess/M2ePro/Model/Listing/Product/QtyCalculator.php +++ b/app/code/community/Ess/M2ePro/Model/Listing/Product/QtyCalculator.php @@ -251,7 +251,7 @@ protected function applyValuePercentageModifications($value) { $percents = $this->getSource('qty_percentage'); - if ($value <= 0 || $percents < 0 || $percents == 100) { + if ($value <= 0 || $percents < 0 || $percents > 100) { return $value; } diff --git a/app/code/community/Ess/M2ePro/Model/Magento/Product/Variation.php b/app/code/community/Ess/M2ePro/Model/Magento/Product/Variation.php index d06761d29..8d9a16b52 100644 --- a/app/code/community/Ess/M2ePro/Model/Magento/Product/Variation.php +++ b/app/code/community/Ess/M2ePro/Model/Magento/Product/Variation.php @@ -426,7 +426,7 @@ protected function prepareVariationsTypeStandard(&$optionsScope, &$set, $optionS foreach ($optionsScope[$optionScopeIndex] as $option) { if (!isset($set[$option['attribute']]) || - !in_array($option['option'],$set[$option['attribute']],true)) { + !in_array($option['option'],$set[$option['attribute']])) { continue; } @@ -451,7 +451,7 @@ protected function sortAttributeOptions($attributeCode, $options) $sortedOptions = array(); foreach ($optionCollection as $option) { - if (!in_array($option->getValue(), $options, true) || + if (!in_array($option->getValue(), $options) || in_array($option->getValue(), $sortedOptions, true)) { continue; } @@ -919,7 +919,7 @@ protected function getConfigurableTitlesVariationSet() $attributeValues[$valueId] = array(); } - if (!in_array($attributeValue->getValue(), $attributeValues[$valueId], true)) { + if (!in_array($attributeValue->getValue(), $attributeValues[$valueId])) { $attributeValues[$valueId][$storeId] = $attributeValue->getValue(); } } diff --git a/app/code/community/Ess/M2ePro/controllers/Adminhtml/Common/Amazon/Template/DescriptionController.php b/app/code/community/Ess/M2ePro/controllers/Adminhtml/Common/Amazon/Template/DescriptionController.php index 6c42ec402..669771133 100644 --- a/app/code/community/Ess/M2ePro/controllers/Adminhtml/Common/Amazon/Template/DescriptionController.php +++ b/app/code/community/Ess/M2ePro/controllers/Adminhtml/Common/Amazon/Template/DescriptionController.php @@ -250,7 +250,6 @@ public function saveAction() /** @var Ess_M2ePro_Model_Amazon_Template_Description $amazonDescriptionTemplate */ $amazonDescriptionTemplate = $descriptionTemplate->getChildObject(); - $amazonDescriptionTemplate->setDefinitionTemplate($descriptionDefinition); // Saving specifics info // --------------------------------------- diff --git a/app/code/community/Ess/M2ePro/controllers/Adminhtml/Wizard/InstallationCommonController.php b/app/code/community/Ess/M2ePro/controllers/Adminhtml/Wizard/InstallationCommonController.php index 591e22ba9..c90007c1d 100644 --- a/app/code/community/Ess/M2ePro/controllers/Adminhtml/Wizard/InstallationCommonController.php +++ b/app/code/community/Ess/M2ePro/controllers/Adminhtml/Wizard/InstallationCommonController.php @@ -54,7 +54,6 @@ public function createLicenseAction() 'email', 'firstname', 'lastname', - 'phone', 'country', 'city', 'postal_code', @@ -87,8 +86,7 @@ public function createLicenseAction() $licenseResult = Mage::helper('M2ePro/Module_License')->obtainRecord( $licenseData['email'], $licenseData['firstname'], $licenseData['lastname'], - $licenseData['country'], $licenseData['city'], - $licenseData['postal_code'], $licenseData['phone'] + $licenseData['country'], $licenseData['city'], $licenseData['postal_code'] ); return $this->getResponse()->setBody(json_encode(array('result' => $licenseResult))); diff --git a/app/code/community/Ess/M2ePro/controllers/Adminhtml/Wizard/InstallationEbayController.php b/app/code/community/Ess/M2ePro/controllers/Adminhtml/Wizard/InstallationEbayController.php index 259033cbf..4e3bd7c69 100644 --- a/app/code/community/Ess/M2ePro/controllers/Adminhtml/Wizard/InstallationEbayController.php +++ b/app/code/community/Ess/M2ePro/controllers/Adminhtml/Wizard/InstallationEbayController.php @@ -226,7 +226,6 @@ public function beforeTokenAction() 'email', 'firstname', 'lastname', - 'phone', 'country', 'city', 'postal_code', @@ -257,8 +256,7 @@ public function beforeTokenAction() $licenseResult = Mage::helper('M2ePro/Module_License')->obtainRecord( $licenseData['email'], $licenseData['firstname'], $licenseData['lastname'], - $licenseData['country'], $licenseData['city'], - $licenseData['postal_code'], $licenseData['phone'] + $licenseData['country'], $licenseData['city'], $licenseData['postal_code'] ); if (!$licenseResult) { diff --git a/app/code/community/Ess/M2ePro/etc/config.xml b/app/code/community/Ess/M2ePro/etc/config.xml index 2ef8d597f..6c8a17371 100644 --- a/app/code/community/Ess/M2ePro/etc/config.xml +++ b/app/code/community/Ess/M2ePro/etc/config.xml @@ -2,7 +2,7 @@ - 6.4.4 + 6.4.3 diff --git a/app/code/community/Ess/M2ePro/sql/M2ePro_setup/mysql4-install-6.4.4.php b/app/code/community/Ess/M2ePro/sql/M2ePro_setup/mysql4-install-6.4.4.php deleted file mode 100644 index ce68d0899..000000000 --- a/app/code/community/Ess/M2ePro/sql/M2ePro_setup/mysql4-install-6.4.4.php +++ /dev/null @@ -1,3410 +0,0 @@ -startSetup(); - -//######################################## - -// GENERAL SCRIPT - -$tempMagentoConnectUrl = 'http://www.magentocommerce.com/magento-connect/customer-experience/alternative-sales-models/'; -$tempMagentoConnectUrl .= 'ebay-magento-integration-order-importing-and-stock-level-synchronization-9193.html'; - -$servicingInterval = rand(43200, 86400); - -$installer->run(<<run(<<generateRandomHash()}', 'Unique identifier of M2E instance', - '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/modules/', 'M2ePro', '0.0.0.r0', NULL, '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/server/', 'baseurl_1', 'https://s1.m2epro.com/', 'Support server base url', - '2013-05-08 00:00:00', '2013-05-08 00:00:00'); - -INSERT INTO `m2epro_config` (`group`,`key`,`value`,`notice`,`update_date`,`create_date`) VALUES - ('/cron/', 'mode', '1', '0 - disable, \r\n1 - enable', '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/cron/', 'runner', 'magento', NULL, '2014-01-01 00:00:00', '2014-01-01 00:00:00'), - ('/cron/', 'last_access', NULL, 'Time of last cron synchronization', '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/cron/', 'last_runner_change', NULL, 'Time of last change cron runner', '2013-05-08 00:00:00', - '2013-05-08 00:00:00'), - ('/cron/', 'last_executed_slow_task', NULL, '', '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/cron/service/', 'auth_key', NULL, NULL, '2014-01-01 00:00:00', '2014-01-01 00:00:00'), - ('/cron/service/', 'disabled', '0', NULL, '2014-01-01 00:00:00', '2014-01-01 00:00:00'), - ('/cron/magento/', 'disabled', '0', NULL, '2014-01-01 00:00:00', '2014-01-01 00:00:00'), - ('/cron/service/', 'hostname', 'cron.m2epro.com', NULL, '2014-01-01 00:00:00', '2014-01-01 00:00:00'), - ('/cron/task/logs_clearing/', 'mode', '1', '0 - disable, \r\n1 - enable', '2013-05-08 00:00:00', - '2013-05-08 00:00:00'), - ('/cron/task/logs_clearing/', 'interval', '86400', 'in seconds', '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/cron/task/logs_clearing/', 'last_access', NULL, 'date of last access', '2013-05-08 00:00:00', - '2013-05-08 00:00:00'), - ('/cron/task/logs_clearing/', 'last_run', NULL, 'date of last run', '2014-01-01 00:00:00', '2014-01-01 00:00:00'), - ('/cron/task/synchronization/', 'mode', '1', '0 - disable, \r\n1 - enable', '2013-05-08 00:00:00', - '2013-05-08 00:00:00'), - ('/cron/task/synchronization/', 'interval', '300', 'in seconds', '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/cron/task/synchronization/', 'last_access', NULL, 'date of last access', '2013-05-08 00:00:00', - '2013-05-08 00:00:00'), - ('/cron/task/synchronization/', 'last_run', NULL, 'date of last run', '2014-01-01 00:00:00', '2014-01-01 00:00:00'), - ('/cron/task/servicing/', 'mode', '1', '0 - disable, \r\n1 - enable', '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/cron/task/servicing/', 'interval', '{$servicingInterval}', 'in seconds', - '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/cron/task/servicing/', 'last_access', NULL, 'date of last access', '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/cron/task/servicing/', 'last_run', NULL, 'date of last run', '2014-01-01 00:00:00', '2014-01-01 00:00:00'), - ('/logs/clearing/listings/', 'mode', '1', '0 - disable, \r\n1 - enable', '2013-05-08 00:00:00', - '2013-05-08 00:00:00'), - ('/logs/clearing/listings/', 'days', '30', 'in days', '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/logs/clearing/other_listings/', 'mode', '1', '0 - disable, \r\n1 - enable', '2013-05-08 00:00:00', - '2013-05-08 00:00:00'), - ('/logs/clearing/other_listings/', 'days', '30', 'in days', '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/logs/clearing/synchronizations/', 'mode', '1', '0 - disable, \r\n1 - enable', '2013-05-08 00:00:00', - '2013-05-08 00:00:00'), - ('/logs/clearing/synchronizations/', 'days', '30', 'in days', '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/logs/clearing/orders/', 'mode', '1', '0 - disable, \r\n1 - enable', '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/logs/clearing/orders/', 'days', '90', 'in days', '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/logs/listings/', 'last_action_id', '0', NULL, '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/logs/other_listings/', 'last_action_id', '0', NULL, '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/support/', 'knowledge_base_url', 'http://support.m2epro.com/knowledgebase', NULL, '2013-05-08 00:00:00', - '2013-05-08 00:00:00'), - ('/support/', 'documentation_url', 'http://docs.m2epro.com', NULL, '2015-07-03 00:00:00', - '2015-07-03 00:00:00'), - ('/support/', 'clients_portal_url', 'https://clients.m2epro.com/', NULL, '2013-05-08 00:00:00', - '2013-05-08 00:00:00'), - ('/support/', 'main_website_url', 'http://m2epro.com/', NULL, '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/support/', 'main_support_url', 'http://support.m2epro.com/', NULL, '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/support/', 'magento_connect_url', '{$tempMagentoConnectUrl}', NULL, '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/support/', 'contact_email', 'support@m2epro.com', NULL, '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/support/uservoice/', 'api_url', 'http://magento2ebay.uservoice.com/api/v1/', NULL, '2013-05-08 00:00:00', - '2013-05-08 00:00:00'), - ('/support/uservoice/', 'api_client_key', 'WEsfO8nFh3FXffUU1Oa7A', NULL, '2013-05-08 00:00:00', - '2013-05-08 00:00:00'), - ('/view/', 'show_block_notices', '1', '0 - disable, \r\n1 - enable', '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/view/', 'show_products_thumbnails', '1', 'Visibility thumbnails into grid', '2013-05-08 00:00:00', - '2013-05-08 00:00:00'), - ('/view/requirements/popup/', 'closed', '0', '0 - false, - true', '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/view/synchronization/revise_total/', 'show', '0', '0 - disable, \r\n1 - enable', '2013-05-08 00:00:00', - '2013-05-08 00:00:00'), - ('/view/common/component/', 'default', 'amazon', NULL, '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/view/common/autocomplete/', 'max_records_quantity', '100', NULL, '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/view/ebay/', 'mode', 'simple', 'simple, advanced', '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/view/ebay/notice/', 'disable_collapse', '0', '0 - disable, \r\n1 - enable', '2013-05-08 00:00:00', - '2013-05-08 00:00:00'), - ('/view/ebay/template/selling_format/', 'show_tax_category', '0', '0 - disable, \r\n1 - enable', - '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/view/ebay/feedbacks/notification/', 'mode', '0', '0 - disable, \r\n1 - enable', '2013-05-08 00:00:00', - '2013-05-08 00:00:00'), - ('/view/ebay/feedbacks/notification/', 'last_check', NULL, 'Date last check new buyers feedbacks', - '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/view/ebay/advanced/autoaction_popup/', 'shown', '0', NULL, '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/view/ebay/motors_epids_attribute/', 'listing_notification_shown', '0', NULL, - '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/view/ebay/multi_currency_marketplace_2/', 'notification_shown', '0', NULL, - '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/view/ebay/multi_currency_marketplace_19/', 'notification_shown', '0', NULL, - '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/view/ebay/terapeak/', 'mode', '1', NULL, '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/debug/exceptions/', 'send_to_server', '1', '0 - disable,\r\n1 - enable', '2013-05-08 00:00:00', - '2013-05-08 00:00:00'), - ('/debug/exceptions/', 'filters_mode', '0', '0 - disable,\r\n1 - enable', '2013-05-08 00:00:00', - '2013-05-08 00:00:00'), - ('/debug/fatal_error/', 'send_to_server', '1', '0 - disable,\r\n1 - enable', '2013-05-08 00:00:00', - '2013-05-08 00:00:00'), - ('/debug/logging/', 'send_to_server', 1, '0 - disable,\r\n1 - enable', '2015-08-12 00:00:00', '2015-08-12 00:00:00'), - ('/debug/maintenance/', 'mode', '0', '0 - disable,\r\n1 - enable', '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/debug/maintenance/', 'restore_date', NULL, NULL, '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/renderer/description/', 'convert_linebreaks', '1', '0 - No\r\n1 - Yes', '2013-05-08 00:00:00', - '2013-05-08 00:00:00'), - ('/other/paypal/', 'url', 'paypal.com/cgi-bin/webscr/', 'PayPal url', '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/product/index/', 'mode', '1', '0 - disable, \r\n1 - enable', '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/product/force_qty/', 'mode', '0', '0 - disable, \r\n1 - enable', '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/product/force_qty/', 'value', '10', 'min qty value', '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/qty/percentage/', 'rounding_greater', '0', NULL, '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/order/magento/settings/', 'create_with_first_product_options_when_variation_unavailable', '1', - '0 - disable, \r\n1 - enable', '2013-05-08 00:00:00', '2013-05-08 00:00:00'); - -INSERT INTO `m2epro_synchronization_config` (`group`,`key`,`value`,`notice`,`update_date`,`create_date`) VALUES - (NULL, 'mode', '1', '0 - disable, \r\n1 - enable', '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - (NULL, 'last_access', NULL, NULL, '2014-01-01 00:00:00', '2014-01-01 00:00:00'), - (NULL, 'last_run', NULL, NULL, '2014-01-01 00:00:00', '2014-01-01 00:00:00'), - ('/settings/product_change/', 'max_count_per_one_time', '500', NULL, - '2012-05-21 10:47:49', '2012-05-21 10:47:49'), - ('/settings/product_change/', 'max_lifetime', '86400', 'in seconds', - '2012-05-21 10:47:49', '2012-05-21 10:47:49'), - ('/settings/product_change/', 'max_count', '10000', NULL, - '2012-05-21 10:47:49', '2012-05-21 10:47:49'), - ('/defaults/', 'mode', '1', '0 - disable, \r\n1 - enable', - '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/defaults/processing/', 'mode', '1', '0 - disable, \r\n1 - enable', - '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/defaults/deleted_products/', 'mode', '1', '0 - disable, \r\n1 - enable', - '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/defaults/deleted_products/', 'interval', '3600', 'in seconds', - '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/defaults/deleted_products/', 'last_time', NULL, 'Last check time', - '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/defaults/added_products/', 'last_magento_product_id', NULL, NULL, - '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/defaults/stop_queue/', 'mode', '1', '0 - disable, \r\n1 - enable', - '2012-05-21 10:47:49', '2012-05-21 10:47:49'), - ('/defaults/stop_queue/', 'interval', '3600', 'in seconds', - '2012-05-21 10:47:49', '2012-05-21 10:47:49'), - ('/defaults/stop_queue/', 'last_time', NULL, 'Last check time', - '2012-05-21 10:47:49', '2012-05-21 10:47:49'), - ('/defaults/inspector/', 'mode', '0', '0 - disable, \r\n1 - enable', - '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/defaults/inspector/product_changes/', 'type', 'circle', 'circle', - '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/defaults/inspector/product_changes/circle/', 'last_listing_product_id', NULL, NULL, - '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/defaults/inspector/product_changes/circle/', 'min_interval_between_circles', '3600', 'in seconds', - '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/defaults/inspector/product_changes/circle/', 'max_count_times_for_full_circle', '50', NULL, - '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/defaults/inspector/product_changes/circle/', 'min_count_items_per_one_time', '100', NULL, - '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/defaults/inspector/product_changes/circle/', 'max_count_items_per_one_time', '500', NULL, - '2013-05-08 00:00:00', '2013-05-08 00:00:00'), - ('/defaults/inspector/product_changes/circle/', 'last_time_start_circle', NULL, NULL, - '2013-05-08 00:00:00', '2013-05-08 00:00:00'); - -INSERT INTO `m2epro_wizard` VALUES - (1, 'migrationToV6', '*', 3, NULL, 1, 1), - (2, 'installationEbay', 'ebay', 0, NULL, 1, 2), - (3, 'installationCommon', 'common', 0, NULL, 1, 2), - (4, 'amazon', 'common', 0, NULL, 0, 3), - (5, 'buy', 'common', 0, NULL, 0, 4), - (6, 'migrationNewAmazon', 'common', 3, NULL, 1, 5), - (7, 'removedPlay', 'common', 3, NULL, 0, 6), - (8, 'ebayProductDetails', 'ebay', 3, NULL, 1, 7), - (9, 'fullAmazonCategories', 'common', 3, NULL, 1, 8), - (10, 'amazonShippingOverridePolicy', 'common', 3, NULL, 1, 9); - -SQL -); - -//######################################## - -// EBAY SCRIPT -$installer->run(<<run(<<run(<<run(<<run(<<run(<<endSetup(); - -//######################################## \ No newline at end of file diff --git a/app/code/community/Ess/M2ePro/sql/M2ePro_setup/mysql4-upgrade-6.4.3-6.4.4.php b/app/code/community/Ess/M2ePro/sql/M2ePro_setup/mysql4-upgrade-6.4.3-6.4.4.php deleted file mode 100644 index 79140a3e0..000000000 --- a/app/code/community/Ess/M2ePro/sql/M2ePro_setup/mysql4-upgrade-6.4.3-6.4.4.php +++ /dev/null @@ -1,44 +0,0 @@ -startSetup(); - -$connection = $installer->getConnection(); - -//######################################## - -$installer->getTableModifier('amazon_marketplace')->renameColumn('is_asin_available', 'is_new_asin_available', true); - -$installer->run(<<getTableModifier('account') - ->addColumn('additional_data', 'TEXT', 'NULL', 'component_mode'); - -$installer->run(<<endSetup(); - -//######################################## \ No newline at end of file diff --git a/app/design/adminhtml/default/default/template/M2ePro/wizard/installationCommon/installation/license.phtml b/app/design/adminhtml/default/default/template/M2ePro/wizard/installationCommon/installation/license.phtml index d8f5a5978..95858fee0 100644 --- a/app/design/adminhtml/default/default/template/M2ePro/wizard/installationCommon/installation/license.phtml +++ b/app/design/adminhtml/default/default/template/M2ePro/wizard/installationCommon/installation/license.phtml @@ -86,16 +86,6 @@ - - - __('Phone') ?>: - - - - getUserInfoValue('phone', 'span'); ?> - - -   @@ -166,7 +156,7 @@