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 058e6bea09a619b5859de0b3fa6da3f2eff23d33..d89d038144e44b449eaf3430baf382525207da13 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/Catalog/view/frontend/web/js/catalog-add-to-cart.js b/app/code/Magento/Catalog/view/frontend/web/js/catalog-add-to-cart.js index 74e1566a8dc5ba6f4691574491bbb6b7b65dcc43..faf107ba5487008c6652a589ae45f10571d235db 100644 --- a/app/code/Magento/Catalog/view/frontend/web/js/catalog-add-to-cart.js +++ b/app/code/Magento/Catalog/view/frontend/web/js/catalog-add-to-cart.js @@ -38,6 +38,16 @@ define([ }, submitForm: function(form) { + var self = this; + if (form.has('input[type="file"]').length) { + self.element.off('submit'); + form.submit(); + } else { + self.ajaxSubmit(form); + } + }, + + ajaxSubmit: function(form) { var self = this; $.ajax({ url: form.attr('action'), diff --git a/app/code/Magento/Sales/Controller/Download.php b/app/code/Magento/Sales/Controller/Download.php deleted file mode 100644 index dc2d31878bc5373fc1741c7cde49ac563bf7bc9c..0000000000000000000000000000000000000000 --- 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 aa5e0541fc896b059a7e881506ddbab43f50b03e..de556cb7ebf21884aad8570bae246277e60e8014 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(); diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php index 37f6f3e6f80aec5e058e10ac42ab5831466a3f8c..467197b587997ebb34184c3d1650963ffd311093 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php @@ -115,6 +115,7 @@ return [ ['Magento\Sales\Block\Adminhtml\Order\Shipment\View', 'Magento\Shipping\Block\Adminhtml\View'], ['Magento\Sales\Block\Order\Shipment\Items', 'Magento\Shipping\Block\Items'], ['Magento\Sales\Controller\Adminhtml\Order\Shipment', 'Magento\Shipping\Controller\Adminhtml\Order\Shipment'], + ['Magento\Sales\Controller\Download'], ['Magento\Sales\Block\Order\Shipment', 'Magento\Shipping\Block\Order\Shipment'], ['Mage_Adminhtml_Block_Sales_Order_Create_Customer_Grid'], ['Mage_Adminhtml_Block_Sales_Order_Create_Search_Grid_Renderer_Giftmessage'],