From 64c91bbe86e1728135f7a5213b42759c48436830 Mon Sep 17 00:00:00 2001 From: Andriy Nasinnyk Date: Tue, 18 Aug 2015 18:01:18 +0300 Subject: [PATCH 01/31] MAGETWO-41338: Custom Attribute with Show on Storefront = Yes Makes the Customer Edit Form Empty --- .../Magento/Framework/View/Element/UiComponentFactory.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/internal/Magento/Framework/View/Element/UiComponentFactory.php b/lib/internal/Magento/Framework/View/Element/UiComponentFactory.php index 0c7c723f6679d..285e6549ad951 100644 --- a/lib/internal/Magento/Framework/View/Element/UiComponentFactory.php +++ b/lib/internal/Magento/Framework/View/Element/UiComponentFactory.php @@ -144,7 +144,7 @@ public function create($identifier, $name = null, array $arguments = []) $identifier, $bundleComponents[$identifier] ); - $componentArguments = array_merge($componentArguments, $arguments); + $componentArguments = array_replace_recursive($componentArguments, $arguments); if (!isset($componentArguments['context'])) { $componentArguments['context'] = $this->contextFactory->create([ 'namespace' => $identifier @@ -164,7 +164,10 @@ public function create($identifier, $name = null, array $arguments = []) $componentArguments['components'] = $components; /** @var \Magento\Framework\View\Element\UiComponentInterface $component */ - $component = $this->objectManager->create($className, array_merge($componentArguments, $arguments)); + $component = $this->objectManager->create( + $className, + array_replace_recursive($componentArguments, $arguments) + ); return $component; } else { From 26d2387850e0cf07cdeea4deb53bb166be2599b2 Mon Sep 17 00:00:00 2001 From: Yaroslav Onischenko Date: Thu, 13 Aug 2015 17:14:49 +0300 Subject: [PATCH 02/31] MAGETWO-41337: Product Import Loses Images --- .../CatalogImportExport/Model/Import/Product.php | 16 +++++++++------- .../Model/Import/Uploader.php | 9 ++++++++- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product.php b/app/code/Magento/CatalogImportExport/Model/Import/Product.php index 6f3dffec4b326..d383c671a6c82 100755 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product.php @@ -1466,13 +1466,15 @@ protected function _saveProducts() if (!empty($rowData[self::COL_MEDIA_IMAGE]) && is_array($rowData[self::COL_MEDIA_IMAGE])) { $position = array_search($mediaImage, $mediaGalleryImages); foreach ($rowData[self::COL_MEDIA_IMAGE] as $mediaImage) { - $mediaGallery[$rowSku][] = [ - 'attribute_id' => $this->getMediaGalleryAttributeId(), - 'label' => isset($mediaGalleryLabels[$position]) ? $mediaGalleryLabels[$position] : '', - 'position' => $position, - 'disabled' => '', - 'value' => $mediaImage, - ]; + if (!empty($mediaImage)) { + $mediaGallery[$rowSku][] = [ + 'attribute_id' => $this->getMediaGalleryAttributeId(), + 'label' => isset($mediaGalleryLabels[$position]) ? $mediaGalleryLabels[$position] : '', + 'position' => $position, + 'disabled' => '', + 'value' => $mediaImage, + ]; + } } } } diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Uploader.php b/app/code/Magento/CatalogImportExport/Model/Import/Uploader.php index 0de5545a49c10..a78e978d84c6f 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Uploader.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Uploader.php @@ -302,7 +302,14 @@ public function setDestDir($path) protected function _moveFile($tmpPath, $destPath) { if ($this->_directory->isFile($tmpPath)) { - return $this->_directory->copyFile($tmpPath, $destPath); + $tmpRealPath = $this->_directory->getDriver()->getRealPath( + $this->_directory->getAbsolutePath($tmpPath) + ); + $destinationRealPath = $this->_directory->getDriver()->getRealPath( + $this->_directory->getAbsolutePath($destPath) + ); + $isSameFile = $tmpRealPath === $destinationRealPath; + return $isSameFile ?: $this->_directory->copyFile($tmpPath, $destPath); } else { return false; } From 57c8fec4da944a27bb973ba07a82be2b01620c15 Mon Sep 17 00:00:00 2001 From: Yaroslav Onischenko Date: Tue, 18 Aug 2015 16:02:56 +0300 Subject: [PATCH 03/31] MAGETWO-40862: Images are not uploaded with Import Procedure --- app/code/Magento/CatalogImportExport/Model/Import/Product.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product.php b/app/code/Magento/CatalogImportExport/Model/Import/Product.php index d383c671a6c82..7347dae4cacaf 100755 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product.php @@ -1752,7 +1752,7 @@ protected function _getUploader() $destinationDir = "catalog/product"; $destinationPath = $dirAddon . $DS . $this->_mediaDirectory->getRelativePath($destinationDir); - $this->_mediaDirectory->create($destinationDir); + $this->_mediaDirectory->create($destinationPath); if (!$this->_fileUploader->setDestDir($destinationPath)) { throw new \Magento\Framework\Exception\LocalizedException( __('File directory \'%1\' is not writable.', $destinationPath) From 56e3e556be6f092e07dc8a6930d01547d94f27eb Mon Sep 17 00:00:00 2001 From: Olexii Korshenko Date: Tue, 28 Jul 2015 13:10:49 +0300 Subject: [PATCH 04/31] MAGETWO-40559: [GITHUB] 1.0.0 Beta 1 JS Error when click 'Go to Checkout' button #1508 --- .../Customer/Autentication/ConfigPlugin.php | 37 ------------------- app/code/Magento/Checkout/etc/frontend/di.xml | 4 -- .../frontend/templates/onepage/link.phtml | 2 +- .../frontend/web/js/proceed-to-checkout.js | 2 +- 4 files changed, 2 insertions(+), 43 deletions(-) delete mode 100644 app/code/Magento/Checkout/Model/Customer/Autentication/ConfigPlugin.php diff --git a/app/code/Magento/Checkout/Model/Customer/Autentication/ConfigPlugin.php b/app/code/Magento/Checkout/Model/Customer/Autentication/ConfigPlugin.php deleted file mode 100644 index 834942a4d0719..0000000000000 --- a/app/code/Magento/Checkout/Model/Customer/Autentication/ConfigPlugin.php +++ /dev/null @@ -1,37 +0,0 @@ -urlBuilder = $urlBuilder; - } - - /** - * @param \Magento\Customer\Block\Account\AuthenticationPopup $subject - * @param array $result - * @return array - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - */ - public function afterGetConfig( - \Magento\Customer\Block\Account\AuthenticationPopup $subject, - array $result - ) { - $result['checkoutUrl'] = $this->urlBuilder->getUrl('checkout'); - return $result; - } -} diff --git a/app/code/Magento/Checkout/etc/frontend/di.xml b/app/code/Magento/Checkout/etc/frontend/di.xml index d0fa0a402b7e0..7afa91b1a8bbd 100644 --- a/app/code/Magento/Checkout/etc/frontend/di.xml +++ b/app/code/Magento/Checkout/etc/frontend/di.xml @@ -18,10 +18,6 @@ - - - diff --git a/app/code/Magento/Checkout/view/frontend/templates/onepage/link.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage/link.phtml index 72b8a5bf5023a..04a295afdce88 100644 --- a/app/code/Magento/Checkout/view/frontend/templates/onepage/link.phtml +++ b/app/code/Magento/Checkout/view/frontend/templates/onepage/link.phtml @@ -10,7 +10,7 @@