From 85691195f978b249ce1d12d7bb81fb952b7f216f Mon Sep 17 00:00:00 2001 From: Anton Kril <akril@ebay.com> Date: Wed, 11 Mar 2015 20:13:20 +0200 Subject: [PATCH] MAGETWO-33586: Shopping Cart is displayed partly broken if contains a Product with an image as a custom option (cherry picked from commit 87f8a69) --- .../Model/Product/Option/Type/File.php | 1 - .../Magento/Sales/Controller/Download.php | 30 ------------------- .../Download/DownloadCustomOption.php | 8 ++--- 3 files changed, 4 insertions(+), 35 deletions(-) delete mode 100644 app/code/Magento/Sales/Controller/Download.php diff --git a/app/code/Magento/Catalog/Model/Product/Option/Type/File.php b/app/code/Magento/Catalog/Model/Product/Option/Type/File.php index 058e6bea09a..d89d038144e 100644 --- a/app/code/Magento/Catalog/Model/Product/Option/Type/File.php +++ b/app/code/Magento/Catalog/Model/Product/Option/Type/File.php @@ -497,7 +497,6 @@ class File extends \Magento\Catalog\Model\Product\Option\Type\DefaultType $sizes = ''; if (!empty($value['width']) && !empty($value['height']) && $value['width'] > 0 && $value['height'] > 0) { $sizes = $value['width'] . ' x ' . $value['height'] . ' ' . __('px.'); - return [$value, $sizes]; } return $sizes; } diff --git a/app/code/Magento/Sales/Controller/Download.php b/app/code/Magento/Sales/Controller/Download.php deleted file mode 100644 index dc2d31878bc..00000000000 --- a/app/code/Magento/Sales/Controller/Download.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ -namespace Magento\Sales\Controller; - -use Magento\Framework\App\Action\Context; -use Magento\Sales\Model\Download as ModelDownload; - -/** - * Sales controller for download purposes - */ -class Download extends \Magento\Framework\App\Action\Action -{ - /** - * @var \Magento\Sales\Model\Download - */ - protected $_download; - - /** - * @param Context $context - * @param ModelDownload $download - */ - public function __construct(Context $context, ModelDownload $download) - { - $this->_download = $download; - parent::__construct($context); - } -} diff --git a/app/code/Magento/Sales/Controller/Download/DownloadCustomOption.php b/app/code/Magento/Sales/Controller/Download/DownloadCustomOption.php index aa5e0541fc8..ae18cf9d1bc 100644 --- a/app/code/Magento/Sales/Controller/Download/DownloadCustomOption.php +++ b/app/code/Magento/Sales/Controller/Download/DownloadCustomOption.php @@ -7,9 +7,9 @@ namespace Magento\Sales\Controller\Download; use Magento\Sales\Model\Download; -use Magento\Backend\App\Action\Context; +use \Magento\Framework\App\Action\Context; use Magento\Catalog\Model\Product\Type\AbstractType; -use Magento\Backend\Model\View\Result\ForwardFactory; +use \Magento\Framework\Controller\Result\ForwardFactory; class DownloadCustomOption extends \Magento\Framework\App\Action\Action { @@ -49,8 +49,8 @@ class DownloadCustomOption extends \Magento\Framework\App\Action\Action public function execute() { $quoteItemOptionId = $this->getRequest()->getParam('id'); - /** @var $option \Magento\Sales\Model\Quote\Item\Option */ - $option = $this->_objectManager->create('Magento\Sales\Model\Quote\Item\Option')->load($quoteItemOptionId); + /** @var $option \Magento\Quote\Model\Quote\Item\Option */ + $option = $this->_objectManager->create('Magento\Quote\Model\Quote\Item\Option')->load($quoteItemOptionId); /** @var \Magento\Framework\Controller\Result\Forward $resultForward */ $resultForward = $this->resultForwardFactory->create(); -- GitLab