diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit.php index 96d204f7400e01651de1a2b2e75af3cec9c569a4..29f7d7227a290bac1a230be877481c0d9f3d4094 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit.php @@ -54,9 +54,9 @@ class Edit extends \Magento\Backend\Block\Widget\Form\Container $this->addButton( 'save_in_new_set', [ - 'label' => __('Save in New Product Template'), + 'label' => __('Save in New Attribute Set'), 'class' => 'save', - 'onclick' => 'saveAttributeInNewSet(\'' . __('Enter Name for New Product Template') . '\')' + 'onclick' => 'saveAttributeInNewSet(\'' . __('Enter Name for New Attribute Set') . '\')' ], 100 ); diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main.php index 34025f7fc5bcfbe5df6880ae4738c98acc19bd25..9215bdb305f892d29bfa6613dd9732f27d8b95dc 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main.php @@ -129,7 +129,7 @@ class Main extends \Magento\Backend\Block\Template 'label' => __('Delete'), 'onclick' => 'deleteConfirm(\'' . $this->escapeJsQuote( __( - 'You are about to delete all products in this product template. ' + 'You are about to delete all products in this attribute set. ' . 'Are you sure you want to do that?' ) ) . '\', \'' . $this->getUrl( @@ -187,7 +187,7 @@ class Main extends \Magento\Backend\Block\Template */ protected function _getHeader() { - return __("Edit Product Template '%1'", $this->_getAttributeSet()->getAttributeSetName()); + return __("Edit Attribute Set '%1'", $this->_getAttributeSet()->getAttributeSetName()); } /** diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main/Formset.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main/Formset.php index ab4bcab4dbf1d7602d34cc7a9c42a542c94ab0e6..ecfdb19e430251c3d84185273801787e569b7a42 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main/Formset.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main/Formset.php @@ -43,7 +43,7 @@ class Formset extends \Magento\Backend\Block\Widget\Form\Generic /** @var \Magento\Framework\Data\Form $form */ $form = $this->_formFactory->create(); - $fieldset = $form->addFieldset('set_name', ['legend' => __('Edit Product Template Name')]); + $fieldset = $form->addFieldset('set_name', ['legend' => __('Edit Attribute Set Name')]); $fieldset->addField( 'attribute_set_name', 'text', diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Toolbar/Add.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Toolbar/Add.php index 42434c7094c6464bc98657e856416e5109e80a36..f4f6dc467ca0d47cc86b782a7f55f7cd6befcada 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Toolbar/Add.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Toolbar/Add.php @@ -57,7 +57,7 @@ class Add extends \Magento\Backend\Block\Template */ protected function _getHeader() { - return __('Add New Product Template'); + return __('Add New Attribute Set'); } /** diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Toolbar/Main.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Toolbar/Main.php index cedf419205b6f704b1ebc4dd60009ea20beb4b55..a04f09439e1bc8811373dae7106817af955b421b 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Toolbar/Main.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Toolbar/Main.php @@ -27,7 +27,7 @@ class Main extends \Magento\Backend\Block\Template 'addButton', 'Magento\Backend\Block\Widget\Button', [ - 'label' => __('Add Product Template'), + 'label' => __('Add Attribute Set'), 'onclick' => 'setLocation(\'' . $this->getUrl('catalog/*/add') . '\')', 'class' => 'add primary add-set' ] @@ -48,7 +48,7 @@ class Main extends \Magento\Backend\Block\Template */ protected function _getHeader() { - return __('Product Templates'); + return __('Attribute Sets'); } /** diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/AttributeSet.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/AttributeSet.php index 5b8bb9a77fa3bc10528129cfa5097d3350776ddd..df7a36b961a3432f25387f9d332dbaabf333ca9f 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/AttributeSet.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/AttributeSet.php @@ -42,7 +42,7 @@ class AttributeSet extends \Magento\Backend\Block\Widget\Form public function getSelectorOptions() { return [ - 'source' => $this->getUrl('catalog/product/suggestProductTemplates'), + 'source' => $this->getUrl('catalog/product/suggestAttributeSets'), 'className' => 'category-select', 'showRecent' => true, 'storageKey' => 'product-template-key', diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Crosssell.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Crosssell.php index 8f6c08bb52bca13d6ded0f70f31ab034c9549d2f..09fbbd9b2a292c037815df8e1720a54f3e1b0bb9 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Crosssell.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Crosssell.php @@ -249,7 +249,7 @@ class Crosssell extends Extended $this->addColumn( 'set_name', [ - 'header' => __('Product Template'), + 'header' => __('Attribute Set'), 'index' => 'attribute_set_id', 'type' => 'options', 'options' => $sets, diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Related.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Related.php index 0e87290ec2729752ef2b35adcffa418ad3d8da9c..af104d601ac4e9a2d04dc08b7c27a3496ecbea30 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Related.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Related.php @@ -243,7 +243,7 @@ class Related extends Extended $this->addColumn( 'set_name', [ - 'header' => __('Product Template'), + 'header' => __('Attribute Set'), 'index' => 'attribute_set_id', 'type' => 'options', 'options' => $sets, diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Upsell.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Upsell.php index cad5aafe5d0ccfd2c4ee561e8f425a6d9695ea32..2ea563292e69c8bb8ccebcd77f96da2d20c2d76e 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Upsell.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Upsell.php @@ -239,7 +239,7 @@ class Upsell extends \Magento\Backend\Block\Widget\Grid\Extended $this->addColumn( 'set_name', [ - 'header' => __('Product Template'), + 'header' => __('Attribute Set'), 'index' => 'attribute_set_id', 'type' => 'options', 'options' => $sets, diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Grid.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Grid.php index e6f12259918729648a443e1310e05b196f2e7b25..e426c08e70a44e9ee178993f204901976683ba9f 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Grid.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Grid.php @@ -263,7 +263,7 @@ class Grid extends \Magento\Backend\Block\Widget\Grid\Extended $this->addColumn( 'set_name', [ - 'header' => __('Product Template'), + 'header' => __('Attribute Set'), 'index' => 'attribute_set_id', 'type' => 'options', 'options' => $sets, diff --git a/app/code/Magento/Catalog/Block/Product/TemplateSelector.php b/app/code/Magento/Catalog/Block/Product/TemplateSelector.php index 0fa415acf082b57e582d31793fa67e84a9a73006..e2cb3d356a6f40e6cd1e17b46aae73615b249565 100644 --- a/app/code/Magento/Catalog/Block/Product/TemplateSelector.php +++ b/app/code/Magento/Catalog/Block/Product/TemplateSelector.php @@ -54,7 +54,7 @@ class TemplateSelector extends \Magento\Framework\View\Element\Template } /** - * Retrieve list of product templates with search part contained in label + * Retrieve list of attribute sets with search part contained in label * * @param string $labelPart * @return array diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/AddAttributeToTemplate.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/AddAttributeToTemplate.php index 7d337411b0a234f947c20f243bce508de82a8481..26fea5b4039fdcf5b10dc72f2bd17f9ef501ac3e 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/AddAttributeToTemplate.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/AddAttributeToTemplate.php @@ -27,7 +27,7 @@ class AddAttributeToTemplate extends \Magento\Catalog\Controller\Adminhtml\Produ $this->resultJsonFactory = $resultJsonFactory; } /** - * Add attribute to product template + * Add attribute to attribute set * * @return \Magento\Framework\Controller\Result\Json */ diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Set/Add.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Set/Add.php index 81f61ec8362a54a1e3e094902ef15365e78ab056..7e4bee7a769130c5bee46b3ec708192811e79d7b 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Set/Add.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Set/Add.php @@ -37,7 +37,7 @@ class Add extends \Magento\Catalog\Controller\Adminhtml\Product\Set /** @var \Magento\Backend\Model\View\Result\Page $resultPage */ $resultPage = $this->resultPageFactory->create(); $resultPage->setActiveMenu('Magento_Catalog::catalog_attributes_sets'); - $resultPage->getConfig()->getTitle()->prepend(__('New Product Template')); + $resultPage->getConfig()->getTitle()->prepend(__('New Attribute Set')); $resultPage->addContent( $resultPage->getLayout()->createBlock('Magento\Catalog\Block\Adminhtml\Product\Attribute\Set\Toolbar\Add') ); diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Set/Delete.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Set/Delete.php index 9849dc6884732048424f4b95adc8782eca6954c9..9585bce699f5faa9b579089f3fbbd8313344b346 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Set/Delete.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Set/Delete.php @@ -36,7 +36,7 @@ class Delete extends \Magento\Catalog\Controller\Adminhtml\Product\Set $resultRedirect = $this->resultRedirectFactory->create(); try { $this->attributeSetRepository->deleteById($setId); - $this->messageManager->addSuccess(__('The product template has been removed.')); + $this->messageManager->addSuccess(__('The attribute set has been removed.')); $resultRedirect->setPath('catalog/*/'); } catch (\Exception $e) { $this->messageManager->addError(__('We can\'t delete this set right now.')); diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Set/Edit.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Set/Edit.php index d40982a5d5641e8d2c3a3099015686f5435e52b8..8f7dafbf28892ece98cc1c430d81d92f3ab536cf 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Set/Edit.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Set/Edit.php @@ -45,7 +45,7 @@ class Edit extends \Magento\Catalog\Controller\Adminhtml\Product\Set /** @var \Magento\Backend\Model\View\Result\Page $resultPage */ $resultPage = $this->resultPageFactory->create(); $resultPage->setActiveMenu('Magento_Catalog::catalog_attributes_sets'); - $resultPage->getConfig()->getTitle()->prepend(__('Product Templates')); + $resultPage->getConfig()->getTitle()->prepend(__('Attribute Sets')); $resultPage->getConfig()->getTitle()->prepend( $attributeSet->getId() ? $attributeSet->getAttributeSetName() : __('New Set') ); diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Set/Index.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Set/Index.php index 7b9edb21c7e2f8951643e51963411f2252b655a9..2e1e1a4b642f660595911445bc12a35777f82cf4 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Set/Index.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Set/Index.php @@ -37,9 +37,9 @@ class Index extends \Magento\Catalog\Controller\Adminhtml\Product\Set /** @var \Magento\Backend\Model\View\Result\Page $resultPage */ $resultPage = $this->resultPageFactory->create(); $resultPage->setActiveMenu('Magento_Catalog::catalog_attributes_sets'); - $resultPage->getConfig()->getTitle()->prepend(__('Product Templates')); + $resultPage->getConfig()->getTitle()->prepend(__('Attribute Sets')); $resultPage->addBreadcrumb(__('Catalog'), __('Catalog')); - $resultPage->addBreadcrumb(__('Manage Product Templates'), __('Product Templates')); + $resultPage->addBreadcrumb(__('Manage Attribute Sets'), __('Attribute Sets')); return $resultPage; } } diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Set/Save.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Set/Save.php index 5870190db02b73a9bbae7b804d0ad1e75b8acfe5..480a079d53d7ee70d77f3f7f0c048a31d2cdaac6 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Set/Save.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Set/Save.php @@ -82,7 +82,7 @@ class Save extends \Magento\Catalog\Controller\Adminhtml\Product\Set } if (!$model->getId()) { throw new \Magento\Framework\Exception\LocalizedException( - __('This product template no longer exists.') + __('This attribute set no longer exists.') ); } $data = $this->_objectManager->get('Magento\Framework\Json\Helper\Data') @@ -100,12 +100,12 @@ class Save extends \Magento\Catalog\Controller\Adminhtml\Product\Set $model->initFromSkeleton($this->getRequest()->getParam('skeleton_set')); } $model->save(); - $this->messageManager->addSuccess(__('You saved the product template.')); + $this->messageManager->addSuccess(__('You saved the attribute set.')); } catch (\Magento\Framework\Exception\LocalizedException $e) { $this->messageManager->addError($e->getMessage()); $hasError = true; } catch (\Exception $e) { - $this->messageManager->addException($e, __('Something went wrong while saving the product template.')); + $this->messageManager->addException($e, __('Something went wrong while saving the attribute set.')); $hasError = true; } diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/SuggestProductTemplates.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/SuggestAttributeSets.php similarity index 92% rename from app/code/Magento/Catalog/Controller/Adminhtml/Product/SuggestProductTemplates.php rename to app/code/Magento/Catalog/Controller/Adminhtml/Product/SuggestAttributeSets.php index d28b72799e770cebf089341b9749125141baefdf..456a579c6191d9a284e0cf7f5f16a99d38e317d3 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/SuggestProductTemplates.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/SuggestAttributeSets.php @@ -6,7 +6,7 @@ */ namespace Magento\Catalog\Controller\Adminhtml\Product; -class SuggestProductTemplates extends \Magento\Backend\App\Action +class SuggestAttributeSets extends \Magento\Backend\App\Action { /** * @var \Magento\Framework\Controller\Result\JsonFactory @@ -34,7 +34,7 @@ class SuggestProductTemplates extends \Magento\Backend\App\Action } /** - * Action for product template selector + * Action for attribute set selector * * @return \Magento\Framework\Controller\Result\Json */ diff --git a/app/code/Magento/Catalog/Helper/Product/Flat/Indexer.php b/app/code/Magento/Catalog/Helper/Product/Flat/Indexer.php index a54b13b3d6fbc9742cfc1f9571bb9981b11c6849..b88dac52725b279759f938ea53cb5d789c5dfa5f 100644 --- a/app/code/Magento/Catalog/Helper/Product/Flat/Indexer.php +++ b/app/code/Magento/Catalog/Helper/Product/Flat/Indexer.php @@ -204,7 +204,7 @@ class Indexer extends \Magento\Framework\App\Helper\AbstractHelper 'unsigned' => true, 'nullable' => false, 'default' => '0', - 'comment' => 'Product Template ID', + 'comment' => 'Attribute Set ID', ]; $columns['type_id'] = [ 'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, diff --git a/app/code/Magento/Catalog/Model/Product/AttributeSet/Build.php b/app/code/Magento/Catalog/Model/Product/AttributeSet/Build.php index 7c5be52e6d7e89e9d387a0d6c5e5d63f66af9d61..a70ae163575947f344ad368f1b56f950f56fe6b7 100644 --- a/app/code/Magento/Catalog/Model/Product/AttributeSet/Build.php +++ b/app/code/Magento/Catalog/Model/Product/AttributeSet/Build.php @@ -79,7 +79,7 @@ class Build $attributeSet = $this->attributeSetFactory->create(); $attributeSet->setEntityTypeId($this->entityTypeId)->load($this->name, 'attribute_set_name'); if ($attributeSet->getId()) { - throw new AlreadyExistsException(__('Product Template already exists.')); + throw new AlreadyExistsException(__('Attribute Set already exists.')); } $attributeSet->setAttributeSetName($this->name)->validate(); diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Product.php b/app/code/Magento/Catalog/Model/ResourceModel/Product.php index b4d5298035dadab55cb0158a5ef72d64226d4253..130cd77177306433c5a9202e3ae85906f03ed516 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Product.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Product.php @@ -656,7 +656,7 @@ class Product extends AbstractResource $entityType = $this->typeFactory->create()->loadByCode(\Magento\Catalog\Model\Product::ENTITY); $attributeSet = $this->setFactory->create()->load($object->getAttributeSetId()); if ($attributeSet->getEntityTypeId() != $entityType->getId()) { - return ['attribute_set' => 'Invalid product template entity type']; + return ['attribute_set' => 'Invalid attribute set entity type']; } return parent::validate($object); diff --git a/app/code/Magento/Catalog/Setup/InstallSchema.php b/app/code/Magento/Catalog/Setup/InstallSchema.php index c507f35db664497d5a59c4f45a5e458833dde4d2..927dd2596cb2951597bb2b81e98ec24cd2913702 100644 --- a/app/code/Magento/Catalog/Setup/InstallSchema.php +++ b/app/code/Magento/Catalog/Setup/InstallSchema.php @@ -42,7 +42,7 @@ class InstallSchema implements InstallSchemaInterface \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT, null, ['unsigned' => true, 'nullable' => false, 'default' => '0'], - 'Product Template ID' + 'Attribute Set ID' ) ->addColumn( 'type_id', diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Product/Media/AttributeManagementTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Product/Media/AttributeManagementTest.php index 3e8a85a77166a9facfa71e6aa0b011cd07bde981..cc65bb7803ba8d52983564708deb9ee0cdb779f4 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Product/Media/AttributeManagementTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Product/Media/AttributeManagementTest.php @@ -58,7 +58,7 @@ class AttributeManagementTest extends \PHPUnit_Framework_TestCase public function testGetList() { - $attributeSetName = 'Default Product Template'; + $attributeSetName = 'Default Attribute Set'; $expectedResult = [ $this->getMock('\Magento\Catalog\Api\Data\ProductAttributeInterface'), ]; diff --git a/app/code/Magento/Catalog/Test/Unit/Model/ResourceModel/ProductTest.php b/app/code/Magento/Catalog/Test/Unit/Model/ResourceModel/ProductTest.php index 9967344b70e8da0c9f50a1995647fa7afb3fd96d..d3c8792274104fc65aabdc4c72fce36acfc411b3 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/ResourceModel/ProductTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/ResourceModel/ProductTest.php @@ -56,7 +56,7 @@ class ProductTest extends \PHPUnit_Framework_TestCase public function testValidateWrongAttributeSet() { $productTypeId = 4; - $expectedErrorMessage = ['attribute_set' => 'Invalid product template entity type']; + $expectedErrorMessage = ['attribute_set' => 'Invalid attribute set entity type']; $productMock = $this->getMock( '\Magento\Framework\DataObject', diff --git a/app/code/Magento/Catalog/etc/acl.xml b/app/code/Magento/Catalog/etc/acl.xml index 0811d1393129b0dc6ef29ae61fc8793474b6bd78..0fc34da2584446847da5ab5234563d05c0ee8d46 100644 --- a/app/code/Magento/Catalog/etc/acl.xml +++ b/app/code/Magento/Catalog/etc/acl.xml @@ -24,7 +24,7 @@ <resource id="Magento_Backend::stores_attributes"> <resource id="Magento_Catalog::attributes_attributes" title="Product" sortOrder="30" /> <resource id="Magento_Catalog::update_attributes" title="Update Attributes" sortOrder="35" /> - <resource id="Magento_Catalog::sets" title="Product Template" sortOrder="40"/> + <resource id="Magento_Catalog::sets" title="Attribute Set" sortOrder="40"/> </resource> </resource> </resource> diff --git a/app/code/Magento/Catalog/etc/adminhtml/menu.xml b/app/code/Magento/Catalog/etc/adminhtml/menu.xml index 0d9783b0fea0af781b38b548aa6a26cf8abf00d7..53db61bd3a1ccdf477672bc10d74c00c76e8156f 100644 --- a/app/code/Magento/Catalog/etc/adminhtml/menu.xml +++ b/app/code/Magento/Catalog/etc/adminhtml/menu.xml @@ -11,7 +11,7 @@ <add id="Magento_Catalog::catalog_products" title="Catalog" module="Magento_Catalog" sortOrder="10" parent="Magento_Catalog::inventory" action="catalog/product/" resource="Magento_Catalog::products"/> <add id="Magento_Catalog::catalog_categories" title="Categories" module="Magento_Catalog" sortOrder="20" parent="Magento_Catalog::inventory" action="catalog/category/" resource="Magento_Catalog::categories"/> <add id="Magento_Catalog::catalog_attributes_attributes" title="Product" module="Magento_Catalog" sortOrder="30" parent="Magento_Backend::stores_attributes" action="catalog/product_attribute/" resource="Magento_Catalog::attributes_attributes"/> - <add id="Magento_Catalog::catalog_attributes_sets" title="Product Template" module="Magento_Catalog" sortOrder="40" parent="Magento_Backend::stores_attributes" action="catalog/product_set/" resource="Magento_Catalog::sets"/> + <add id="Magento_Catalog::catalog_attributes_sets" title="Attribute Set" module="Magento_Catalog" sortOrder="40" parent="Magento_Backend::stores_attributes" action="catalog/product_set/" resource="Magento_Catalog::sets"/> <add id="Magento_Catalog::inventory" title="Inventory" module="Magento_Catalog" sortOrder="10" parent="Magento_Catalog::catalog" dependsOnModule="Magento_Catalog" resource="Magento_Catalog::catalog"/> </menu> diff --git a/app/code/Magento/Catalog/i18n/de_DE.csv b/app/code/Magento/Catalog/i18n/de_DE.csv index ecbd2cb02116bf9af5c3f6ac5bae02811a89a110..835c5a2fa1b3305b8fc0e01ebf16d18ae6fbd9e6 100644 --- a/app/code/Magento/Catalog/i18n/de_DE.csv +++ b/app/code/Magento/Catalog/i18n/de_DE.csv @@ -160,7 +160,7 @@ Empty,Leer "Based On","Basierend auf" "Add New Attribute Set","Neuer Eigenschaftensatz hinzufügen" "Add New Set","Neuen Satz hinzufügen" -"Product Templates","Product Templates" +"Attribute Sets","Attribute Sets" "Close Window","Fenster Schließen" "New Product","Neues Produkt" "Save & Edit","Save & Edit" @@ -280,7 +280,7 @@ Categories,Kategorien "This attribute set no longer exists.","Dieses Eigenschaftenset existiert nicht mehr." "You saved the attribute set.","You saved the attribute set." "An error occurred while saving the attribute set.","Beim Speichern des Eigenschaftensatzes ist ein Fehler aufgetreten." -"New Product Template","New Product Template" +"New Attribute Set","New Attribute Set" "The attribute set has been removed.","The attribute set has been removed." "An error occurred while deleting this set.","An error occurred while deleting this set." "Search Terms","Search Terms" diff --git a/app/code/Magento/Catalog/i18n/en_US.csv b/app/code/Magento/Catalog/i18n/en_US.csv index 2cfe7083932dd18f5c4e4082eb80fe321b2ee809..e6583169c3b1a16c97bf0eca7337860fe333ffc2 100644 --- a/app/code/Magento/Catalog/i18n/en_US.csv +++ b/app/code/Magento/Catalog/i18n/en_US.csv @@ -160,7 +160,7 @@ Empty,Empty "Based On","Based On" "Add New Attribute Set","Add New Attribute Set" "Add New Set","Add New Set" -"Product Templates","Product Templates" +"Attribute Sets","Attribute Sets" "Close Window","Close Window" "New Product","New Product" "Save & Edit","Save & Edit" @@ -280,7 +280,7 @@ Categories,Categories "This attribute set no longer exists.","This attribute set no longer exists." "You saved the attribute set.","You saved the attribute set." "An error occurred while saving the attribute set.","An error occurred while saving the attribute set." -"New Product Template","New Product Template" +"New Attribute Set","New Attribute Set" "The attribute set has been removed.","The attribute set has been removed." "An error occurred while deleting this set.","An error occurred while deleting this set." "Search Terms","Search Terms" diff --git a/app/code/Magento/Catalog/i18n/es_ES.csv b/app/code/Magento/Catalog/i18n/es_ES.csv index 83b48a5ad10cb4176b43d2cd321bb4e2a15c1e94..2c45038e94f15121b8bad82417b80686d512e8b0 100644 --- a/app/code/Magento/Catalog/i18n/es_ES.csv +++ b/app/code/Magento/Catalog/i18n/es_ES.csv @@ -160,7 +160,7 @@ Empty,VacÃo(a) "Based On","Basado en" "Add New Attribute Set","Agregar nuevo conjunto de atributos" "Add New Set","Agregar nuevo conjunto" -"Product Templates","Product Templates" +"Attribute Sets","Attribute Sets" "Close Window","Cerrar Ventana" "New Product","Nuevo producto" "Save & Edit","Save & Edit" @@ -280,7 +280,7 @@ Categories,CategorÃas "This attribute set no longer exists.","Este conjunto de atributos ya no existe." "You saved the attribute set.","You saved the attribute set." "An error occurred while saving the attribute set.","Se produjo un error mientras se guardaba el conjunto de atributos." -"New Product Template","New Product Template" +"New Attribute Set","New Attribute Set" "The attribute set has been removed.","The attribute set has been removed." "An error occurred while deleting this set.","An error occurred while deleting this set." "Search Terms","Search Terms" diff --git a/app/code/Magento/Catalog/i18n/fr_FR.csv b/app/code/Magento/Catalog/i18n/fr_FR.csv index 62cb82be609505db81ff49c6c1300a2416c2ed6c..37740e1e7db80830df449d9616672fcba40c8ca2 100644 --- a/app/code/Magento/Catalog/i18n/fr_FR.csv +++ b/app/code/Magento/Catalog/i18n/fr_FR.csv @@ -160,7 +160,7 @@ Empty,Vide "Based On","Basé sur" "Add New Attribute Set","Ajouter un nouveau jeu d'attributs" "Add New Set","Ajouter une nouvelle série" -"Product Templates","Product Templates" +"Attribute Sets","Attribute Sets" "Close Window","Fermer la fenêtre" "New Product","Nouveau produit" "Save & Edit","Save & Edit" @@ -280,7 +280,7 @@ Categories,catégories "This attribute set no longer exists.","La série d'attributs n'existe plus." "You saved the attribute set.","You saved the attribute set." "An error occurred while saving the attribute set.","Une erreur est survenue pendant la sauvegarde de la série d'attributs." -"New Product Template","New Product Template" +"New Attribute Set","New Attribute Set" "The attribute set has been removed.","The attribute set has been removed." "An error occurred while deleting this set.","An error occurred while deleting this set." "Search Terms","Search Terms" diff --git a/app/code/Magento/Catalog/i18n/nl_NL.csv b/app/code/Magento/Catalog/i18n/nl_NL.csv index ee1eb9baee9d9cad43ceabb2583b62b7a104c181..650ef8463833457672dacf24b1c669ff075b7cf7 100644 --- a/app/code/Magento/Catalog/i18n/nl_NL.csv +++ b/app/code/Magento/Catalog/i18n/nl_NL.csv @@ -160,7 +160,7 @@ Empty,Leeg "Based On","Gebaseerd op" "Add New Attribute Set","Voeg Nieuwe Attribuut Set toe" "Add New Set","Voeg Nieuwe Reeks Toe" -"Product Templates","Product Templates" +"Attribute Sets","Attribute Sets" "Close Window","Venster Sluiten" "New Product","Nieuw Product" "Save & Edit","Save & Edit" @@ -280,7 +280,7 @@ Categories,Categoriën "This attribute set no longer exists.","Deze attribuutset bestaat niet meer." "You saved the attribute set.","You saved the attribute set." "An error occurred while saving the attribute set.","Er is een fout opgetreden tijdens het opslaan van de attribuut set." -"New Product Template","New Product Template" +"New Attribute Set","New Attribute Set" "The attribute set has been removed.","The attribute set has been removed." "An error occurred while deleting this set.","An error occurred while deleting this set." "Search Terms","Search Terms" diff --git a/app/code/Magento/Catalog/i18n/pt_BR.csv b/app/code/Magento/Catalog/i18n/pt_BR.csv index 3e0887c87547d57e94da6a9b472d1ee69de8e43a..d2c337913df3a40bf24326c1a74b11fc5b634ca0 100644 --- a/app/code/Magento/Catalog/i18n/pt_BR.csv +++ b/app/code/Magento/Catalog/i18n/pt_BR.csv @@ -160,7 +160,7 @@ Empty,Vazio "Based On","Baseado Em" "Add New Attribute Set","Adicionar Novo Conjunto de Atributos" "Add New Set","Adicionar Novo Conjunto" -"Product Templates","Product Templates" +"Attribute Sets","Attribute Sets" "Close Window","Fechar Janela" "New Product","Novo Produto" "Save & Edit","Save & Edit" @@ -280,7 +280,7 @@ Categories,Categorias "This attribute set no longer exists.","Este conjunto de atributos não existe mais." "You saved the attribute set.","You saved the attribute set." "An error occurred while saving the attribute set.","Ocorreu um erro ao salvar o conjunto de atributos." -"New Product Template","New Product Template" +"New Attribute Set","New Attribute Set" "The attribute set has been removed.","The attribute set has been removed." "An error occurred while deleting this set.","An error occurred while deleting this set." "Search Terms","Search Terms" diff --git a/app/code/Magento/Catalog/i18n/zh_Hans_CN.csv b/app/code/Magento/Catalog/i18n/zh_Hans_CN.csv index 4774b64706d9a98e98551936c7629de04c5050ac..ed8938feb0f02af531fbbdf9916ff33521d5c849 100644 --- a/app/code/Magento/Catalog/i18n/zh_Hans_CN.csv +++ b/app/code/Magento/Catalog/i18n/zh_Hans_CN.csv @@ -160,7 +160,7 @@ Empty,空 "Based On",基于 "Add New Attribute Set",æ·»åŠ æ–°å±žæ€§é›† "Add New Set",æ·»åŠ æ–°é›† -"Product Templates","Product Templates" +"Attribute Sets","Attribute Sets" "Close Window",å…³é—çª—å£ "New Product",æ–°äº§å“ "Save & Edit","Save & Edit" @@ -280,7 +280,7 @@ Categories,分类 "This attribute set no longer exists.",该属性已ä¸å˜åœ¨ã€‚ "You saved the attribute set.","You saved the attribute set." "An error occurred while saving the attribute set.",ä¿å˜å±žæ€§é›†æ—¶å‘生错误。 -"New Product Template","New Product Template" +"New Attribute Set","New Attribute Set" "The attribute set has been removed.","The attribute set has been removed." "An error occurred while deleting this set.","An error occurred while deleting this set." "Search Terms","Search Terms" diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/main.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/main.phtml index 06edcfbaa2588ae285fac4a456ec0ae5c05b8846..dc12f76eb2f1a5b6d1da56c4f63acee1ee27a716 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/main.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/main.phtml @@ -354,7 +354,7 @@ rightBeforeAppend : function(tree, nodeThis, node, newParent) { if (node.attributes.is_user_defined == 0) { alert({ - content: '<?php /* @escapeNotVerified */ echo $block->escapeJsQuote(__('You can\'t remove attributes from this product template.')) ?>' + content: '<?php /* @escapeNotVerified */ echo $block->escapeJsQuote(__('You can\'t remove attributes from this attribute set.')) ?>' }); return false; } else { @@ -370,7 +370,7 @@ if (node.attributes.is_unassignable == 0) { alert({ - content: '<?php /* @escapeNotVerified */ echo $block->escapeJsQuote(__('You can\'t remove attributes from this product template.')) ?>' + content: '<?php /* @escapeNotVerified */ echo $block->escapeJsQuote(__('You can\'t remove attributes from this attribute set.')) ?>' }); return false; } else { diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product.php b/app/code/Magento/CatalogImportExport/Model/Import/Product.php index a2a98fcdbc51ed0b8c57a0a779da126b43bdff50..24475736833f8cbcbda2528614e5f3d3573b2e53 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product.php @@ -207,7 +207,7 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity ValidatorInterface::ERROR_INVALID_SCOPE => 'Invalid value in Scope column', ValidatorInterface::ERROR_INVALID_WEBSITE => 'Invalid value in Website column (website does not exists?)', ValidatorInterface::ERROR_INVALID_STORE => 'Invalid value in Store column (store doesn\'t exist?)', - ValidatorInterface::ERROR_INVALID_ATTR_SET => 'Invalid value for Product Template column (set doesn\'t exist?)', + ValidatorInterface::ERROR_INVALID_ATTR_SET => 'Invalid value for Attribute Set column (set doesn\'t exist?)', ValidatorInterface::ERROR_INVALID_TYPE => 'Product Type is invalid or not supported', ValidatorInterface::ERROR_INVALID_CATEGORY => 'Category does not exists', ValidatorInterface::ERROR_VALUE_IS_REQUIRED => 'Please make sure attribute "%s" is not empty.', @@ -217,7 +217,7 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity ValidatorInterface::ERROR_CHANGE_TYPE => 'Product type change is not allowed', ValidatorInterface::ERROR_DUPLICATE_SCOPE => 'Duplicate scope', ValidatorInterface::ERROR_DUPLICATE_SKU => 'Duplicate SKU', - ValidatorInterface::ERROR_CHANGE_ATTR_SET => 'Product template change is not allowed', + ValidatorInterface::ERROR_CHANGE_ATTR_SET => 'Attribute set change is not allowed', ValidatorInterface::ERROR_TYPE_UNSUPPORTED => 'Product type is not supported', ValidatorInterface::ERROR_ROW_IS_ORPHAN => 'Orphan rows that will be skipped due default row errors', ValidatorInterface::ERROR_INVALID_TIER_PRICE_QTY => 'Tier Price data price or quantity value is invalid', diff --git a/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/ProductTemplate/Form.php b/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/AttributeSet/Form.php similarity index 93% rename from app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/ProductTemplate/Form.php rename to app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/AttributeSet/Form.php index 09370fdce3e72ac650a640a1096bf6b62b8582a4..65c88dd19a05faeac5fc7ef50208bd646d94ad34 100644 --- a/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/ProductTemplate/Form.php +++ b/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/AttributeSet/Form.php @@ -7,7 +7,7 @@ /** * Product attribute set selector form */ -namespace Magento\ConfigurableProduct\Block\Adminhtml\Product\Edit\ProductTemplate; +namespace Magento\ConfigurableProduct\Block\Adminhtml\Product\Edit\AttributeSet; class Form extends \Magento\Backend\Block\Widget\Form\Generic { @@ -57,7 +57,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic 'radio', [ 'after_element_html' => __( - 'Add configurable attributes to the current Product Template ("%1")', + 'Add configurable attributes to the current Attribute Set ("%1")', sprintf('<span data-role="name-container">%s</span>', $this->getCurrentAttributeSetName()) ), 'name' => 'affected-attribute-set', @@ -70,7 +70,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic 'new-affected-attribute-set', 'radio', [ - 'after_element_html' => __('Add configurable attributes to the new Product Template based on current'), + 'after_element_html' => __('Add configurable attributes to the new Attribute Set based on current'), 'name' => 'affected-attribute-set', 'class' => 'admin__control-radio', 'value' => 'new' @@ -80,7 +80,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic 'new-attribute-set-name', 'text', [ - 'label' => __('New product template name'), + 'label' => __('New attribute set name'), 'name' => 'new-attribute-set-name', 'required' => true, 'css_class' => 'no-display', @@ -92,7 +92,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic 'existing-affected-attribute-set', 'radio', [ - 'after_element_html' => __('Add configurable attributes to the existing Product Template'), + 'after_element_html' => __('Add configurable attributes to the existing Attribute Set'), 'name' => 'affected-attribute-set', 'required' => true, 'class' => 'admin__control-radio no-display', @@ -103,7 +103,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic 'choose-affected-attribute-set', 'select', [ - 'label' => __('Choose existing Product Template'), + 'label' => __('Choose existing Attribute Set'), 'name' => 'attribute-set-name', 'required' => true, 'css_class' => 'no-display', diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/layout/catalog_product_new.xml b/app/code/Magento/ConfigurableProduct/view/adminhtml/layout/catalog_product_new.xml index b6683bdeca4a7f6866a9adc90581af1e59afc2f4..322360d8703f9e443d3537c72576dbd42b29d7a9 100644 --- a/app/code/Magento/ConfigurableProduct/view/adminhtml/layout/catalog_product_new.xml +++ b/app/code/Magento/ConfigurableProduct/view/adminhtml/layout/catalog_product_new.xml @@ -16,7 +16,7 @@ </referenceContainer> <referenceContainer name="content"> <block class="Magento\Framework\View\Element\Template" name="affected-attribute-set-selector" template="Magento_ConfigurableProduct::product/configurable/affected-attribute-set-selector/form.phtml"> - <block class="Magento\ConfigurableProduct\Block\Adminhtml\Product\Edit\ProductTemplate\Form" name="affected-attribute-set-form" /> + <block class="Magento\ConfigurableProduct\Block\Adminhtml\Product\Edit\AttributeSet\Form" name="affected-attribute-set-form" /> </block> </referenceContainer> </body> diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/attribute/set/js.phtml b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/attribute/set/js.phtml index ea036bbf5d6c0eedfd3cb70d46125ac1d9c80938..c9aeeddfd2b308a70cf84347113ca4c3a5437a00 100644 --- a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/attribute/set/js.phtml +++ b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/attribute/set/js.phtml @@ -40,7 +40,7 @@ editSet.submit = editSet.submit.wrap(function(original) { editSet.rightBeforeAppend = editSet.rightBeforeAppend.wrap(function(original, tree, nodeThis, node, newParent) { if (node.attributes.is_configurable == 1) { alert({ - content: '<?php /* @escapeNotVerified */ echo $block->escapeJsQuote(__('This attribute is used in configurable products. You cannot remove it from the product template.')) ?>' + content: '<?php /* @escapeNotVerified */ echo $block->escapeJsQuote(__('This attribute is used in configurable products. You cannot remove it from the attribute set.')) ?>' }); return false; } @@ -50,7 +50,7 @@ editSet.rightBeforeAppend = editSet.rightBeforeAppend.wrap(function(original, tr editSet.rightBeforeInsert = editSet.rightBeforeInsert.wrap(function(original, tree, nodeThis, node, newParent) { if (node.attributes.is_configurable == 1) { alert({ - content: '<?php /* @escapeNotVerified */ echo $block->escapeJsQuote(__('This attribute is used in configurable products. You cannot remove it from the product template.')) ?>' + content: '<?php /* @escapeNotVerified */ echo $block->escapeJsQuote(__('This attribute is used in configurable products. You cannot remove it from the attribute set.')) ?>' }); return false; } diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/product/configurable/affected-attribute-set-selector/js.phtml b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/product/configurable/affected-attribute-set-selector/js.phtml index 3f192bc072f9a7f9fa54393cf3eb22d9bc5eaa77..4716938b4a0942d305a2a529e2ea29d995dc8366 100644 --- a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/product/configurable/affected-attribute-set-selector/js.phtml +++ b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/product/configurable/affected-attribute-set-selector/js.phtml @@ -48,7 +48,7 @@ $form .modal({ - title: '<?php /* @escapeNotVerified */ echo __('Choose Affected Product Template'); ?>', + title: '<?php /* @escapeNotVerified */ echo __('Choose Affected Attribute Set'); ?>', closed: function () { resetValidation(); }, diff --git a/app/code/Magento/LayeredNavigation/view/frontend/layout/1column.xml b/app/code/Magento/LayeredNavigation/view/frontend/layout/1column.xml deleted file mode 100644 index 4d0318516508c3d23b6eea467edf8f855f3352c3..0000000000000000000000000000000000000000 --- a/app/code/Magento/LayeredNavigation/view/frontend/layout/1column.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd" label="All One-Column Layout Pages" design_abstraction="page_layout"> - <body> - <move element="catalog.leftnav" destination="content.top" after="-"/> - </body> -</page> diff --git a/app/code/Magento/LayeredNavigation/view/frontend/layout/2columns-left.xml b/app/code/Magento/LayeredNavigation/view/frontend/layout/2columns-left.xml deleted file mode 100644 index 7b679489fe942bc693b9948de94883e4bcab25cd..0000000000000000000000000000000000000000 --- a/app/code/Magento/LayeredNavigation/view/frontend/layout/2columns-left.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd" label="All Two-Column Layout Pages (Left Column)" design_abstraction="page_layout"> - <body> - <move element="catalog.leftnav" destination="sidebar.main" before="-"/> - </body> -</page> diff --git a/app/code/Magento/LayeredNavigation/view/frontend/layout/2columns-right.xml b/app/code/Magento/LayeredNavigation/view/frontend/layout/2columns-right.xml deleted file mode 100644 index 5e8b8e338716d710d43d7859a77557443cb0662e..0000000000000000000000000000000000000000 --- a/app/code/Magento/LayeredNavigation/view/frontend/layout/2columns-right.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd" label="All Two-Column Layout Pages (Right Column)" design_abstraction="page_layout"> - <body> - <move element="catalog.leftnav" destination="sidebar.main" before="-"/> - </body> -</page> diff --git a/app/code/Magento/LayeredNavigation/view/frontend/layout/3columns.xml b/app/code/Magento/LayeredNavigation/view/frontend/layout/3columns.xml deleted file mode 100644 index 5b97b56d83d48958b92d9db9860d2c9f6b574a3e..0000000000000000000000000000000000000000 --- a/app/code/Magento/LayeredNavigation/view/frontend/layout/3columns.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd" label="All Three-Column Layout Pages" design_abstraction="page_layout"> - <body> - <move element="catalog.leftnav" destination="sidebar.main" before="-"/> - </body> -</page> diff --git a/app/code/Magento/LayeredNavigation/view/frontend/layout/page_empty.xml b/app/code/Magento/LayeredNavigation/view/frontend/layout/page_empty.xml deleted file mode 100644 index aaf387bdfdea016140bcf8e179ddd1174013d721..0000000000000000000000000000000000000000 --- a/app/code/Magento/LayeredNavigation/view/frontend/layout/page_empty.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Copyright © 2015 Magento. All rights reserved. - * See COPYING.txt for license details. - */ ---> -<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd" label="All Empty Layout Pages" design_abstraction="page_layout"> - <body> - <move element="catalog.leftnav" destination="category.product.list.additional" before="-"/> - </body> -</page> diff --git a/app/code/Magento/LayeredNavigation/view/frontend/page_layout/1column.xml b/app/code/Magento/LayeredNavigation/view/frontend/page_layout/1column.xml new file mode 100644 index 0000000000000000000000000000000000000000..d35beff77e8b896b26611c0cf123e88e1bcf4919 --- /dev/null +++ b/app/code/Magento/LayeredNavigation/view/frontend/page_layout/1column.xml @@ -0,0 +1,10 @@ +<?xml version="1.0"?> +<!-- +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd"> + <move element="catalog.leftnav" destination="content.top" after="-"/> +</layout> diff --git a/app/code/Magento/LayeredNavigation/view/frontend/page_layout/2columns-left.xml b/app/code/Magento/LayeredNavigation/view/frontend/page_layout/2columns-left.xml new file mode 100644 index 0000000000000000000000000000000000000000..94286e3cd4d3ea68ea42680dffa5cf51eff52af2 --- /dev/null +++ b/app/code/Magento/LayeredNavigation/view/frontend/page_layout/2columns-left.xml @@ -0,0 +1,10 @@ +<?xml version="1.0"?> +<!-- +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd"> + <move element="catalog.leftnav" destination="sidebar.main" before="-"/> +</layout> diff --git a/app/code/Magento/LayeredNavigation/view/frontend/page_layout/2columns-right.xml b/app/code/Magento/LayeredNavigation/view/frontend/page_layout/2columns-right.xml new file mode 100644 index 0000000000000000000000000000000000000000..94286e3cd4d3ea68ea42680dffa5cf51eff52af2 --- /dev/null +++ b/app/code/Magento/LayeredNavigation/view/frontend/page_layout/2columns-right.xml @@ -0,0 +1,10 @@ +<?xml version="1.0"?> +<!-- +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd"> + <move element="catalog.leftnav" destination="sidebar.main" before="-"/> +</layout> diff --git a/app/code/Magento/LayeredNavigation/view/frontend/page_layout/3columns.xml b/app/code/Magento/LayeredNavigation/view/frontend/page_layout/3columns.xml new file mode 100644 index 0000000000000000000000000000000000000000..94286e3cd4d3ea68ea42680dffa5cf51eff52af2 --- /dev/null +++ b/app/code/Magento/LayeredNavigation/view/frontend/page_layout/3columns.xml @@ -0,0 +1,10 @@ +<?xml version="1.0"?> +<!-- +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd"> + <move element="catalog.leftnav" destination="sidebar.main" before="-"/> +</layout> diff --git a/app/code/Magento/LayeredNavigation/view/frontend/page_layout/empty.xml b/app/code/Magento/LayeredNavigation/view/frontend/page_layout/empty.xml new file mode 100644 index 0000000000000000000000000000000000000000..6a45bb383141099dd4d367120ecfe131c77fa4c7 --- /dev/null +++ b/app/code/Magento/LayeredNavigation/view/frontend/page_layout/empty.xml @@ -0,0 +1,10 @@ +<?xml version="1.0"?> +<!-- +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ +--> +<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd"> + <move element="catalog.leftnav" destination="category.product.list.additional" before="-"/> +</layout> diff --git a/app/code/Magento/Paypal/Block/Adminhtml/Billing/Agreement/View/Tab/Orders.php b/app/code/Magento/Paypal/Block/Adminhtml/Billing/Agreement/View/Tab/Orders.php index df81fff83bd338742a921f399696ba8a58f9dcd2..f8b577df7c12c971b564084e76211ce3744ba1ca 100644 --- a/app/code/Magento/Paypal/Block/Adminhtml/Billing/Agreement/View/Tab/Orders.php +++ b/app/code/Magento/Paypal/Block/Adminhtml/Billing/Agreement/View/Tab/Orders.php @@ -8,20 +8,54 @@ namespace Magento\Paypal\Block\Adminhtml\Billing\Agreement\View\Tab; +use Magento\Paypal\Model\ResourceModel\Billing\Agreement as BillingAgreementResource; +use Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory; +use Magento\Backend\Block\Widget\Grid\Extended as ExtendedGrid; +use Magento\Backend\Block\Widget\Tab\TabInterface; +use Magento\Backend\Block\Template\Context as TemplateContext; +use Magento\Backend\Helper\Data as BackendHelper; +use Magento\Framework\Registry; + /** * Adminhtml billing agreement related orders tab */ -class Orders extends \Magento\Framework\View\Element\Text\ListText implements \Magento\Backend\Block\Widget\Tab\TabInterface +class Orders extends ExtendedGrid implements TabInterface { /** - * Initialize grid params - * - * @return void + * @var CollectionFactory */ - protected function _construct() - { - parent::_construct(); - $this->setId('billing_agreement_orders'); + protected $collectionFactory; + + /** + * @var Registry + */ + protected $coreRegistry; + + /** + * @var BillingAgreementResource + */ + protected $billingAgreementResource; + + /** + * @param TemplateContext $context + * @param BackendHelper $backendHelper + * @param CollectionFactory $collectionFactory + * @param Registry $coreRegistry + * @param BillingAgreementResource $billingAgreementResource + * @param array $data + */ + public function __construct( + TemplateContext $context, + BackendHelper $backendHelper, + CollectionFactory $collectionFactory, + Registry $coreRegistry, + BillingAgreementResource $billingAgreementResource, + array $data = [] + ) { + $this->coreRegistry = $coreRegistry; + $this->collectionFactory = $collectionFactory; + $this->billingAgreementResource = $billingAgreementResource; + parent::__construct($context, $backendHelper, $data); } /** @@ -55,4 +89,82 @@ class Orders extends \Magento\Framework\View\Element\Text\ListText implements \M { return false; } + + /** + * {@inheritdoc} + */ + protected function _construct() + { + parent::_construct(); + $this->setId('billing_agreement_orders'); + $this->setUseAjax(true); + } + + /** + * Apply various selection filters to prepare the sales order grid collection. + * + * @return $this + */ + protected function _prepareCollection() + { + $billingAgreement = $this->coreRegistry->registry('current_billing_agreement'); + if ($billingAgreement) { + $collection = $this->collectionFactory->getReport('sales_order_grid_data_source')->addFieldToSelect( + 'entity_id' + )->addFieldToSelect( + 'increment_id' + )->addFieldToSelect( + 'customer_id' + )->addFieldToSelect( + 'created_at' + )->addFieldToSelect( + 'grand_total' + )->addFieldToSelect( + 'order_currency_code' + )->addFieldToSelect( + 'store_id' + )->addFieldToSelect( + 'billing_name' + )->addFieldToSelect( + 'shipping_name' + ); + $this->billingAgreementResource->addOrdersFilter($collection, $billingAgreement->getId()); + $this->setCollection($collection); + } + return parent::_prepareCollection(); + } + + /** + * {@inheritdoc} + */ + protected function _prepareColumns() + { + $this->addColumn('increment_id', ['header' => __('Order'), 'width' => '100', 'index' => 'increment_id']); + + $this->addColumn( + 'created_at', + ['header' => __('Purchased'), 'index' => 'created_at', 'type' => 'datetime'] + ); + + $this->addColumn('billing_name', ['header' => __('Bill-to Name'), 'index' => 'billing_name']); + $this->addColumn('shipping_name', ['header' => __('Ship-to Name'), 'index' => 'shipping_name']); + + $this->addColumn( + 'grand_total', + [ + 'header' => __('Order Total'), + 'index' => 'grand_total', + 'type' => 'currency', + 'currency' => 'order_currency_code' + ] + ); + + if (!$this->_storeManager->isSingleStoreMode()) { + $this->addColumn( + 'store_id', + ['header' => __('Purchase Point'), 'index' => 'store_id', 'type' => 'store', 'store_view' => true] + ); + } + return parent::_prepareColumns(); + } } diff --git a/app/code/Magento/Paypal/Model/ResourceModel/Billing/Agreement.php b/app/code/Magento/Paypal/Model/ResourceModel/Billing/Agreement.php index 6f714ae437e605c3836c55a0aa430a845b1f23fd..5344091f837bf0664b7a817dcd849c53a66de105 100644 --- a/app/code/Magento/Paypal/Model/ResourceModel/Billing/Agreement.php +++ b/app/code/Magento/Paypal/Model/ResourceModel/Billing/Agreement.php @@ -39,11 +39,11 @@ class Agreement extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb /** * Add billing agreement filter on orders collection * - * @param \Magento\Sales\Model\ResourceModel\Order\Collection $orderCollection + * @param \Magento\Framework\Data\Collection\AbstractDb $orderCollection * @param string|int|array $agreementIds * @return $this */ - public function addOrdersFilter(\Magento\Sales\Model\ResourceModel\Order\Collection $orderCollection, $agreementIds) + public function addOrdersFilter(\Magento\Framework\Data\Collection\AbstractDb $orderCollection, $agreementIds) { $agreementIds = is_array($agreementIds) ? $agreementIds : [$agreementIds]; $orderCollection->getSelect()->joinInner( diff --git a/app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php b/app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php index c2184950d83e0ee967732fca8ded9c21e03655ac..784a78e5a4caeba2498b2451214d008e1acfd2ad 100644 --- a/app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php +++ b/app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php @@ -153,7 +153,7 @@ abstract class AbstractProduct extends \Magento\Rule\Model\Condition\AbstractCon */ protected function _addSpecialAttributes(array &$attributes) { - $attributes['attribute_set_id'] = __('Product Template'); + $attributes['attribute_set_id'] = __('Attribute Set'); $attributes['category_ids'] = __('Category'); } diff --git a/app/code/Magento/Sales/Api/CreditmemoCommentRepositoryInterface.php b/app/code/Magento/Sales/Api/CreditmemoCommentRepositoryInterface.php index d7c1f067cc046997e5fedc2901a803dee5757aa7..bc8cda48f2b216ecb5a5f00a40bd049eb8848a1e 100644 --- a/app/code/Magento/Sales/Api/CreditmemoCommentRepositoryInterface.php +++ b/app/code/Magento/Sales/Api/CreditmemoCommentRepositoryInterface.php @@ -32,10 +32,10 @@ interface CreditmemoCommentRepositoryInterface * * Returns a credit memo comment search results interface. * - * @param \Magento\Framework\Api\SearchCriteria $criteria The search criteria. + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria The search criteria. * @return \Magento\Sales\Api\Data\CreditmemoCommentSearchResultInterface Credit memo comment search results interface. */ - public function getList(\Magento\Framework\Api\SearchCriteria $criteria); + public function getList(\Magento\Framework\Api\SearchCriteria $searchCriteria); /** * Deletes a specified credit memo comment. diff --git a/app/code/Magento/Sales/Api/CreditmemoItemRepositoryInterface.php b/app/code/Magento/Sales/Api/CreditmemoItemRepositoryInterface.php index b322cc7b68f48f26651dfd462ee085be56c5ac40..9921c53a8438537d65923d25cb153ecd11523b04 100644 --- a/app/code/Magento/Sales/Api/CreditmemoItemRepositoryInterface.php +++ b/app/code/Magento/Sales/Api/CreditmemoItemRepositoryInterface.php @@ -27,10 +27,10 @@ interface CreditmemoItemRepositoryInterface /** * Lists credit memo items that match specified search criteria. * - * @param \Magento\Framework\Api\SearchCriteria $criteria The search criteria. + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria The search criteria. * @return \Magento\Sales\Api\Data\CreditmemoItemSearchResultInterface Credit memo item search results interface. */ - public function getList(\Magento\Framework\Api\SearchCriteria $criteria); + public function getList(\Magento\Framework\Api\SearchCriteria $searchCriteria); /** * Deletes a specified credit memo item. diff --git a/app/code/Magento/Sales/Api/CreditmemoManagementInterface.php b/app/code/Magento/Sales/Api/CreditmemoManagementInterface.php index 551f48488869ec27090402719588374cbb88cd0c..b2d7aab6eb09f3facf2f69e589cb9dfe3d7f721c 100644 --- a/app/code/Magento/Sales/Api/CreditmemoManagementInterface.php +++ b/app/code/Magento/Sales/Api/CreditmemoManagementInterface.php @@ -48,12 +48,10 @@ interface CreditmemoManagementInterface * * @param \Magento\Sales\Api\Data\CreditmemoInterface $creditmemo * @param bool $offlineRequested - * @param bool $notifyCustomer * @return \Magento\Sales\Api\Data\CreditmemoInterface */ public function refund( \Magento\Sales\Api\Data\CreditmemoInterface $creditmemo, - $offlineRequested = false, - $notifyCustomer = false + $offlineRequested = false ); } diff --git a/app/code/Magento/Sales/Api/CreditmemoRepositoryInterface.php b/app/code/Magento/Sales/Api/CreditmemoRepositoryInterface.php index 8bb487d732299972229da96cbee376258ab580ad..e1577630215c42a3010af96f96e2fba988cedc39 100644 --- a/app/code/Magento/Sales/Api/CreditmemoRepositoryInterface.php +++ b/app/code/Magento/Sales/Api/CreditmemoRepositoryInterface.php @@ -18,10 +18,10 @@ interface CreditmemoRepositoryInterface /** * Lists credit memos that match specified search criteria. * - * @param \Magento\Framework\Api\SearchCriteria $criteria The search criteria. + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria The search criteria. * @return \Magento\Sales\Api\Data\CreditmemoSearchResultInterface Credit memo search result interface. */ - public function getList(\Magento\Framework\Api\SearchCriteria $criteria); + public function getList(\Magento\Framework\Api\SearchCriteria $searchCriteria); /** * Loads a specified credit memo. diff --git a/app/code/Magento/Sales/Api/InvoiceCommentRepositoryInterface.php b/app/code/Magento/Sales/Api/InvoiceCommentRepositoryInterface.php index f256bb88af2ab2fd0f57dc8c7603c7eea67ebeda..d9d698b987b61f99ef8c0e1f10d429dc92e48300 100644 --- a/app/code/Magento/Sales/Api/InvoiceCommentRepositoryInterface.php +++ b/app/code/Magento/Sales/Api/InvoiceCommentRepositoryInterface.php @@ -17,10 +17,10 @@ interface InvoiceCommentRepositoryInterface /** * Lists invoice comments that match specified search criteria. * - * @param \Magento\Framework\Api\SearchCriteria $criteria The search criteria. + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria The search criteria. * @return \Magento\Sales\Api\Data\InvoiceCommentSearchResultInterface Invoice search result interface. */ - public function getList(\Magento\Framework\Api\SearchCriteria $criteria); + public function getList(\Magento\Framework\Api\SearchCriteria $searchCriteria); /** * Loads a specified invoice comment. diff --git a/app/code/Magento/Sales/Api/InvoiceItemRepositoryInterface.php b/app/code/Magento/Sales/Api/InvoiceItemRepositoryInterface.php index 90ae5cea092df03f80ce641764fe2141fb8211e8..510623d1932ba5258a4233efc2cd244e76150844 100644 --- a/app/code/Magento/Sales/Api/InvoiceItemRepositoryInterface.php +++ b/app/code/Magento/Sales/Api/InvoiceItemRepositoryInterface.php @@ -16,10 +16,10 @@ interface InvoiceItemRepositoryInterface /** * Lists the invoice items that match specified search criteria. * - * @param \Magento\Framework\Api\SearchCriteria $criteria + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria * @return \Magento\Sales\Api\Data\InvoiceItemSearchResultInterface */ - public function getList(\Magento\Framework\Api\SearchCriteria $criteria); + public function getList(\Magento\Framework\Api\SearchCriteria $searchCriteria); /** * Loads a specified invoice item. diff --git a/app/code/Magento/Sales/Api/InvoiceRepositoryInterface.php b/app/code/Magento/Sales/Api/InvoiceRepositoryInterface.php index 0fa5f268be6429360a289232c6e49f0c56f9ae08..9b864ba2ea380b6c77d61fc311b245c370ab7df4 100644 --- a/app/code/Magento/Sales/Api/InvoiceRepositoryInterface.php +++ b/app/code/Magento/Sales/Api/InvoiceRepositoryInterface.php @@ -16,10 +16,10 @@ interface InvoiceRepositoryInterface /** * Lists invoices that match specified search criteria. * - * @param \Magento\Framework\Api\SearchCriteria $criteria The search criteria. + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria The search criteria. * @return \Magento\Sales\Api\Data\InvoiceSearchResultInterface Invoice search result interface. */ - public function getList(\Magento\Framework\Api\SearchCriteria $criteria); + public function getList(\Magento\Framework\Api\SearchCriteria $searchCriteria); /** * Return Invoice object diff --git a/app/code/Magento/Sales/Api/OrderAddressRepositoryInterface.php b/app/code/Magento/Sales/Api/OrderAddressRepositoryInterface.php index 5c3db02774762f0296206d736bb917d1d8078d82..8071ec0c4894c2372adace78d317302fdba3cc31 100644 --- a/app/code/Magento/Sales/Api/OrderAddressRepositoryInterface.php +++ b/app/code/Magento/Sales/Api/OrderAddressRepositoryInterface.php @@ -18,10 +18,10 @@ interface OrderAddressRepositoryInterface /** * Lists order addresses that match specified search criteria. * - * @param \Magento\Framework\Api\SearchCriteria $criteria The search criteria. + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria The search criteria. * @return \Magento\Sales\Api\Data\OrderAddressSearchResultInterface Order address search result interface. */ - public function getList(\Magento\Framework\Api\SearchCriteria $criteria); + public function getList(\Magento\Framework\Api\SearchCriteria $searchCriteria); /** * Loads a specified order address. diff --git a/app/code/Magento/Sales/Api/OrderItemRepositoryInterface.php b/app/code/Magento/Sales/Api/OrderItemRepositoryInterface.php index e1832a09e5568c47194b0e79a32cc1a12b4746fc..6355db859bbcf2fd1ccd223375f5a31c41e888aa 100644 --- a/app/code/Magento/Sales/Api/OrderItemRepositoryInterface.php +++ b/app/code/Magento/Sales/Api/OrderItemRepositoryInterface.php @@ -18,10 +18,10 @@ interface OrderItemRepositoryInterface /** * Lists order items that match specified search criteria. * - * @param \Magento\Framework\Api\SearchCriteria $criteria The search criteria. + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria The search criteria. * @return \Magento\Sales\Api\Data\OrderItemSearchResultInterface Order item search result interface. */ - public function getList(\Magento\Framework\Api\SearchCriteria $criteria); + public function getList(\Magento\Framework\Api\SearchCriteria $searchCriteria); /** * Loads a specified order item. diff --git a/app/code/Magento/Sales/Api/OrderPaymentRepositoryInterface.php b/app/code/Magento/Sales/Api/OrderPaymentRepositoryInterface.php index e4ff2acf54ba627fcdedfa402021460c12e20020..005de16342db398b9e4e8afda49ff6f3ab21f7bd 100644 --- a/app/code/Magento/Sales/Api/OrderPaymentRepositoryInterface.php +++ b/app/code/Magento/Sales/Api/OrderPaymentRepositoryInterface.php @@ -18,10 +18,10 @@ interface OrderPaymentRepositoryInterface /** * Lists order payments that match specified search criteria. * - * @param \Magento\Framework\Api\SearchCriteria $criteria The search criteria. + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria The search criteria. * @return \Magento\Sales\Api\Data\OrderPaymentSearchResultInterface Order payment search result interface. */ - public function getList(\Magento\Framework\Api\SearchCriteria $criteria); + public function getList(\Magento\Framework\Api\SearchCriteria $searchCriteria); /** * Loads a specified order payment. diff --git a/app/code/Magento/Sales/Api/OrderRepositoryInterface.php b/app/code/Magento/Sales/Api/OrderRepositoryInterface.php index d8420ce0da7294626a3567db9f2001ae54bd89ba..50a683b43715356ac8371146f42bae2cadf04e5f 100644 --- a/app/code/Magento/Sales/Api/OrderRepositoryInterface.php +++ b/app/code/Magento/Sales/Api/OrderRepositoryInterface.php @@ -18,10 +18,10 @@ interface OrderRepositoryInterface /** * Lists orders that match specified search criteria. * - * @param \Magento\Framework\Api\SearchCriteria $criteria The search criteria. + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria The search criteria. * @return \Magento\Sales\Api\Data\OrderSearchResultInterface Order search result interface. */ - public function getList(\Magento\Framework\Api\SearchCriteria $criteria); + public function getList(\Magento\Framework\Api\SearchCriteria $searchCriteria); /** * Loads a specified order. diff --git a/app/code/Magento/Sales/Api/OrderStatusHistoryRepositoryInterface.php b/app/code/Magento/Sales/Api/OrderStatusHistoryRepositoryInterface.php index b99bf0dc2c729d7f97aef8560a7e0511769a4fb7..743f9aaa734e94ddc8a867071a40423685886294 100644 --- a/app/code/Magento/Sales/Api/OrderStatusHistoryRepositoryInterface.php +++ b/app/code/Magento/Sales/Api/OrderStatusHistoryRepositoryInterface.php @@ -21,10 +21,10 @@ interface OrderStatusHistoryRepositoryInterface /** * Lists order status history comments that match specified search criteria. * - * @param \Magento\Framework\Api\SearchCriteria $criteria The search criteria. + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria The search criteria. * @return \Magento\Sales\Api\Data\OrderStatusHistorySearchResultInterface Order status history search result interface. */ - public function getList(\Magento\Framework\Api\SearchCriteria $criteria); + public function getList(\Magento\Framework\Api\SearchCriteria $searchCriteria); /** * Loads a specified order status comment. diff --git a/app/code/Magento/Sales/Api/ShipmentCommentRepositoryInterface.php b/app/code/Magento/Sales/Api/ShipmentCommentRepositoryInterface.php index e6605c9c5dd24267466d846eb82fd2a3e342d91a..9ca3bb336f268c515e91d4365fc2b9c01056bd14 100644 --- a/app/code/Magento/Sales/Api/ShipmentCommentRepositoryInterface.php +++ b/app/code/Magento/Sales/Api/ShipmentCommentRepositoryInterface.php @@ -17,10 +17,10 @@ interface ShipmentCommentRepositoryInterface /** * Lists shipment comments that match specific search criteria. * - * @param \Magento\Framework\Api\SearchCriteria $criteria The search criteria. + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria The search criteria. * @return \Magento\Sales\Api\Data\ShipmentCommentSearchResultInterface Shipment comment search result interface. */ - public function getList(\Magento\Framework\Api\SearchCriteria $criteria); + public function getList(\Magento\Framework\Api\SearchCriteria $searchCriteria); /** * Loads a specified shipment comment. diff --git a/app/code/Magento/Sales/Api/ShipmentItemRepositoryInterface.php b/app/code/Magento/Sales/Api/ShipmentItemRepositoryInterface.php index 0db3adabf885cdd1fcf0c4059d19958151554530..5d2d3946a91971c23256a720b0258213ae1bcb58 100644 --- a/app/code/Magento/Sales/Api/ShipmentItemRepositoryInterface.php +++ b/app/code/Magento/Sales/Api/ShipmentItemRepositoryInterface.php @@ -17,10 +17,10 @@ interface ShipmentItemRepositoryInterface /** * Lists shipment items that match specified search criteria. * - * @param \Magento\Framework\Api\SearchCriteria $criteria The search criteria. + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria The search criteria. * @return \Magento\Sales\Api\Data\ShipmentItemSearchResultInterface Shipment item search result interface. */ - public function getList(\Magento\Framework\Api\SearchCriteria $criteria); + public function getList(\Magento\Framework\Api\SearchCriteria $searchCriteria); /** * Loads a specified shipment item. diff --git a/app/code/Magento/Sales/Api/ShipmentRepositoryInterface.php b/app/code/Magento/Sales/Api/ShipmentRepositoryInterface.php index 1cfa85d87e66facb2affe05c8541a8a96982c68f..858347a6f166d47255572bc92064924c3a42efc7 100644 --- a/app/code/Magento/Sales/Api/ShipmentRepositoryInterface.php +++ b/app/code/Magento/Sales/Api/ShipmentRepositoryInterface.php @@ -17,10 +17,10 @@ interface ShipmentRepositoryInterface /** * Lists shipments that match specified search criteria. * - * @param \Magento\Framework\Api\SearchCriteria $criteria The search criteria. + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria The search criteria. * @return \Magento\Sales\Api\Data\ShipmentSearchResultInterface Shipment search results interface. */ - public function getList(\Magento\Framework\Api\SearchCriteria $criteria); + public function getList(\Magento\Framework\Api\SearchCriteria $searchCriteria); /** * Loads a specified shipment. diff --git a/app/code/Magento/Sales/Api/ShipmentTrackRepositoryInterface.php b/app/code/Magento/Sales/Api/ShipmentTrackRepositoryInterface.php index 5d7817b0c828d997707e9b826c2a7890aa305bc2..ada64b54d862fbabdb3a514e03a73b29172be1e9 100644 --- a/app/code/Magento/Sales/Api/ShipmentTrackRepositoryInterface.php +++ b/app/code/Magento/Sales/Api/ShipmentTrackRepositoryInterface.php @@ -17,10 +17,10 @@ interface ShipmentTrackRepositoryInterface /** * Lists shipment tracks that match specified search criteria. * - * @param \Magento\Framework\Api\SearchCriteria $criteria The search criteria. + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria The search criteria. * @return \Magento\Sales\Api\Data\ShipmentTrackSearchResultInterface Shipment track search result interface. */ - public function getList(\Magento\Framework\Api\SearchCriteria $criteria); + public function getList(\Magento\Framework\Api\SearchCriteria $searchCriteria); /** * Loads a specified shipment track. diff --git a/app/code/Magento/Sales/Api/TransactionRepositoryInterface.php b/app/code/Magento/Sales/Api/TransactionRepositoryInterface.php index 7a256e7deaf7ccc55bfd07ec8baf8625d17529e1..be5315f1329cc64f18ca3a2e65459e33d62bc6e5 100644 --- a/app/code/Magento/Sales/Api/TransactionRepositoryInterface.php +++ b/app/code/Magento/Sales/Api/TransactionRepositoryInterface.php @@ -16,10 +16,10 @@ interface TransactionRepositoryInterface /** * Lists transactions that match specified search criteria. * - * @param \Magento\Framework\Api\SearchCriteria $criteria The search criteria. + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria The search criteria. * @return \Magento\Sales\Api\Data\TransactionSearchResultInterface Transaction search result interface. */ - public function getList(\Magento\Framework\Api\SearchCriteria $criteria); + public function getList(\Magento\Framework\Api\SearchCriteria $searchCriteria); /** * Loads a specified transaction. diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Address.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Address.php index 1ee0386f871101b753d45cfd6814540cae15016c..4af19b69b136158103c391443fce0e8cc37163c0 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Address.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Address.php @@ -160,8 +160,8 @@ class Address extends \Magento\Sales\Block\Adminhtml\Order\Create\Form\AbstractF ->setConditionType('eq') ->create(); $this->searchCriteriaBuilder->addFilters([$filter]); - $criteria = $this->searchCriteriaBuilder->create(); - $result = $this->addressService->getList($criteria); + $searchCriteria = $this->searchCriteriaBuilder->create(); + $result = $this->addressService->getList($searchCriteria); return $result->getItems(); } return []; diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/AddressSave.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/AddressSave.php index e3d15fd93cdd6765c1c3aa3739603db07ac23f95..b10329e70d376ff7be228e65a9d99f5c686f42e0 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order/AddressSave.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/AddressSave.php @@ -16,13 +16,20 @@ class AddressSave extends \Magento\Sales\Controller\Adminhtml\Order public function execute() { $addressId = $this->getRequest()->getParam('address_id'); - $address = $this->_objectManager->create('Magento\Sales\Model\Order\Address')->load($addressId); + /** @var $address \Magento\Sales\Api\Data\OrderAddressInterface|\Magento\Sales\Model\Order\Address */ + $address = $this->_objectManager->create('Magento\Sales\Api\Data\OrderAddressInterface')->load($addressId); $data = $this->getRequest()->getPostValue(); $resultRedirect = $this->resultRedirectFactory->create(); if ($data && $address->getId()) { $address->addData($data); try { $address->save(); + $this->_eventManager->dispatch( + 'admin_sales_order_address_update', + [ + 'order_id' => $address->getParentId() + ] + ); $this->messageManager->addSuccess(__('You updated the order address.')); return $resultRedirect->setPath('sales/*/view', ['order_id' => $address->getParentId()]); } catch (\Magento\Framework\Exception\LocalizedException $e) { diff --git a/app/code/Magento/Sales/Model/Order/AddressRepository.php b/app/code/Magento/Sales/Model/Order/AddressRepository.php index 2e4c9df86fa22c97348f932c07b1d8dc41d46d46..ec5a39bce3b6c290d88bf0569d5af6d8d5082ba5 100644 --- a/app/code/Magento/Sales/Model/Order/AddressRepository.php +++ b/app/code/Magento/Sales/Model/Order/AddressRepository.php @@ -14,6 +14,8 @@ use Magento\Framework\Exception\InputException; /** * Repository class for @see \Magento\Sales\Api\Data\OrderAddressInterface + * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class AddressRepository implements \Magento\Sales\Api\OrderAddressRepositoryInterface { @@ -77,24 +79,24 @@ class AddressRepository implements \Magento\Sales\Api\OrderAddressRepositoryInte /** * Find order addresses by criteria. * - * @param \Magento\Framework\Api\SearchCriteria $criteria + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria * @return \Magento\Sales\Api\Data\OrderAddressInterface[] */ - public function getList(\Magento\Framework\Api\SearchCriteria $criteria) + public function getList(\Magento\Framework\Api\SearchCriteria $searchCriteria) { //@TODO: fix search logic /** @var \Magento\Sales\Api\Data\OrderAddressSearchResultInterface $searchResult */ $searchResult = $this->searchResultFactory->create(); - foreach ($criteria->getFilterGroups() as $filterGroup) { + foreach ($searchCriteria->getFilterGroups() as $filterGroup) { foreach ($filterGroup->getFilters() as $filter) { $condition = $filter->getConditionType() ? $filter->getConditionType() : 'eq'; $searchResult->addFieldToFilter($filter->getField(), [$condition => $filter->getValue()]); } } - $searchResult->setCurPage($criteria->getCurrentPage()); - $searchResult->setPageSize($criteria->getPageSize()); + $searchResult->setCurPage($searchCriteria->getCurrentPage()); + $searchResult->setPageSize($searchCriteria->getPageSize()); return $searchResult; } diff --git a/app/code/Magento/Sales/Model/Order/CreditmemoRepository.php b/app/code/Magento/Sales/Model/Order/CreditmemoRepository.php index 200a57a73fff5804e589b9688d1ecc443db061e1..c9621a7e668d34ec8ae53db42e0051c8e4e59c07 100644 --- a/app/code/Magento/Sales/Model/Order/CreditmemoRepository.php +++ b/app/code/Magento/Sales/Model/Order/CreditmemoRepository.php @@ -87,21 +87,21 @@ class CreditmemoRepository implements \Magento\Sales\Api\CreditmemoRepositoryInt /** * Lists credit memos that match specified search criteria. * - * @param \Magento\Framework\Api\SearchCriteria $criteria The search criteria. + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria The search criteria. * @return \Magento\Sales\Api\Data\CreditmemoSearchResultInterface Credit memo search result interface. */ - public function getList(\Magento\Framework\Api\SearchCriteria $criteria) + public function getList(\Magento\Framework\Api\SearchCriteria $searchCriteria) { /** @var \Magento\Sales\Api\Data\CreditmemoSearchResultInterface $searchResult */ $searchResult = $this->searchResultFactory->create(); - foreach ($criteria->getFilterGroups() as $filterGroup) { + foreach ($searchCriteria->getFilterGroups() as $filterGroup) { foreach ($filterGroup->getFilters() as $filter) { $condition = $filter->getConditionType() ? $filter->getConditionType() : 'eq'; $searchResult->addFieldToFilter($filter->getField(), [$condition => $filter->getValue()]); } } - $searchResult->setCurPage($criteria->getCurrentPage()); - $searchResult->setPageSize($criteria->getPageSize()); + $searchResult->setCurPage($searchCriteria->getCurrentPage()); + $searchResult->setPageSize($searchCriteria->getPageSize()); return $searchResult; } diff --git a/app/code/Magento/Sales/Model/Order/InvoiceRepository.php b/app/code/Magento/Sales/Model/Order/InvoiceRepository.php index 04275723bda95706d78cf85f717bb195dbbbf6ff..6ac147108bb73a6da51fb8aeb22f803ef63c151c 100644 --- a/app/code/Magento/Sales/Model/Order/InvoiceRepository.php +++ b/app/code/Magento/Sales/Model/Order/InvoiceRepository.php @@ -83,21 +83,21 @@ class InvoiceRepository implements InvoiceRepositoryInterface /** * Find entities by criteria * - * @param \Magento\Framework\Api\SearchCriteria $criteria + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria * @return \Magento\Sales\Api\Data\InvoiceInterface[] */ - public function getList(\Magento\Framework\Api\SearchCriteria $criteria) + public function getList(\Magento\Framework\Api\SearchCriteria $searchCriteria) { /** @var \Magento\Sales\Model\ResourceModel\Order\Invoice\Collection $collection */ $collection = $this->searchResultFactory->create(); - foreach ($criteria->getFilterGroups() as $filterGroup) { + foreach ($searchCriteria->getFilterGroups() as $filterGroup) { foreach ($filterGroup->getFilters() as $filter) { $condition = $filter->getConditionType() ? $filter->getConditionType() : 'eq'; $collection->addFieldToFilter($filter->getField(), [$condition => $filter->getValue()]); } } - $collection->setCurPage($criteria->getCurrentPage()); - $collection->setPageSize($criteria->getPageSize()); + $collection->setCurPage($searchCriteria->getCurrentPage()); + $collection->setPageSize($searchCriteria->getPageSize()); return $collection; } diff --git a/app/code/Magento/Sales/Model/Order/ItemRepository.php b/app/code/Magento/Sales/Model/Order/ItemRepository.php index 776b862828658da8092d992697e790599941c770..983a87834fabfde0ba471c20c2a42ebbc6ca5b5c 100644 --- a/app/code/Magento/Sales/Model/Order/ItemRepository.php +++ b/app/code/Magento/Sales/Model/Order/ItemRepository.php @@ -114,16 +114,16 @@ class ItemRepository implements OrderItemRepositoryInterface /** * Find entities by criteria * - * @param SearchCriteria $criteria + * @param SearchCriteria $searchCriteria * @return OrderItemInterface[] */ - public function getList(SearchCriteria $criteria) + public function getList(SearchCriteria $searchCriteria) { /** @var OrderItemSearchResultInterface $searchResult */ $searchResult = $this->searchResultFactory->create(); - $searchResult->setSearchCriteria($criteria); + $searchResult->setSearchCriteria($searchCriteria); - foreach ($criteria->getFilterGroups() as $filterGroup) { + foreach ($searchCriteria->getFilterGroups() as $filterGroup) { foreach ($filterGroup->getFilters() as $filter) { $condition = $filter->getConditionType() ? $filter->getConditionType() : 'eq'; $searchResult->addFieldToFilter($filter->getField(), [$condition => $filter->getValue()]); diff --git a/app/code/Magento/Sales/Model/Order/Payment/Repository.php b/app/code/Magento/Sales/Model/Order/Payment/Repository.php index 2517c4b9adbcc1aca5b648f7ad4974645624220c..ef3fb08b5daa1b4980a9ef2a34fd43bcd59fcd6b 100644 --- a/app/code/Magento/Sales/Model/Order/Payment/Repository.php +++ b/app/code/Magento/Sales/Model/Order/Payment/Repository.php @@ -47,21 +47,21 @@ class Repository implements OrderPaymentRepositoryInterface /** * Lists order payments that match specified search criteria. * - * @param \Magento\Framework\Api\SearchCriteria $criteria The search criteria. + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria The search criteria. * @return \Magento\Sales\Api\Data\OrderPaymentSearchResultInterface Order payment search result interface. */ - public function getList(\Magento\Framework\Api\SearchCriteria $criteria) + public function getList(\Magento\Framework\Api\SearchCriteria $searchCriteria) { /** @var \Magento\Sales\Model\ResourceModel\Order\Payment\Collection $collection */ $collection = $this->searchResultFactory->create(); - foreach ($criteria->getFilterGroups() as $filterGroup) { + foreach ($searchCriteria->getFilterGroups() as $filterGroup) { foreach ($filterGroup->getFilters() as $filter) { $condition = $filter->getConditionType() ? $filter->getConditionType() : 'eq'; $collection->addFieldToFilter($filter->getField(), [$condition => $filter->getValue()]); } } - $collection->setCurPage($criteria->getCurrentPage()); - $collection->setPageSize($criteria->getPageSize()); + $collection->setCurPage($searchCriteria->getCurrentPage()); + $collection->setPageSize($searchCriteria->getPageSize()); return $collection; } diff --git a/app/code/Magento/Sales/Model/Order/Payment/Transaction/Repository.php b/app/code/Magento/Sales/Model/Order/Payment/Transaction/Repository.php index 051ab5401d59fda4ded3f0af78bab2869e526617..a3550d6073ecd8f5040e230c5f350ea4ec0eb2ab 100644 --- a/app/code/Magento/Sales/Model/Order/Payment/Transaction/Repository.php +++ b/app/code/Magento/Sales/Model/Order/Payment/Transaction/Repository.php @@ -185,18 +185,18 @@ class Repository implements TransactionRepositoryInterface /** * {@inheritdoc} */ - public function getList(\Magento\Framework\Api\SearchCriteria $criteria) + public function getList(\Magento\Framework\Api\SearchCriteria $searchCriteria) { /** @var TransactionResource\Collection $collection */ $collection = $this->searchResultFactory->create(); - foreach ($criteria->getFilterGroups() as $filterGroup) { + foreach ($searchCriteria->getFilterGroups() as $filterGroup) { foreach ($filterGroup->getFilters() as $filter) { $condition = $filter->getConditionType() ? $filter->getConditionType() : 'eq'; $collection->addFieldToFilter($filter->getField(), [$condition => $filter->getValue()]); } } - $collection->setCurPage($criteria->getCurrentPage()); - $collection->setPageSize($criteria->getPageSize()); + $collection->setCurPage($searchCriteria->getCurrentPage()); + $collection->setPageSize($searchCriteria->getPageSize()); $collection->addPaymentInformation(['method']); $collection->addOrderInformation(['increment_id']); return $collection; diff --git a/app/code/Magento/Sales/Model/Order/ShipmentRepository.php b/app/code/Magento/Sales/Model/Order/ShipmentRepository.php index c44fa79ae56c7525b36bd8fa9a2f15ffa0206946..9cb32363b480fcdd1c69c673f37c3fd9cf5a54a6 100644 --- a/app/code/Magento/Sales/Model/Order/ShipmentRepository.php +++ b/app/code/Magento/Sales/Model/Order/ShipmentRepository.php @@ -14,6 +14,8 @@ use Magento\Framework\Exception\InputException; /** * Repository class for @see \Magento\Sales\Api\Data\ShipmentInterface + * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class ShipmentRepository implements \Magento\Sales\Api\ShipmentRepositoryInterface { @@ -77,24 +79,24 @@ class ShipmentRepository implements \Magento\Sales\Api\ShipmentRepositoryInterfa /** * Find shipments by criteria. * - * @param \Magento\Framework\Api\SearchCriteria $criteria + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria * @return \Magento\Sales\Api\Data\ShipmentInterface[] */ - public function getList(\Magento\Framework\Api\SearchCriteria $criteria) + public function getList(\Magento\Framework\Api\SearchCriteria $searchCriteria) { //@TODO: fix search logic /** @var \Magento\Sales\Api\Data\ShipmentSearchResultInterface $searchResult */ $searchResult = $this->searchResultFactory->create(); - foreach ($criteria->getFilterGroups() as $filterGroup) { + foreach ($searchCriteria->getFilterGroups() as $filterGroup) { foreach ($filterGroup->getFilters() as $filter) { $condition = $filter->getConditionType() ? $filter->getConditionType() : 'eq'; $searchResult->addFieldToFilter($filter->getField(), [$condition => $filter->getValue()]); } } - $searchResult->setCurPage($criteria->getCurrentPage()); - $searchResult->setPageSize($criteria->getPageSize()); + $searchResult->setCurPage($searchCriteria->getCurrentPage()); + $searchResult->setPageSize($searchCriteria->getPageSize()); return $searchResult; } diff --git a/app/code/Magento/Sales/Model/OrderRepository.php b/app/code/Magento/Sales/Model/OrderRepository.php index 976a03486a4f1ead05696c96dfc28ba9652f2d68..1d4a7b8e66a9a72b902636aae8efc8ae919a3204 100644 --- a/app/code/Magento/Sales/Model/OrderRepository.php +++ b/app/code/Magento/Sales/Model/OrderRepository.php @@ -73,22 +73,22 @@ class OrderRepository implements \Magento\Sales\Api\OrderRepositoryInterface /** * Find entities by criteria * - * @param \Magento\Framework\Api\SearchCriteria $criteria + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria * @return \Magento\Sales\Api\Data\OrderInterface[] */ - public function getList(\Magento\Framework\Api\SearchCriteria $criteria) + public function getList(\Magento\Framework\Api\SearchCriteria $searchCriteria) { //@TODO: fix search logic /** @var \Magento\Sales\Api\Data\OrderSearchResultInterface $searchResult */ $searchResult = $this->searchResultFactory->create(); - foreach ($criteria->getFilterGroups() as $filterGroup) { + foreach ($searchCriteria->getFilterGroups() as $filterGroup) { foreach ($filterGroup->getFilters() as $filter) { $condition = $filter->getConditionType() ? $filter->getConditionType() : 'eq'; $searchResult->addFieldToFilter($filter->getField(), [$condition => $filter->getValue()]); } } - $searchResult->setCurPage($criteria->getCurrentPage()); - $searchResult->setPageSize($criteria->getPageSize()); + $searchResult->setCurPage($searchCriteria->getCurrentPage()); + $searchResult->setPageSize($searchCriteria->getPageSize()); return $searchResult; } diff --git a/app/code/Magento/Sales/Model/ResourceModel/Order/Address.php b/app/code/Magento/Sales/Model/ResourceModel/Order/Address.php index 6df065f7ee30372b130c002875fb0518d266a8ca..625fe5e2b342f629ca0f62df308687c6d132c7e4 100644 --- a/app/code/Magento/Sales/Model/ResourceModel/Order/Address.php +++ b/app/code/Magento/Sales/Model/ResourceModel/Order/Address.php @@ -122,19 +122,4 @@ class Address extends SalesResource implements OrderAddressResourceInterface } return $this; } - - /** - * Update related grid table after object save - * - * @param \Magento\Framework\Model\AbstractModel|\Magento\Framework\DataObject $object - * @return \Magento\Framework\Model\ResourceModel\Db\AbstractDb - */ - protected function _afterSave(\Magento\Framework\Model\AbstractModel $object) - { - $resource = parent::_afterSave($object); - if ($object->getParentId()) { - $this->gridPool->refreshByOrderId($object->getParentId()); - } - return $resource; - } } diff --git a/app/code/Magento/Sales/Model/Service/CreditmemoService.php b/app/code/Magento/Sales/Model/Service/CreditmemoService.php index ea0e1ed82d1b3321648f2507ae646098cc620c8d..1993e1d1cae54bd62b2c4a2d632589c89f28cfd9 100644 --- a/app/code/Magento/Sales/Model/Service/CreditmemoService.php +++ b/app/code/Magento/Sales/Model/Service/CreditmemoService.php @@ -108,8 +108,8 @@ class CreditmemoService implements \Magento\Sales\Api\CreditmemoManagementInterf $this->searchCriteriaBuilder->addFilters( [$this->filterBuilder->setField('parent_id')->setValue($id)->setConditionType('eq')->create()] ); - $criteria = $this->searchCriteriaBuilder->create(); - return $this->commentRepository->getList($criteria); + $searchCriteria = $this->searchCriteriaBuilder->create(); + return $this->commentRepository->getList($searchCriteria); } /** @@ -129,13 +129,11 @@ class CreditmemoService implements \Magento\Sales\Api\CreditmemoManagementInterf * * @param \Magento\Sales\Api\Data\CreditmemoInterface $creditmemo * @param bool $offlineRequested - * @param bool $notifyCustomer * @return \Magento\Sales\Api\Data\CreditmemoInterface */ public function refund( \Magento\Sales\Api\Data\CreditmemoInterface $creditmemo, - $offlineRequested = false, - $notifyCustomer = false + $offlineRequested = false ) { $this->validateForRefund($creditmemo); $creditmemo->setState(\Magento\Sales\Model\Order\Creditmemo::STATE_REFUNDED); diff --git a/app/code/Magento/Sales/Model/Service/InvoiceService.php b/app/code/Magento/Sales/Model/Service/InvoiceService.php index 5c07bf365e9fb1669804dd81b554c79af88d8a62..7352d0f221e330110014f371c5a62713b496addf 100644 --- a/app/code/Magento/Sales/Model/Service/InvoiceService.php +++ b/app/code/Magento/Sales/Model/Service/InvoiceService.php @@ -103,8 +103,8 @@ class InvoiceService implements InvoiceManagementInterface $this->criteriaBuilder->addFilters( [$this->filterBuilder->setField('parent_id')->setValue($id)->setConditionType('eq')->create()] ); - $criteria = $this->criteriaBuilder->create(); - return $this->commentRepository->getList($criteria); + $searchCriteria = $this->criteriaBuilder->create(); + return $this->commentRepository->getList($searchCriteria); } /** diff --git a/app/code/Magento/Sales/Model/Service/OrderService.php b/app/code/Magento/Sales/Model/Service/OrderService.php index 5df21bf9df691206d6bcd6f64fc4b9264c940e1a..29b719a1873a6144d7e83853d8a47316bc9349c7 100644 --- a/app/code/Magento/Sales/Model/Service/OrderService.php +++ b/app/code/Magento/Sales/Model/Service/OrderService.php @@ -44,6 +44,11 @@ class OrderService implements OrderManagementInterface */ protected $eventManager; + /** + * @var \Magento\Sales\Model\Order\Email\Sender\OrderCommentSender + */ + protected $orderCommentSender; + /** * Constructor * @@ -53,6 +58,7 @@ class OrderService implements OrderManagementInterface * @param \Magento\Framework\Api\FilterBuilder $filterBuilder * @param \Magento\Sales\Model\OrderNotifier $notifier * @param \Magento\Framework\Event\ManagerInterface $eventManager + * @param \Magento\Sales\Model\Order\Email\Sender\OrderCommentSender $orderCommentSender */ public function __construct( \Magento\Sales\Api\OrderRepositoryInterface $orderRepository, @@ -60,7 +66,8 @@ class OrderService implements OrderManagementInterface \Magento\Framework\Api\SearchCriteriaBuilder $criteriaBuilder, \Magento\Framework\Api\FilterBuilder $filterBuilder, \Magento\Sales\Model\OrderNotifier $notifier, - \Magento\Framework\Event\ManagerInterface $eventManager + \Magento\Framework\Event\ManagerInterface $eventManager, + \Magento\Sales\Model\Order\Email\Sender\OrderCommentSender $orderCommentSender ) { $this->orderRepository = $orderRepository; $this->historyRepository = $historyRepository; @@ -68,6 +75,7 @@ class OrderService implements OrderManagementInterface $this->filterBuilder = $filterBuilder; $this->notifier = $notifier; $this->eventManager = $eventManager; + $this->orderCommentSender = $orderCommentSender; } /** @@ -98,8 +106,8 @@ class OrderService implements OrderManagementInterface $this->criteriaBuilder->addFilters( [$this->filterBuilder->setField('parent_id')->setValue($id)->setConditionType('eq')->create()] ); - $criteria = $this->criteriaBuilder->create(); - return $this->historyRepository->getList($criteria); + $searchCriteria = $this->criteriaBuilder->create(); + return $this->historyRepository->getList($searchCriteria); } /** @@ -114,6 +122,9 @@ class OrderService implements OrderManagementInterface $order = $this->orderRepository->get($id); $order->addStatusHistory($statusHistory); $this->orderRepository->save($order); + $notify = isset($statusHistory['is_customer_notified']) ? $statusHistory['is_customer_notified'] : false; + $comment = trim(strip_tags($statusHistory->getComment())); + $this->orderCommentSender->send($order, $notify, $comment); return true; } diff --git a/app/code/Magento/Sales/Model/Service/ShipmentService.php b/app/code/Magento/Sales/Model/Service/ShipmentService.php index 6523e8e83825e5112286d787a1f15bdff3e394bd..62593c1b1d0dc58165dafe3453291e13fcf0a123 100644 --- a/app/code/Magento/Sales/Model/Service/ShipmentService.php +++ b/app/code/Magento/Sales/Model/Service/ShipmentService.php @@ -91,8 +91,8 @@ class ShipmentService implements ShipmentManagementInterface $this->criteriaBuilder->addFilters( [$this->filterBuilder->setField('parent_id')->setValue($id)->setConditionType('eq')->create()] ); - $criteria = $this->criteriaBuilder->create(); - return $this->commentRepository->getList($criteria); + $searchCriteria = $this->criteriaBuilder->create(); + return $this->commentRepository->getList($searchCriteria); } /** diff --git a/app/code/Magento/Sales/Observer/GridProcessAddressChange.php b/app/code/Magento/Sales/Observer/GridProcessAddressChange.php new file mode 100644 index 0000000000000000000000000000000000000000..e053801290dbefb220c3e89af178495533ba24b4 --- /dev/null +++ b/app/code/Magento/Sales/Observer/GridProcessAddressChange.php @@ -0,0 +1,44 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\Sales\Observer; + +use Magento\Framework\Event\Observer as EventObserver; +use Magento\Sales\Model\ResourceModel\GridPool; +use Magento\Framework\Event\ObserverInterface; + +/** + * Class GridProcessAddressChange + */ +class GridProcessAddressChange implements ObserverInterface +{ + + /** + * @var GridPool + */ + protected $gridPool; + + /** + * @param GridPool $gridPool + */ + public function __construct( + GridPool $gridPool + ) { + $this->gridPool= $gridPool; + } + + /** + * Refresh addresses in grids according to performed changed + * This is manual admin action, as result we perform this operation without delay + * + * @param EventObserver $observer + * @return void + */ + public function execute(EventObserver $observer) + { + $this->gridPool->refreshByOrderId($observer->getOrderId()); + } +} diff --git a/app/code/Magento/Sales/Test/Unit/Model/InvoiceRepositoryTest.php b/app/code/Magento/Sales/Test/Unit/Model/InvoiceRepositoryTest.php index 4a2ef97a19764b757f6de4da62500cbfeee27653..0cb9a4dc715765cc8c9311d12218e244e28f0d72 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/InvoiceRepositoryTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/InvoiceRepositoryTest.php @@ -148,10 +148,10 @@ class InvoiceRepositoryTest extends \PHPUnit_Framework_TestCase ->method('getFilters') ->willReturn([$filter]); - $criteria = $this->getMockBuilder('Magento\Framework\Api\SearchCriteria') + $searchCriteria = $this->getMockBuilder('Magento\Framework\Api\SearchCriteria') ->disableOriginalConstructor() ->getMock(); - $criteria->expects($this->once()) + $searchCriteria->expects($this->once()) ->method('getFilterGroups') ->willReturn($filterGroups); @@ -166,7 +166,7 @@ class InvoiceRepositoryTest extends \PHPUnit_Framework_TestCase ->method('create') ->willReturn($collection); - $this->assertEquals($collection, $this->invoice->getList($criteria)); + $this->assertEquals($collection, $this->invoice->getList($searchCriteria)); } public function testDelete() diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/AddressRepositoryTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/AddressRepositoryTest.php index f943f6632225b1c026852e51ebfa4339444a999b..3dd1590bf72ad751cf18fbe81ba1c3951971a052 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/Order/AddressRepositoryTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/Order/AddressRepositoryTest.php @@ -170,14 +170,14 @@ class AddressRepositoryTest extends \PHPUnit_Framework_TestCase ->method('getFilters') ->willReturn([$filter]); - $criteria = $this->getMock( + $searchCriteria = $this->getMock( 'Magento\Framework\Api\SearchCriteria', ['getFilterGroups'], [], '', false ); - $criteria->expects($this->once()) + $searchCriteria->expects($this->once()) ->method('getFilterGroups') ->willReturn([$filterGroup]); @@ -196,7 +196,7 @@ class AddressRepositoryTest extends \PHPUnit_Framework_TestCase ->method('create') ->willReturn($collection); - $this->assertEquals($collection, $this->subject->getList($criteria)); + $this->assertEquals($collection, $this->subject->getList($searchCriteria)); } public function testDelete() diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/CreditmemoRepositoryTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/CreditmemoRepositoryTest.php index cba7908dacd42bae57729dfe770587a2708c8f4a..25357bd65177fe791572664736220c8ae59161b1 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/Order/CreditmemoRepositoryTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/Order/CreditmemoRepositoryTest.php @@ -153,10 +153,10 @@ class CreditmemoRepositoryTest extends \PHPUnit_Framework_TestCase ->method('getFilters') ->willReturn([$filter]); - $criteria = $this->getMockBuilder('Magento\Framework\Api\SearchCriteria') + $searchCriteria = $this->getMockBuilder('Magento\Framework\Api\SearchCriteria') ->disableOriginalConstructor() ->getMock(); - $criteria->expects($this->once()) + $searchCriteria->expects($this->once()) ->method('getFilterGroups') ->willReturn($filterGroups); @@ -171,7 +171,7 @@ class CreditmemoRepositoryTest extends \PHPUnit_Framework_TestCase ->method('create') ->willReturn($collection); - $this->assertEquals($collection, $this->creditmemo->getList($criteria)); + $this->assertEquals($collection, $this->creditmemo->getList($searchCriteria)); } public function testDelete() diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/ItemRepositoryTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/ItemRepositoryTest.php index e2deb200dbcfcd930ae170dee2cd48819509a8f3..314271c3156963559230464f983dc06f2872e7e1 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/Order/ItemRepositoryTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/Order/ItemRepositoryTest.php @@ -200,10 +200,10 @@ class ItemRepositoryTest extends \PHPUnit_Framework_TestCase ->method('getFilters') ->willReturn([$filterMock]); - $criteriaMock = $this->getMockBuilder('Magento\Framework\Api\SearchCriteria') + $searchCriteriaMock = $this->getMockBuilder('Magento\Framework\Api\SearchCriteria') ->disableOriginalConstructor() ->getMock(); - $criteriaMock->expects($this->once()) + $searchCriteriaMock->expects($this->once()) ->method('getFilterGroups') ->willReturn([$filterGroupMock]); @@ -230,7 +230,7 @@ class ItemRepositoryTest extends \PHPUnit_Framework_TestCase ->willReturn($searchResultMock); $model = $this->getModel($orderItemMock, $productType); - $this->assertSame($searchResultMock, $model->getList($criteriaMock)); + $this->assertSame($searchResultMock, $model->getList($searchCriteriaMock)); } public function testDeleteById() diff --git a/app/code/Magento/Sales/Test/Unit/Model/Order/ShipmentRepositoryTest.php b/app/code/Magento/Sales/Test/Unit/Model/Order/ShipmentRepositoryTest.php index 36a8360ee094fbf2c05b70ed871492d1b0b0d25b..f76732578da21856a34ef5a9edee3011256dd831 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/Order/ShipmentRepositoryTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/Order/ShipmentRepositoryTest.php @@ -170,14 +170,14 @@ class ShipmentRepositoryTest extends \PHPUnit_Framework_TestCase ->method('getFilters') ->willReturn([$filter]); - $criteria = $this->getMock( + $searchCriteria = $this->getMock( 'Magento\Framework\Api\SearchCriteria', ['getFilterGroups'], [], '', false ); - $criteria->expects($this->once()) + $searchCriteria->expects($this->once()) ->method('getFilterGroups') ->willReturn([$filterGroup]); @@ -196,7 +196,7 @@ class ShipmentRepositoryTest extends \PHPUnit_Framework_TestCase ->method('create') ->willReturn($collection); - $this->assertEquals($collection, $this->subject->getList($criteria)); + $this->assertEquals($collection, $this->subject->getList($searchCriteria)); } public function testDelete() diff --git a/app/code/Magento/Sales/Test/Unit/Model/ResourceModel/Order/AddressTest.php b/app/code/Magento/Sales/Test/Unit/Model/ResourceModel/Order/AddressTest.php index ffeb136782b1ce1b16873f54caa70ce3a1dbbb88..8ac891f47b43efca38e9efae9abf6e217fdb7fea 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/ResourceModel/Order/AddressTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/ResourceModel/Order/AddressTest.php @@ -40,11 +40,6 @@ class AddressTest extends \PHPUnit_Framework_TestCase */ protected $validatorMock; - /** - * @var \Magento\Sales\Model\ResourceModel\GridPool|\PHPUnit_Framework_MockObject_MockObject - */ - protected $gridPoolMock; - /** * @var \Magento\Framework\Model\ResourceModel\Db\VersionControl\Snapshot|\PHPUnit_Framework_MockObject_MockObject */ @@ -87,13 +82,6 @@ class AddressTest extends \PHPUnit_Framework_TestCase '', false ); - $this->gridPoolMock = $this->getMock( - 'Magento\Sales\Model\ResourceModel\GridPool', - ['refreshByOrderId'], - [], - '', - false - ); $this->entitySnapshotMock = $this->getMock( 'Magento\Framework\Model\ResourceModel\Db\VersionControl\Snapshot', [], @@ -117,7 +105,6 @@ class AddressTest extends \PHPUnit_Framework_TestCase [ 'resource' => $this->appResourceMock, 'validator' => $this->validatorMock, - 'gridPool' => $this->gridPoolMock, 'entitySnapshot' => $this->entitySnapshotMock ] ); @@ -136,13 +123,9 @@ class AddressTest extends \PHPUnit_Framework_TestCase ->method('isModified') ->with($this->addressMock) ->willReturn(true); - $this->addressMock->expects($this->exactly(3)) + $this->addressMock->expects($this->once()) ->method('getParentId') ->will($this->returnValue(1)); - $this->gridPoolMock->expects($this->once()) - ->method('refreshByOrderId') - ->with($this->equalTo(1)) - ->will($this->returnSelf()); $this->addressResource->save($this->addressMock); } diff --git a/app/code/Magento/Sales/Test/Unit/Model/Service/OrderServiceTest.php b/app/code/Magento/Sales/Test/Unit/Model/Service/OrderServiceTest.php index dfbdd79bd337339cb1f54292df1f8c7ee3a36dd3..71a4bf2c0bb4819087bfeb07aa9a615a6d976545 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/Service/OrderServiceTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/Service/OrderServiceTest.php @@ -14,51 +14,67 @@ class OrderServiceTest extends \PHPUnit_Framework_TestCase * @var \Magento\Sales\Model\Service\OrderService */ protected $orderService; + /** * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Sales\Api\OrderRepositoryInterface */ protected $orderRepositoryMock; + /** * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Sales\Api\OrderStatusHistoryRepositoryInterface */ protected $orderStatusHistoryRepositoryMock; + /** * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Api\SearchCriteriaBuilder */ protected $searchCriteriaBuilderMock; + /** * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Api\SearchCriteria */ protected $searchCriteriaMock; + /** * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Api\FilterBuilder */ protected $filterBuilderMock; + /** * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Api\Filter */ protected $filterMock; + /** * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Sales\Model\OrderNotifier */ protected $orderNotifierMock; + /** * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Sales\Model\Order */ protected $orderMock; + /** * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Sales\Model\Order\Status\History */ protected $orderStatusHistoryMock; + /** * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Sales\Api\Data\OrderStatusHistorySearchResultInterface */ protected $orderSearchResultMock; + /** * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Event\ManagerInterface */ protected $eventManagerMock; + /** + * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Sales\Model\Order\Email\Sender\OrderCommentSender + */ + protected $orderCommentSender; + protected function setUp() { $this->orderRepositoryMock = $this->getMockBuilder( @@ -116,13 +132,20 @@ class OrderServiceTest extends \PHPUnit_Framework_TestCase ) ->disableOriginalConstructor() ->getMock(); + $this->orderCommentSender = $this->getMockBuilder( + 'Magento\Sales\Model\Order\Email\Sender\OrderCommentSender' + ) + ->disableOriginalConstructor() + ->getMock(); + $this->orderService = new \Magento\Sales\Model\Service\OrderService( $this->orderRepositoryMock, $this->orderStatusHistoryRepositoryMock, $this->searchCriteriaBuilderMock, $this->filterBuilderMock, $this->orderNotifierMock, - $this->eventManagerMock + $this->eventManagerMock, + $this->orderCommentSender ); } @@ -174,6 +197,7 @@ class OrderServiceTest extends \PHPUnit_Framework_TestCase public function testAddComment() { + $clearComment = "Comment text here..."; $this->orderRepositoryMock->expects($this->once()) ->method('get') ->with(123) @@ -182,10 +206,16 @@ class OrderServiceTest extends \PHPUnit_Framework_TestCase ->method('addStatusHistory') ->with($this->orderStatusHistoryMock) ->willReturn($this->orderMock); + $this->orderStatusHistoryMock->expects($this->once()) + ->method('getComment') + ->willReturn("<h1>" . $clearComment); $this->orderRepositoryMock->expects($this->once()) ->method('save') ->with($this->orderMock) ->willReturn([]); + $this->orderCommentSender->expects($this->once()) + ->method('send') + ->with($this->orderMock, false, $clearComment); $this->assertTrue($this->orderService->addComment(123, $this->orderStatusHistoryMock)); } diff --git a/app/code/Magento/Sales/Test/Unit/Observer/GridProcessAddressChangeTest.php b/app/code/Magento/Sales/Test/Unit/Observer/GridProcessAddressChangeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d6a8e5fab14f400a59d72ecf75aaddfe313577b6 --- /dev/null +++ b/app/code/Magento/Sales/Test/Unit/Observer/GridProcessAddressChangeTest.php @@ -0,0 +1,51 @@ +<?php +/** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\Sales\Test\Unit\Observer; + +/** + * Class GridProcessAddressChangeTest + */ +class GridProcessAddressChangeTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var \Magento\Sales\Observer\GridProcessAddressChange + */ + protected $observer; + + /** + * @var \Magento\Sales\Model\ResourceModel\GridPool|\PHPUnit_Framework_MockObject_MockObject + */ + protected $gridPoolMock; + + /** + * @var \Magento\Framework\Event\ObserverInterface|\PHPUnit_Framework_MockObject_MockObject + */ + protected $eventObserverMock; + + public function setUp() + { + $this->gridPoolMock = $this->getMockBuilder('Magento\Sales\Model\ResourceModel\GridPool') + ->disableOriginalConstructor() + ->getMock(); + $this->eventObserverMock = $this->getMockBuilder('Magento\Framework\Event\Observer') + ->disableOriginalConstructor() + ->setMethods(['getOrderId']) + ->getMock(); + $this->observer = new \Magento\Sales\Observer\GridProcessAddressChange($this->gridPoolMock); + } + + public function testGridsReindex() + { + $this->eventObserverMock->expects($this->once()) + ->method('getOrderId') + ->willReturn(100500); + $this->gridPoolMock->expects($this->once()) + ->method('refreshByOrderId') + ->with(100500); + $this->assertNull($this->observer->execute($this->eventObserverMock)); + } +} diff --git a/app/code/Magento/Sales/etc/events.xml b/app/code/Magento/Sales/etc/events.xml index f02fcdd77a5bcfc8b4fdbce4414cb6c7f6886759..4dfe0d47c9c9a02372868b2602a6b4f3f0e2fcb3 100644 --- a/app/code/Magento/Sales/etc/events.xml +++ b/app/code/Magento/Sales/etc/events.xml @@ -33,6 +33,9 @@ <event name="sales_order_creditmemo_delete_after"> <observer name="sales_grid_order_creditmemo_sync_remove" instance="SalesCreditmemoIndexGridSyncRemove" /> </event> + <event name="admin_sales_order_address_update"> + <observer name="sales_grid_admin_refresh_grids" instance="Magento\Sales\Observer\GridProcessAddressChange" /> + </event> <event name="config_data_dev_grid_async_indexing_disabled"> <observer name="sales_grid_order_async_insert" instance="SalesOrderIndexGridAsyncInsertObserver" /> <observer name="sales_grid_order_invoice_async_insert" instance="SalesInvoiceIndexGridAsyncInsertObserver" /> diff --git a/app/code/Magento/SalesRule/Model/Plugin/Rule.php b/app/code/Magento/SalesRule/Model/Plugin/Rule.php index 7bf8cb3c43d8aad796e96c8aec699536466b0091..8aa29ffe419e73635fc8fb845a652d1bcc9af86e 100644 --- a/app/code/Magento/SalesRule/Model/Plugin/Rule.php +++ b/app/code/Magento/SalesRule/Model/Plugin/Rule.php @@ -13,7 +13,7 @@ class Rule * @return \Magento\SalesRule\Model\Rule * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function aroundLoadCouponCode( + public function aroundLoadRelations( \Magento\SalesRule\Model\Rule $subject, \Closure $proceed ) { diff --git a/app/code/Magento/SalesRule/Model/Rule.php b/app/code/Magento/SalesRule/Model/Rule.php index 200a836592c1c8bdfd1cf21d2330b23d7b609aca..4ecc75f77dd891ea1be1580e555c017ebda9da5d 100644 --- a/app/code/Magento/SalesRule/Model/Rule.php +++ b/app/code/Magento/SalesRule/Model/Rule.php @@ -231,11 +231,23 @@ class Rule extends \Magento\Rule\Model\AbstractModel */ protected function _afterLoad() { - $this->loadCouponCode(); + $this->loadRelations(); return parent::_afterLoad(); } /** + * Load all relative data + * + * @return void + */ + public function loadRelations() + { + $this->loadCouponCode(); + } + + /** + * Load coupon code + * * @return void */ public function loadCouponCode() diff --git a/app/code/Magento/SalesRule/Observer/SalesOrderAfterPlaceObserver.php b/app/code/Magento/SalesRule/Observer/SalesOrderAfterPlaceObserver.php index 1d1a6be10918d384aaaa5906b395c7f30f02c8e3..9ceb8221d17a2577af41219fc483601080e7cd11 100644 --- a/app/code/Magento/SalesRule/Observer/SalesOrderAfterPlaceObserver.php +++ b/app/code/Magento/SalesRule/Observer/SalesOrderAfterPlaceObserver.php @@ -77,6 +77,7 @@ class SalesOrderAfterPlaceObserver implements ObserverInterface $rule = $this->_ruleFactory->create(); $rule->load($ruleId); if ($rule->getId()) { + $rule->loadCouponCode(); $rule->setTimesUsed($rule->getTimesUsed() + 1); $rule->save(); diff --git a/app/code/Magento/SalesRule/Test/Unit/Model/Plugin/RuleTest.php b/app/code/Magento/SalesRule/Test/Unit/Model/Plugin/RuleTest.php index fb788c5cf5b6f22efc7b99f421bb77d6267b69ce..a30a4acb36a0f29d55a4716a17cc33d770cdd82a 100644 --- a/app/code/Magento/SalesRule/Test/Unit/Model/Plugin/RuleTest.php +++ b/app/code/Magento/SalesRule/Test/Unit/Model/Plugin/RuleTest.php @@ -14,7 +14,7 @@ class RuleTest extends \PHPUnit_Framework_TestCase protected $plugin; /**} - * @var \PHPUnit_Framework_MockObject_MockObject + * @var \Magento\SalesRule\Model\Rule|\PHPUnit_Framework_MockObject_MockObject */ protected $subject; @@ -36,11 +36,11 @@ class RuleTest extends \PHPUnit_Framework_TestCase $this->plugin = $objectManager->getObject('Magento\SalesRule\Model\Plugin\Rule'); } - public function testLoadCouponCode() + public function testLoadRelations() { $this->assertEquals( $this->subject, - $this->plugin->aroundLoadCouponCode($this->subject, $this->genericClosure) + $this->plugin->aroundLoadRelations($this->subject, $this->genericClosure) ); } } diff --git a/app/code/Magento/Theme/view/frontend/templates/html/pager.phtml b/app/code/Magento/Theme/view/frontend/templates/html/pager.phtml index e7835bee90cc63bb03928e2f24edeccd8cb17987..331903c8ced116e52835c475c43e26559f25e55e 100644 --- a/app/code/Magento/Theme/view/frontend/templates/html/pager.phtml +++ b/app/code/Magento/Theme/view/frontend/templates/html/pager.phtml @@ -116,7 +116,7 @@ <?php if ($block->isShowPerPage()): ?> <div class="limiter"> <strong class="limiter-label"><?php /* @escapeNotVerified */ echo __('Show') ?></strong> - <select id="limiter" data-mage-redirect="{'event':'change'}" class="limiter-options"> + <select id="limiter" data-mage-init='{"redirectUrl": {"event":"change"}}' class="limiter-options"> <?php foreach ($block->getAvailableLimit() as $_key => $_limit): ?> <option value="<?php /* @escapeNotVerified */ echo $block->getLimitUrl($_key) ?>"<?php if ($block->isLimitCurrent($_key)): ?> selected="selected"<?php endif ?>> diff --git a/app/code/Magento/Weee/README.md b/app/code/Magento/Weee/README.md index 3fda5bbc12bb038acf560c52d48571ecfd587b4d..0218dcd85ed9cb433e21a52a44e856be287f8aaa 100644 --- a/app/code/Magento/Weee/README.md +++ b/app/code/Magento/Weee/README.md @@ -18,7 +18,7 @@ Magento_Weee module can be installed automatically (using native Magento install Magento installation with existing products with FPT: * Disable FPT on the backend * Remove all products with FPT -* Remove all FPT attributes from product templates +* Remove all FPT attributes from attribute sets * Delete all FPT attributes * Remove module directory from the code base * New Magento installation: diff --git a/app/design/adminhtml/Magento/backend/Magento_Backend/web/css/source/module/main/_collapsible-blocks.less b/app/design/adminhtml/Magento/backend/Magento_Backend/web/css/source/module/main/_collapsible-blocks.less index 730f3d53ff58c7e23ab424d3926e85948cf1d305..78129d62a70de8796227b5d870c8aadafe147861 100644 --- a/app/design/adminhtml/Magento/backend/Magento_Backend/web/css/source/module/main/_collapsible-blocks.less +++ b/app/design/adminhtml/Magento/backend/Magento_Backend/web/css/source/module/main/_collapsible-blocks.less @@ -253,6 +253,9 @@ .scope-label { padding: 31px 1.5rem 0 0; } + .use-default { + padding: 29px 1.5rem 0 0; + } .value { padding-right: 4rem; } diff --git a/app/design/adminhtml/Magento/backend/Magento_ConfigurableProduct/web/css/source/_module.less b/app/design/adminhtml/Magento/backend/Magento_ConfigurableProduct/web/css/source/_module.less index 16606bb518d0a486f728d432bc957e385edf9e83..3d25c7dbf0b6731c2cffeaeff881d293dcefae95 100644 --- a/app/design/adminhtml/Magento/backend/Magento_ConfigurableProduct/web/css/source/_module.less +++ b/app/design/adminhtml/Magento/backend/Magento_ConfigurableProduct/web/css/source/_module.less @@ -11,7 +11,7 @@ @import 'module/components/_navigation-bar.less'; // Navigation Bar @import 'module/components/_grid.less'; // Grid styles @import 'module/components/_currency-addon.less'; // Currency Addon Styles -@import 'module/components/_attributes_template_popup.less'; // Choose Affected Product Template popup +@import 'module/components/_attributes_template_popup.less'; // Choose Affected Attribute Set popup // Main Steps @import 'module/steps/_select-attributes.less'; diff --git a/app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/module/checkout/_payment-options.less b/app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/module/checkout/_payment-options.less index 0de27d21df32f5a65c45e23f1c67b5a09f1fd9d1..4f8c9b771654909e46c3d61764fa9a134c03ff44 100644 --- a/app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/module/checkout/_payment-options.less +++ b/app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/module/checkout/_payment-options.less @@ -105,6 +105,58 @@ filter: gray; // For IE 6 - 9 } } + + .ccard { + .legend { + &:extend(.abs-visually-hidden all); + } + .fields { + > .year { + padding-left: @indent__xs; + } + .select { + padding-left: @indent__xs; + padding-right: @indent__xs; + } + } + .month { + .select { + width: 140px; + } + } + .year { + .select { + width: 80px; + } + } + .number { + .input-text { + width: 225px; + } + } + + > .field.cvv { + > .control { + padding-right: @indent__base; + width: auto; + } + } + .cvv { + .input-text { + width: 55px; + } + } + + &.fieldset { + > .field { + .fields.group.group-2 { + .field { + width: auto !important; + } + } + } + } + } } } diff --git a/app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/module/checkout/_payments.less b/app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/module/checkout/_payments.less index 741516ae64dd30e2e11067ebc2a3c7d574ba95a9..516d9e21e8b091645193355d94bef8c86f5c2f87 100644 --- a/app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/module/checkout/_payments.less +++ b/app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/module/checkout/_payments.less @@ -76,13 +76,6 @@ margin: 0 0 @indent__base; } } - .field { - &.cvv { - .control { - width: 40%; - } - } - } } .field-select-billing, @@ -136,14 +129,6 @@ .no-payments-block { margin: @indent__base 0; } - .ccard { - .legend { - &:extend(.abs-visually-hidden all); - } - .year { - padding-left: @indent__l; - } - } .payments { .legend { &:extend(.abs-visually-hidden all); diff --git a/app/design/frontend/Magento/blank/Magento_LayeredNavigation/web/css/source/_module.less b/app/design/frontend/Magento/blank/Magento_LayeredNavigation/web/css/source/_module.less index 8b3d0a38fe55dcf3540acd828ce9a4eae32f0f4a..c51aac33382940011e165490c0ca0eae85451536 100644 --- a/app/design/frontend/Magento/blank/Magento_LayeredNavigation/web/css/source/_module.less +++ b/app/design/frontend/Magento/blank/Magento_LayeredNavigation/web/css/source/_module.less @@ -4,75 +4,88 @@ // */ // -// Common -//-------------------------------------- +// Common +// _____________________________________________ & when (@media-common = true) { -.block.filter { - margin-bottom: 40px; - .title { - margin-bottom: 20px; - strong { - font-size: 18px; - } - } - .subtitle { - display: none; - } - .filter-options-content { - .filter-count-label { - &:extend(.abs-visually-hidden all); + .block.filter { + margin-bottom: @indent__xl ; + .title { + margin-bottom: @indent__base; + strong { + font-size: 18px; + } } - } - .options { - margin: 0; - > dt { - .lib-heading(h4); - margin: 0 0 10px; + .subtitle { + display: none; } - > dd { - margin: 0 0 25px; - - .item { - margin-bottom: 3px; + .filter-options-content { + .filter-count-label { + &:extend(.abs-visually-hidden all); } } - .count { - .lib-css(color, @text__color__muted); - &:before { - content: '('; + .options { + margin: 0; + > dt { + .lib-heading(h4); + margin: 0 0 @indent__s; } - &:after { - content: ')'; + > dd { + margin: 0 0 @indent__m; + + .item { + margin-bottom: 3px; + } + } + .count { + .lib-css(color, @text__color__muted); + &:before { + content: '('; + } + &:after { + content: ')'; + } } } - } - .items { - &:extend(.abs-reset-list all); - } - .filtered { .items { - margin: 15px 0; + &:extend(.abs-reset-list all); } - .item { - position: relative; - padding-left: 22px; - margin-bottom: 6px; - .label { - font-weight: @font-weight__bold; + .filtered { + .items { + margin: 15px 0; } - .action.remove { - &:extend(.abs-remove-button-for-blocks all); - position: absolute; - left: -6px; - top: 0; + .item { + margin-bottom: 6px; + padding-left: 22px; + position: relative; + .label { + font-weight: @font-weight__bold; + } + .action.remove { + &:extend(.abs-remove-button-for-blocks all); + left: -6px; + position: absolute; + top: 0; + } + } + & + .actions { + margin-bottom: 35px; } - } - & + .actions { - margin-bottom: 35px; } } } +// +// Mobile +// _____________________________________________ + +.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__s) { + .page-with-filter { + .columns { + .sidebar-main { + .lib-vendor-prefix-order(0); + } + } + } } diff --git a/app/design/frontend/Magento/blank/web/css/source/_navigation.less b/app/design/frontend/Magento/blank/web/css/source/_navigation.less index 4e4b410c5f6e28d62b5619792c739f760976103f..f4fee4d5d7d4e92f7c16e69eb4c83c469f7b58b6 100644 --- a/app/design/frontend/Magento/blank/web/css/source/_navigation.less +++ b/app/design/frontend/Magento/blank/web/css/source/_navigation.less @@ -86,7 +86,7 @@ font-size: 1.6rem; font-weight: 700; margin: 0; - padding: 8px 20px; + padding: .8rem 3.5rem .8rem 2rem; .label { display: block; margin-bottom: @indent__xs; @@ -125,16 +125,17 @@ .header.links { .lib-list-reset-styles(); + border-bottom: 1px solid @color-gray82; li { - border-top: 1px solid @color-gray82; font-size: 1.6rem; margin: 0; &.greet.welcome { + border-top: 1px solid @color-gray82; font-weight: 700; - padding: 8px 20px; + padding: .8rem @indent__base; } - &:last-child { - border-bottom: 1px solid @color-gray82; + > a { + border-top: 1px solid @color-gray82; } } a, @@ -143,7 +144,10 @@ .lib-css(text-decoration, @navigation-level0-item__text-decoration); display: block; font-weight: 700; - padding: 8px 20px; + padding: .8rem @indent__base; + } + .header.links { + border: 0; } } } @@ -217,6 +221,11 @@ background: transparent; border-bottom: 0; } + .nav-sections-item-switch { + &:hover { + text-decoration: none; + } + } } &-item-content { diff --git a/app/design/frontend/Magento/luma/Magento_Checkout/web/css/source/module/checkout/_payment-options.less b/app/design/frontend/Magento/luma/Magento_Checkout/web/css/source/module/checkout/_payment-options.less new file mode 100644 index 0000000000000000000000000000000000000000..555098fcefb113aa8c98fa535c37ac960278abe2 --- /dev/null +++ b/app/design/frontend/Magento/luma/Magento_Checkout/web/css/source/module/checkout/_payment-options.less @@ -0,0 +1,203 @@ +// /** +// * Copyright © 2015 Magento. All rights reserved. +// * See COPYING.txt for license details. +// */ + +// +// Variables +// _____________________________________________ + +@checkout-payment-option-title__border: @checkout-payment-method-title__border; +@checkout-payment-option-title__color: @link__color; +@checkout-payment-option-title__padding: @checkout-payment-method-title__padding; +@checkout-payment-option-title-mobile__padding: @checkout-payment-method-title-mobile__padding; + +@checkout-payment-option-title-icon__font-size: 32px; +@checkout-payment-option-title-icon__line-height: 16px; +@checkout-payment-option-title-icon__margin: 0; +@checkout-payment-option-title-icon__color: @minicart-icons-color; +@checkout-payment-option-title-icon__hover__color: @primary__color; + +@checkout-payment-option-content__padding__xl: @checkout-payment-method-content__padding__xl; + +// +// Common +// _____________________________________________ + +& when (@media-common = true) { + .checkout-payment-method { + .payment-option { + &._active { + .payment-option-title { + .action-toggle { + &:after { + content: @icon-up; + } + } + } + } + &._collapsible { + .payment-option-title { + cursor: pointer; + } + .payment-option-content { + display: none; + } + } + } + + .payment-option-title { + .lib-css(border-top, @checkout-payment-option-title__border); + .lib-css(padding, @checkout-payment-option-title__padding 0); + + .action-toggle { + .lib-css(color, @checkout-payment-option-title__color); + .lib-icon-font( + @icon-down, + @_icon-font-size: @checkout-payment-option-title-icon__font-size, + @_icon-font-line-height: @checkout-payment-option-title-icon__line-height, + @_icon-font-color: @checkout-payment-option-title-icon__color, + @_icon-font-color-hover: @checkout-payment-option-title-icon__hover__color, + @_icon-font-color-active: @checkout-payment-option-title-icon__color, + @_icon-font-margin: @checkout-payment-option-title-icon__margin, + @_icon-font-position: after + ); + } + } + + .payment-option-content { + .lib-css(padding, 0 0 @indent__base @checkout-payment-option-content__padding__xl); + } + + .payment-option-inner { + margin: 0 0 @indent__base; + } + + .credit-card-types { + padding: 0; + .item { + display: inline-block; + list-style: none; + margin: 0 @indent__xs 0 0; + vertical-align: top; + &._active { + font-weight: @font-weight__bold; + img { + -webkit-filter: grayscale(0%); + filter: grayscale(0%); + filter: none; + } + } + &._inactive { + opacity: 0.4; + filter: alpha(opacity=40); + } + span { + display: inline-block; + padding-top: 6px; + vertical-align: top; + } + } + img { + -webkit-filter: grayscale(100%); // For Webkit browsers + -webkit-transition: all .6s ease; // Fade to color for Chrome and Safari + filter: grayscale(100%); + filter: gray; // For IE 6 - 9 + } + } + + .ccard { + .legend { + &:extend(.abs-visually-hidden all); + } + .fields { + > .year { + padding-left: @indent__xs; + } + .select { + padding-left: @indent__xs; + padding-right: @indent__xs; + } + } + .month { + .select { + width: 140px; + } + } + .year { + .select { + width: 80px; + } + } + .number { + .input-text { + width: 225px; + } + } + + > .field.cvv { + > .control { + display: inline-block; + padding-right: @indent__base; + } + } + .cvv { + .label { + display: block; + } + .input-text { + width: 55px; + } + } + + &.fieldset { + > .field { + .fields.group.group-2 { + .field { + width: auto !important; + } + } + } + } + } + } +} + +// +// Mobile +// _____________________________________________ + +.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__m) { + .checkout-payment-method { + .payment-option { + .lib-css(margin, 0 -(@checkout-payment-option-title-mobile__padding)); + + .payment-option-title { + .lib-css(padding, @checkout-payment-option-title-mobile__padding) + } + + .payment-option-content { + .lib-css(padding, 0 @checkout-payment-option-title-mobile__padding @indent__base); + } + } + } +} + +// +// Desktop +// _____________________________________________ + +.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) { + .checkout-payment-method { + .payment-option-title { + .lib-css(padding-left, @checkout-payment-option-content__padding__xl); + } + .payment-option-content { + .payment-option-inner { + + .actions-toolbar { + margin-left: 0; + } + } + } + } +} diff --git a/app/design/frontend/Magento/luma/Magento_Checkout/web/css/source/module/checkout/_payments.less b/app/design/frontend/Magento/luma/Magento_Checkout/web/css/source/module/checkout/_payments.less index c0f1168e6ef0f0a2513ed747ed59cebf21d85fe4..0940e6e4723609fa1da4a64f6fa315bca9999472 100644 --- a/app/design/frontend/Magento/luma/Magento_Checkout/web/css/source/module/checkout/_payments.less +++ b/app/design/frontend/Magento/luma/Magento_Checkout/web/css/source/module/checkout/_payments.less @@ -76,13 +76,6 @@ margin: 0 0 @indent__base; } } - .field { - &.cvv { - .control { - width: 40%; - } - } - } } .field-select-billing, @@ -136,14 +129,6 @@ .no-payments-block { margin: @indent__base 0; } - .ccard { - .legend { - &:extend(.abs-visually-hidden all); - } - .year { - padding-left: @indent__l; - } - } .payments { .legend { &:extend(.abs-visually-hidden all); diff --git a/app/design/frontend/Magento/luma/Magento_LayeredNavigation/web/css/source/_module.less b/app/design/frontend/Magento/luma/Magento_LayeredNavigation/web/css/source/_module.less index 898ddc99afdfa2d23f5d8f7baf12d8d65baec71e..17cadfeb19cd5bec72ae4e0f54888586dbf3f39e 100644 --- a/app/design/frontend/Magento/luma/Magento_LayeredNavigation/web/css/source/_module.less +++ b/app/design/frontend/Magento/luma/Magento_LayeredNavigation/web/css/source/_module.less @@ -4,238 +4,239 @@ // */ // -// Common -//-------------------------------------- +// Common +// _____________________________________________ & when (@media-common = true) { + .filter { + &.block { + margin-bottom: 0; + } + &-title { + strong { + @_shadow: inset 0 1px 0 0 @color-white, inset 0 -1px 0 0 fade(@border-color__base, 30); -.filter { - &.block { - margin-bottom: 0; - } - &-title { - strong { - position: absolute; - z-index: 2; - line-height: 16px; - border: 1px solid @border-color__base; - text-align: center; - padding: 7px 10px; - @_shadow: inset 0 1px 0 0 @color-white, inset 0 -1px 0 0 fade(@border-color__base, 30); - .lib-css(background-color, @toolbar-element-background); - .lib-css(box-shadow, @_shadow); - border-radius: 3px; - font-weight: 400; - top: 0; - left: 0; - &[data-count]:after { - content: attr(data-count); - display: inline-block; - border-radius: 2px; - padding: 2px; - font-size: .8em; - margin: 0 5px; - .lib-css(color, @color-white); - min-width: 1em; - line-height: 1; - background: @color-orange-red4; - } - &.disabled { - opacity: .5; + .lib-css(background-color, @toolbar-element-background); + .lib-css(box-shadow, @_shadow); + border-radius: 3px; + border: 1px solid @border-color__base; + font-weight: 400; + left: 0; + line-height: 16px; + padding: 7px @indent__s; + position: absolute; + text-align: center; + top: 0; + z-index: 2; + &[data-count]:after { + .lib-css(color, @color-white); + background: @color-orange-red4; + border-radius: 2px; + content: attr(data-count); + display: inline-block; + font-size: .8em; + line-height: 1; + margin: 0 @indent__xs; + min-width: 1em; + padding: 2px; + } + &.disabled { + opacity: .5; + } } } - } - .block-subtitle { - font-weight: @font-weight__semibold; - padding: @indent__s @indent__s @indent__base; - font-size: @font-size__base; - line-height: 1em; - border-bottom: @border-width__base solid @border-color__base; - } - &-subtitle { - display: none; - } - &-current { - margin: 0; - .items { - padding: @indent__xs @indent__s; + .block-subtitle { + border-bottom: @border-width__base solid @border-color__base; + font-size: @font-size__base; + font-weight: @font-weight__semibold; + line-height: 1em; + padding: @indent__s @indent__s @indent__base; } - .item { - position: relative; - z-index: 1; - padding-left: 17px; + &-subtitle { + display: none; } - .filter &-subtitle { - display: block; - border: none; - padding-bottom: @indent__s; + &-current { + margin: 0; + .items { + padding: @indent__xs @indent__s; + } + .item { + padding-left: 17px; + position: relative; + z-index: 1; + } + .filter &-subtitle { + border: none; + display: block; + padding-bottom: @indent__s; + } + .action.remove { + &:extend(.abs-remove-button-for-blocks all); + left: -2px; + position: absolute; + top: -1px; + } } - .action.remove { - &:extend(.abs-remove-button-for-blocks all); - position: absolute; - left: -2px; - top: -1px; + &-actions { + margin-bottom: @indent__m; + padding: 0 @indent__s; } - } - &-actions { - padding: 0 @indent__s; - margin-bottom: @indent__m; - } - &-label { - font-weight: @font-weight__bold; - &:after { - content: ": "; + &-label { + font-weight: @font-weight__bold; + &:after { + content: ': '; + } } - } - &-value { - .lib-css(color, @filter-quantity); - } - &-options { - display: none; - margin: 0; - &-item { - border-bottom: @border-width__base solid @border-color__base; - padding-bottom: @indent__s; + &-value { + .lib-css(color, @filter-quantity); } - &-title { - cursor: pointer; - font-weight: @font-weight__semibold; + &-options { + display: none; margin: 0; - overflow: hidden; - padding: @indent__s 20px+@indent__s 0 @indent__s; - position: relative; - z-index: 1; - text-transform: uppercase; - - .lib-icon-font( + &-item { + border-bottom: @border-width__base solid @border-color__base; + padding-bottom: @indent__s; + } + &-title { + cursor: pointer; + font-weight: @font-weight__semibold; + margin: 0; + overflow: hidden; + padding: @indent__s 20px+@indent__s 0 @indent__s; + position: relative; + text-transform: uppercase; + z-index: 1; + .lib-icon-font( @_icon-font-content: @icon-down, @_icon-font-size: 13px, @_icon-font-position: after, @_icon-font-display: block - ); - &:after { - position: absolute; - right: 13px; - top: 9px; - } - &:hover { - .lib-css(color, @filter-link-hover); - } - .active > & { - .lib-icon-font-symbol( - @_icon-font-content: @icon-up, - @_icon-font-position: after ); - } - } - &-content { - margin: 0; - padding: @indent__s; - .item { - margin: @indent__s 0; - line-height: 1.5em; - } - a { - .lib-css(color, @filter-link); - margin-right: -5px; - padding-left: 5px; - margin-left: -5px; - padding-right: 7px; + + &:after { + position: absolute; + right: 13px; + top: 9px; + } &:hover { - background-color: @color-gray91; - text-decoration: none; - & + .count { + .lib-css(color, @filter-link-hover); + } + .active > & { + .lib-icon-font-symbol( + @_icon-font-content: @icon-up, + @_icon-font-position: after + ); + } + } + &-content { + margin: 0; + padding: @indent__s; + .item { + margin: @indent__s 0; + line-height: 1.5em; + } + a { + .lib-css(color, @filter-link); + margin-left: -5px; + margin-right: -5px; + padding-left: 5px; + padding-right: 7px; + &:hover { background-color: @color-gray91; + text-decoration: none; + & + .count { + background-color: @color-gray91; + } } } - } - .count { - .lib-css(color, @filter-quantity); - padding-right: 5px; - &:before { - content: "("; + .count { + .lib-css(color, @filter-quantity); + padding-right: 5px; + &:before { + content: '('; + } + &:after { + content: ')'; + } } - &:after { - content: ")"; + .filter-count-label { + &:extend(.abs-visually-hidden all); } } - .filter-count-label { - &:extend(.abs-visually-hidden all); - } } } } -} - // -// Mobile -//-------------------------------------- +// Mobile +// _____________________________________________ .media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__s) { - body.filter-active { - .page-wrapper { - visibility: hidden; - height: 0; - margin-top: -999999em; - } - .columns { - z-index: 999; + body { + &.filter-active { + .page-wrapper { + height: 0; + margin-top: -999999em; + visibility: hidden; + } + .columns { + z-index: 999; + } } } .filter { &.active { position: relative; - z-index: 99; visibility: visible; + z-index: 99; .filter-options-item:last-child { margin-bottom: @indent__xl; } .filter-title { + border-bottom: 1px solid @border-color__base; + height: 48px; + left: 0; position: fixed; - top: 0; right: 0; - left: 0; - height: 48px; + top: 0; z-index: 2; - border-bottom: 1px solid @border-color__base; strong { - right: 3px; - left: auto; - top: 10px; - border: 0; - background: none; - .lib-css(box-shadow, none); - color: transparent; - .lib-icon-font( - @icon-remove, - @_icon-font-color: @text__color__muted, - @_icon-font-size: 16px, - @_icon-font-position: after - ); + .lib-css(box-shadow, none); + background: none; + border: 0; + color: transparent; + left: auto; + right: 3px; + top: 10px; + .lib-icon-font( + @icon-remove, + @_icon-font-color: @text__color__muted, + @_icon-font-size: 16px, + @_icon-font-position: after + ); } } .filter-subtitle { + .lib-css(background, @toolbar-background); display: block; + height: 50px; + left: 0; + line-height: 32px; position: fixed; - top: 0; right: 0; - left: 0; - height: 50px; - .lib-css(background, @toolbar-background); + top: 0; z-index: 1; - line-height: 32px; } .filter-options { + .lib-css(background, @color-white); + bottom: 0; display: block; - position: fixed; - top: 50px; left: 0; - right: 0; - bottom: 0; overflow: scroll; - .lib-css(background, @color-white); + position: fixed; + right: 0; + top: 50px; z-index: 10; } } @@ -253,36 +254,23 @@ padding: @indent__xs @indent__s; } } - .filter-no-options { - .filter-title:before { - content: ""; - width: 100px; - height: 40px; - background: rgba(255,255,255,.5); - display: block; - position: relative; - z-index: 99; - margin-top: -40px; - left: -15px; - } - } .filter .filter-current { - margin: @indent__xs -@indent__s 0; border: solid @border-color__base; border-width: 1px 0; + margin: @indent__xs -@indent__s 0; .items { display: none; } &-subtitle { - text-transform: uppercase; position: relative; + text-transform: uppercase; z-index: 1; .lib-icon-font( - @_icon-font-content: @icon-down, - @_icon-font-size: 13px, - @_icon-font-position: before, - @_icon-font-display: block + @_icon-font-content: @icon-down, + @_icon-font-size: 13px, + @_icon-font-position: before, + @_icon-font-display: block ); &:before { position: absolute; @@ -291,17 +279,17 @@ } &:after { + .lib-css(color, @text__color__muted); content:' (' attr(data-count) ')'; font-size:.9em; - .lib-css(color, @text__color__muted); } } &.active { padding-bottom: 30px; .block-subtitle { .lib-icon-font-symbol( - @_icon-font-content: @icon-up, - @_icon-font-position: before + @_icon-font-content: @icon-up, + @_icon-font-position: before ); } .items { @@ -315,6 +303,31 @@ display: none; } } + .filter-no-options { + .filter-title { + &:before { + background: rgba(255,255,255,.5); + content: ''; + display: block; + height: 40px; + left: -15px; + margin-top: -60px; + position: relative; + width: 100px; + z-index: 99; + } + } + .filter-content { + margin-bottom: @indent__base; + } + } + .page-with-filter { + .columns { + .sidebar-main { + .lib-vendor-prefix-order(0); + } + } + } } .media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__s) { @@ -336,11 +349,11 @@ } &.active &-options, &-options { + background: transparent; clear: both; - position: static; - overflow: initial; display: block; - background: transparent; + overflow: initial; + position: static; } &-subtitle { position: static; @@ -357,9 +370,9 @@ position: static; } &.page-with-filter .column.main { + padding-top: 45px; position: relative; z-index: 1; - padding-top: 45px; } .filter { &.block { @@ -373,8 +386,8 @@ } &-options { &-item { - display: inline-block; border: 0; + display: inline-block; margin-right: @indent__m; &.active { position: relative; @@ -384,14 +397,14 @@ } &:after, &:before { - content: ""; - display: block; .lib-arrow(up, 8px, @color-black); - position: absolute; - left: 50%; bottom: -1px; + content: ''; + display: block; + left: 50%; + margin-left: -@indent__base; + position: absolute; z-index: 3; - margin-left: -20px; } &:after { .lib-css(border-bottom-color, @color-white); @@ -401,7 +414,7 @@ } } &-title { - padding: 0 20px 0 0; + padding: 0 @indent__base 0 0; &:after { right: 2px; top: 3px; @@ -409,15 +422,16 @@ } } &-content { - position: absolute; - z-index: 2; + @_shadow: 0 3px 5px 0 rgba(50, 50, 50, .75); + .lib-css(background, @color-white); - width: 180px; - top: 100%; + .lib-css(box-shadow, @_shadow, 1); border: 1px solid @border-color__base; padding: @indent__xs 0; - @_shadow: 0 3px 5px 0 rgba(50, 50, 50, .75); - .lib-css(box-shadow, @_shadow, 1); + position: absolute; + top: 100%; + width: 180px; + z-index: 2; .item { padding: @indent__xs; margin:0; @@ -434,13 +448,13 @@ display: inline; line-height: 35px; &-subtitle { - display: inline; - padding: 0; .lib-css(color, @text__color__muted); + display: inline; font-size: @font-size__base; font-weight: normal; + padding: 0; &:after { - content: ":"; + content: ':'; } } .item, diff --git a/dev/tests/api-functional/testsuite/Magento/Bundle/Api/OrderItemRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/Bundle/Api/OrderItemRepositoryTest.php index 72005876cc595da0a6d1a2ae85a258464b07781f..5944edff812c676dcaba7654e4c76d695dc7d6a3 100644 --- a/dev/tests/api-functional/testsuite/Magento/Bundle/Api/OrderItemRepositoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Bundle/Api/OrderItemRepositoryTest.php @@ -76,7 +76,7 @@ class OrderItemRepositoryTest extends WebapiAbstract ] ); - $requestData = ['criteria' => $searchCriteriaBuilder->create()->__toArray()]; + $requestData = ['searchCriteria' => $searchCriteriaBuilder->create()->__toArray()]; $serviceInfo = [ 'rest' => [ diff --git a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/OrderItemRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/OrderItemRepositoryTest.php index db63fbb6084601820a27dc4cc770fa6826a28507..613be6d50073ef492226d584b747077c26af59c4 100644 --- a/dev/tests/api-functional/testsuite/Magento/Catalog/Api/OrderItemRepositoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Catalog/Api/OrderItemRepositoryTest.php @@ -76,7 +76,7 @@ class OrderItemRepositoryTest extends WebapiAbstract ] ); - $requestData = ['criteria' => $searchCriteriaBuilder->create()->__toArray()]; + $requestData = ['searchCriteria' => $searchCriteriaBuilder->create()->__toArray()]; $serviceInfo = [ 'rest' => [ diff --git a/dev/tests/api-functional/testsuite/Magento/ConfigurableProduct/Api/OrderItemRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/ConfigurableProduct/Api/OrderItemRepositoryTest.php index 25cb0e8652bf2996a9864e68bfcbeb5fb977fe63..318a225288827759eb65bb32793fac5bf0536144 100644 --- a/dev/tests/api-functional/testsuite/Magento/ConfigurableProduct/Api/OrderItemRepositoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/ConfigurableProduct/Api/OrderItemRepositoryTest.php @@ -76,7 +76,7 @@ class OrderItemRepositoryTest extends WebapiAbstract ] ); - $requestData = ['criteria' => $searchCriteriaBuilder->create()->__toArray()]; + $requestData = ['searchCriteria' => $searchCriteriaBuilder->create()->__toArray()]; $serviceInfo = [ 'rest' => [ diff --git a/dev/tests/api-functional/testsuite/Magento/Downloadable/Api/OrderItemRepositoryTest.php b/dev/tests/api-functional/testsuite/Magento/Downloadable/Api/OrderItemRepositoryTest.php index 41a5c6a506962a018eeb8421c6d8bc53f5ad7567..e3da911ba3a17affc4049868fd524d93672a1611 100644 --- a/dev/tests/api-functional/testsuite/Magento/Downloadable/Api/OrderItemRepositoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Downloadable/Api/OrderItemRepositoryTest.php @@ -76,7 +76,7 @@ class OrderItemRepositoryTest extends WebapiAbstract ] ); - $requestData = ['criteria' => $searchCriteriaBuilder->create()->__toArray()]; + $requestData = ['searchCriteria' => $searchCriteriaBuilder->create()->__toArray()]; $serviceInfo = [ 'rest' => [ diff --git a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/CreditmemoListTest.php b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/CreditmemoListTest.php index d3216b9cf41c17d454e7e46ed7d8be1051561586..892f4ca944a4673641d705bdea7d9acd5da12ead 100644 --- a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/CreditmemoListTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/CreditmemoListTest.php @@ -68,7 +68,7 @@ class CreditmemoListTest extends WebapiAbstract ); $searchData = $searchCriteriaBuilder->create()->__toArray(); - $requestData = ['criteria' => $searchData]; + $requestData = ['searchCriteria' => $searchData]; $serviceInfo = [ 'rest' => [ 'resourcePath' => self::RESOURCE_PATH . '?' . http_build_query($requestData), diff --git a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/InvoiceListTest.php b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/InvoiceListTest.php index b529af4d554d2a5be200e05d1f3c42abc1b3f7b7..6b8aa48df12f2337e603c79bda7200806a5c358b 100644 --- a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/InvoiceListTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/InvoiceListTest.php @@ -53,7 +53,7 @@ class InvoiceListTest extends WebapiAbstract ); $searchData = $searchCriteriaBuilder->create()->__toArray(); - $requestData = ['criteria' => $searchData]; + $requestData = ['searchCriteria' => $searchData]; $serviceInfo = [ 'rest' => [ 'resourcePath' => self::RESOURCE_PATH . '?' . http_build_query($requestData), diff --git a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderItemGetListTest.php b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderItemGetListTest.php index 1cd2b7a30656eea7334dbf9266281f9871bceeec..e91f747116db0ac2eea035af55096c8ba9517e20 100644 --- a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderItemGetListTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderItemGetListTest.php @@ -48,7 +48,7 @@ class OrderItemGetListTest extends WebapiAbstract ] ); - $requestData = ['criteria' => $searchCriteriaBuilder->create()->__toArray()]; + $requestData = ['searchCriteria' => $searchCriteriaBuilder->create()->__toArray()]; $serviceInfo = [ 'rest' => [ diff --git a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderListTest.php b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderListTest.php index 003ccfccf94e8e7fffef995a27e4fd36932378cf..a6598376efb31d1119eba37ce3dad2decbef64ca 100644 --- a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderListTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderListTest.php @@ -54,7 +54,7 @@ class OrderListTest extends WebapiAbstract ); $searchData = $searchCriteriaBuilder->create()->__toArray(); - $requestData = ['criteria' => $searchData]; + $requestData = ['searchCriteria' => $searchData]; $serviceInfo = [ 'rest' => [ 'resourcePath' => self::RESOURCE_PATH . '?' . http_build_query($requestData), diff --git a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/ShipmentListTest.php b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/ShipmentListTest.php index a06f22664920a35b9990442f7a6f2adb4c6c013f..678edb386c75315b9d4dfa4ad5f15334f358c305 100644 --- a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/ShipmentListTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/ShipmentListTest.php @@ -46,7 +46,7 @@ class ShipmentListTest extends WebapiAbstract $searchCriteriaBuilder->addFilters([$filterBuilder->setField('shipment_status')->setValue(1)->create()]); $searchData = $searchCriteriaBuilder->create()->__toArray(); - $requestData = ['criteria' => $searchData]; + $requestData = ['searchCriteria' => $searchData]; $serviceInfo = [ 'rest' => [ 'resourcePath' => self::RESOURCE_PATH . '?' . http_build_query($requestData), diff --git a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/TransactionTest.php b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/TransactionTest.php index 2081f0502ff731d331d178c4257496e8b062284b..b0fb27eb25441a9797ba5cf5f15ba5ba4037f1e4 100644 --- a/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/TransactionTest.php +++ b/dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/TransactionTest.php @@ -118,7 +118,7 @@ class TransactionTest extends WebapiAbstract $searchCriteriaBuilder->addFilters($filters); $searchData = $searchCriteriaBuilder->create()->__toArray(); - $requestData = ['criteria' => $searchData]; + $requestData = ['searchCriteria' => $searchData]; $serviceInfo = [ 'rest' => [ diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Set/GridPageActions.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Set/GridPageActions.php index 49d3f926aa63111003e8a56440c30a1fd95160ed..9373e1ab10ffaf958e27b18f4719141979f63498 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Set/GridPageActions.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Attribute/Set/GridPageActions.php @@ -10,7 +10,7 @@ use Magento\Backend\Test\Block\GridPageActions as AbstractGridPageActions; /** * Class GridPageActions - * Grid page actions block on Product Templates page + * Grid page actions block on Attribute Sets page */ class GridPageActions extends AbstractGridPageActions { diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAddedProductAttributeOnProductForm.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAddedProductAttributeOnProductForm.php index 22cc3977640cb5e7fcf1ee60e7619bd5dcbaf38b..eeb6257ee1f1873813e89421e9fa2a3f0e42c52c 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAddedProductAttributeOnProductForm.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAddedProductAttributeOnProductForm.php @@ -28,7 +28,7 @@ class AssertAddedProductAttributeOnProductForm extends AbstractConstraint * @param CatalogProductIndex $productGrid * @param CatalogProductEdit $productEdit * @param CatalogProductAttribute $attribute - * @param CatalogAttributeSet $productTemplate + * @param CatalogAttributeSet $attributeSet * @param CatalogProductAttribute $productAttributeOriginal * @throws \Exception * @return void @@ -38,11 +38,11 @@ class AssertAddedProductAttributeOnProductForm extends AbstractConstraint CatalogProductIndex $productGrid, CatalogProductEdit $productEdit, CatalogProductAttribute $attribute, - CatalogAttributeSet $productTemplate, + CatalogAttributeSet $attributeSet, CatalogProductAttribute $productAttributeOriginal = null ) { if (!$product->hasData('sku')) { - $product = $this->createProductWithAttributeSet($productAttributeOriginal, $productTemplate); + $product = $this->createProductWithAttributeSet($productAttributeOriginal, $attributeSet); } $filterProduct = ['sku' => $product->getSku()]; $productGrid->open(); @@ -62,16 +62,16 @@ class AssertAddedProductAttributeOnProductForm extends AbstractConstraint * Create Product With AttributeSet. * * @param CatalogProductAttribute $attribute - * @param CatalogAttributeSet $productTemplate + * @param CatalogAttributeSet $attributeSet * @return CatalogProductSimple */ protected function createProductWithAttributeSet( CatalogProductAttribute $attribute, - CatalogAttributeSet $productTemplate + CatalogAttributeSet $attributeSet ) { $product = ObjectManager::getInstance()->create( - 'Magento\Catalog\Test\TestStep\AddAttributeToProductTemplateStep', - ['attribute' => $attribute, 'productTemplate' => $productTemplate] + 'Magento\Catalog\Test\TestStep\AddAttributeToAttributeSetStep', + ['attribute' => $attribute, 'attributeSet' => $attributeSet] )->run(); return $product['product']; } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateForm.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAttributeSetForm.php similarity index 79% rename from dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateForm.php rename to dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAttributeSetForm.php index 4a634c7d23dec5d00566c6e59a9254800b0a1eb2..527f609aa60bb8483ad07967fcf2ebecc105eb33 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateForm.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAttributeSetForm.php @@ -13,14 +13,14 @@ use Magento\Catalog\Test\Page\Adminhtml\CatalogProductSetIndex; use Magento\Mtf\Constraint\AbstractConstraint; /** - * Class AssertProductTemplateForm - * Checking data from Product Template form with data fixture + * Class AssertAttributeSetForm + * Checking data from Attribute Set form with data fixture */ -class AssertProductTemplateForm extends AbstractConstraint +class AssertAttributeSetForm extends AbstractConstraint { /** - * Assert that after save a product template on edit product set page displays: - * 1. Correct product template name in Attribute set name field passed from fixture + * Assert that after save a attribute set on edit product set page displays: + * 1. Correct attribute set name in Attribute set name field passed from fixture * 2. Created Product Attribute (if was added) * * @param CatalogProductSetIndex $productSet @@ -43,7 +43,7 @@ class AssertProductTemplateForm extends AbstractConstraint \PHPUnit_Framework_Assert::assertEquals( $filterAttribute['set_name'], $productSetEdit->getAttributeSetEditBlock()->getAttributeSetName(), - 'Product Template not found' + 'Attribute Set not found' . "\nExpected: " . $filterAttribute['set_name'] . "\nActual: " . $productSetEdit->getAttributeSetEditBlock()->getAttributeSetName() ); @@ -51,7 +51,7 @@ class AssertProductTemplateForm extends AbstractConstraint $attributeLabel = $productAttribute->getFrontendLabel(); \PHPUnit_Framework_Assert::assertTrue( $productSetEdit->getAttributeSetEditBlock()->checkProductAttribute($attributeLabel), - "Product Attribute is absent on Product Template Groups" + "Product Attribute is absent on Attribute Set Groups" ); } } @@ -63,6 +63,6 @@ class AssertProductTemplateForm extends AbstractConstraint */ public function toString() { - return 'Data from the Product Template form matched with fixture'; + return 'Data from the Attribute Set form matched with fixture'; } } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateGroupOnProductForm.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAttributeSetGroupOnProductForm.php similarity index 88% rename from dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateGroupOnProductForm.php rename to dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAttributeSetGroupOnProductForm.php index 2baac340525f3c1506afbb7cde40e0325dffe918..3aa7d3e9361e30fae3c614b95549d2b697c752ea 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateGroupOnProductForm.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAttributeSetGroupOnProductForm.php @@ -17,15 +17,15 @@ use Magento\Catalog\Test\Page\Adminhtml\CatalogProductIndex; use Magento\Catalog\Test\Page\Adminhtml\CatalogProductEdit; /** - * Class AssertProductTemplateGroupOnProductForm - * Check that created product template displays in product template suggest container dropdown and + * Class AssertAttributeSetGroupOnProductForm + * Check that created attribute set displays in attribute set suggest container dropdown and * can be used for new created product */ -class AssertProductTemplateGroupOnProductForm extends AbstractConstraint +class AssertAttributeSetGroupOnProductForm extends AbstractConstraint { /** - * Assert that created product template: - * 1. Displays in product template suggest container dropdown + * Assert that created attribute set: + * 1. Displays in attribute set suggest container dropdown * 2. Can be used for new created product. * * @param FixtureFactory $fixtureFactory diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateInGrid.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAttributeSetInGrid.php similarity index 67% rename from dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateInGrid.php rename to dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAttributeSetInGrid.php index 281327b9f8c921784306d09d87b935261a42b5d5..6e6d02c324171284022529d2931f145f4dbacec1 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAttributeSetInGrid.php @@ -11,13 +11,13 @@ use Magento\Catalog\Test\Page\Adminhtml\CatalogProductSetIndex; use Magento\Mtf\Constraint\AbstractConstraint; /** - * Class AssertProductTemplateInGrid - * Checks present product template in Product Templates grid + * Class AssertAttributeSetInGrid + * Checks present attribute set in Attribute Sets grid */ -class AssertProductTemplateInGrid extends AbstractConstraint +class AssertAttributeSetInGrid extends AbstractConstraint { /** - * Assert that new product template displays in Product Templates grid + * Assert that new attribute set displays in Attribute Sets grid * * @param CatalogProductSetIndex $productSetPage * @param CatalogAttributeSet $attributeSet @@ -32,17 +32,17 @@ class AssertProductTemplateInGrid extends AbstractConstraint $productSetPage->open(); \PHPUnit_Framework_Assert::assertTrue( $productSetPage->getGrid()->isRowVisible($filterAttributeSet), - 'Product Template \'' . $filterAttributeSet['set_name'] . '\' is absent in Product Template grid.' + 'Attribute Set \'' . $filterAttributeSet['set_name'] . '\' is absent in Attribute Set grid.' ); } /** - * Text present new product template in grid + * Text present new attribute set in grid * * @return string */ public function toString() { - return 'Product template is present in Product Templates grid'; + return 'Attribute set is present in Attribute Sets grid'; } } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateNotInGrid.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAttributeSetNotInGrid.php similarity index 62% rename from dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateNotInGrid.php rename to dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAttributeSetNotInGrid.php index 02d8435fb2585e5c0372f07c1b52f20a5ce8b8ed..7d5ed1707c64dfcc2053f0b2326db0bc1a9e72e7 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateNotInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAttributeSetNotInGrid.php @@ -11,42 +11,42 @@ use Magento\Catalog\Test\Page\Adminhtml\CatalogProductSetIndex; use Magento\Mtf\Constraint\AbstractConstraint; /** - * Class AssertProductTemplateNotInGrid - * Assert that Product Template absence on grid + * Class AssertAttributeSetNotInGrid + * Assert that Attribute Set absence on grid */ -class AssertProductTemplateNotInGrid extends AbstractConstraint +class AssertAttributeSetNotInGrid extends AbstractConstraint { /* tags */ const SEVERITY = 'low'; /* end tags */ /** - * Assert that product template is not displayed in Product Templates grid + * Assert that attribute set is not displayed in Attribute Sets grid * * @param CatalogProductSetIndex $productSetPage - * @param CatalogAttributeSet $productTemplate + * @param CatalogAttributeSet $attributeSet * @return void */ - public function processAssert(CatalogProductSetIndex $productSetPage, CatalogAttributeSet $productTemplate) + public function processAssert(CatalogProductSetIndex $productSetPage, CatalogAttributeSet $attributeSet) { $filterAttributeSet = [ - 'set_name' => $productTemplate->getAttributeSetName(), + 'set_name' => $attributeSet->getAttributeSetName(), ]; $productSetPage->open(); \PHPUnit_Framework_Assert::assertFalse( $productSetPage->getGrid()->isRowVisible($filterAttributeSet), - 'An attribute set named "' . $filterAttributeSet['set_name'] . '" is present in Product Template grid.' + 'An attribute set named "' . $filterAttributeSet['set_name'] . '" is present in Attribute Set grid.' ); } /** - * Text absent new product template in grid + * Text absent new attribute set in grid * * @return string */ public function toString() { - return 'Product template is absent in Product Templates grid'; + return 'Attribute set is absent in Attribute Sets grid'; } } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateOnProductForm.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAttributeSetOnProductForm.php similarity index 88% rename from dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateOnProductForm.php rename to dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAttributeSetOnProductForm.php index cf3e50c9f09009b498b96ad8bb74853d520f50ea..0f66f26036df9073cb1887d86255bc38f48dfc3e 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateOnProductForm.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAttributeSetOnProductForm.php @@ -16,14 +16,14 @@ use Magento\Mtf\Constraint\AbstractConstraint; use Magento\Mtf\Fixture\FixtureFactory; /** - * Class AssertProductTemplateOnProductForm + * Class AssertAttributeSetOnProductForm * Check Attribute Set and Product Attribute on Product form */ -class AssertProductTemplateOnProductForm extends AbstractConstraint +class AssertAttributeSetOnProductForm extends AbstractConstraint { /** - * Assert that created product template: - * 1. Displays in product template suggest container dropdown + * Assert that created attribute set: + * 1. Displays in attribute set suggest container dropdown * 2. Can be used for new created product. * * @param FixtureFactory $fixtureFactory @@ -66,7 +66,7 @@ class AssertProductTemplateOnProductForm extends AbstractConstraint \PHPUnit_Framework_Assert::assertEquals( $attributeSet->getAttributeSetName(), $formAttributeSet, - 'Product Template not found on Product form.' + 'Attribute Set not found on Product form.' . "\nExpected: " . $attributeSet->getAttributeSetName() . "\nActual: " . $formAttributeSet ); @@ -88,6 +88,6 @@ class AssertProductTemplateOnProductForm extends AbstractConstraint */ public function toString() { - return 'Product Attribute and Product Template are present on the Product form.'; + return 'Product Attribute and Attribute Set are present on the Product form.'; } } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateSuccessDeleteMessage.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAttributeSetSuccessDeleteMessage.php similarity index 71% rename from dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateSuccessDeleteMessage.php rename to dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAttributeSetSuccessDeleteMessage.php index 43cff91896a5373c3641bb780978fddf1ff44407..c1c55d90030bf7dc120e288ca10ce3acfac3df58 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateSuccessDeleteMessage.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAttributeSetSuccessDeleteMessage.php @@ -10,18 +10,18 @@ use Magento\Catalog\Test\Page\Adminhtml\CatalogProductSetIndex; use Magento\Mtf\Constraint\AbstractConstraint; /** - * Class AssertProductTemplateSuccessDeleteMessage - * Check Product Templates success delete message + * Class AssertAttributeSetSuccessDeleteMessage + * Check Attribute Sets success delete message */ -class AssertProductTemplateSuccessDeleteMessage extends AbstractConstraint +class AssertAttributeSetSuccessDeleteMessage extends AbstractConstraint { /** * Text value to be checked */ - const SUCCESS_DELETE_MESSAGE = 'The product template has been removed.'; + const SUCCESS_DELETE_MESSAGE = 'The attribute set has been removed.'; /** - * Assert that after deleting product template success delete message appears + * Assert that after deleting attribute set success delete message appears * * @param CatalogProductSetIndex $productSetIndex * @return void @@ -45,6 +45,6 @@ class AssertProductTemplateSuccessDeleteMessage extends AbstractConstraint */ public function toString() { - return 'Product Templates success delete message is present.'; + return 'Attribute Sets success delete message is present.'; } } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateSuccessSaveMessage.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAttributeSetSuccessSaveMessage.php similarity index 71% rename from dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateSuccessSaveMessage.php rename to dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAttributeSetSuccessSaveMessage.php index 457cac5b7082e897686f71f98b0571d0c070962e..3a61e2de49606d9dbbd84ea4b540b8981a00cec6 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateSuccessSaveMessage.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAttributeSetSuccessSaveMessage.php @@ -10,18 +10,18 @@ use Magento\Catalog\Test\Page\Adminhtml\CatalogProductSetIndex; use Magento\Mtf\Constraint\AbstractConstraint; /** - * Class AssertProductTemplateSuccessSaveMessage - * Check Product Templates success save message + * Class AssertAttributeSetSuccessSaveMessage + * Check Attribute Sets success save message */ -class AssertProductTemplateSuccessSaveMessage extends AbstractConstraint +class AssertAttributeSetSuccessSaveMessage extends AbstractConstraint { /** * Text value to be checked */ - const SUCCESS_MESSAGE = 'You saved the product template.'; + const SUCCESS_MESSAGE = 'You saved the attribute set.'; /** - * Assert that after save a product template "You saved the attribute set." successful message appears + * Assert that after save a attribute set "You saved the attribute set." successful message appears * * @param CatalogProductSetIndex $productSetIndex * @return void @@ -45,6 +45,6 @@ class AssertProductTemplateSuccessSaveMessage extends AbstractConstraint */ public function toString() { - return 'Product Templates success save message is present.'; + return 'Attribute Sets success save message is present.'; } } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeAbsenceInSearchOnProductForm.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeAbsenceInSearchOnProductForm.php index 4052a470a60642250dcefe83cae20bef9696df43..6ba9ad8b07825a832c853ceecc8d829d81a6b0c2 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeAbsenceInSearchOnProductForm.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeAbsenceInSearchOnProductForm.php @@ -12,12 +12,12 @@ use Magento\Catalog\Test\Page\Adminhtml\CatalogProductNew; use Magento\Mtf\Constraint\AbstractConstraint; /** - * Checks that product attribute cannot be added to product template on Product Page via Add Attribute control. + * Checks that product attribute cannot be added to attribute set on Product Page via Add Attribute control. */ class AssertProductAttributeAbsenceInSearchOnProductForm extends AbstractConstraint { /** - * Assert that deleted attribute can't be added to product template on Product Page via Add Attribute control. + * Assert that deleted attribute can't be added to attribute set on Product Page via Add Attribute control. * * @param CatalogProductAttribute $productAttribute * @param CatalogProductIndex $productGrid diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeAbsenceInTemplateGroups.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeAbsenceInTemplateGroups.php index 821d96b2db2215c60fc3fc4cfa155f552806815a..3d865b5ccddd79ca047adc636ab1e8302842aaeb 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeAbsenceInTemplateGroups.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeAbsenceInTemplateGroups.php @@ -13,45 +13,45 @@ use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductAttributeAbsenceInTemplateGroups - * Checks that product attribute isn't displayed in Product template's Groups section + * Checks that product attribute isn't displayed in Attribute set's Groups section */ class AssertProductAttributeAbsenceInTemplateGroups extends AbstractConstraint { /** - * Assert that deleted attribute isn't displayed in Product template's Groups section + * Assert that deleted attribute isn't displayed in Attribute set's Groups section * - * @param CatalogAttributeSet $productTemplate + * @param CatalogAttributeSet $attributeSet * @param CatalogProductSetIndex $productSetIndex * @param CatalogProductSetEdit $productSetEdit * @return void */ public function processAssert( - CatalogAttributeSet $productTemplate, + CatalogAttributeSet $attributeSet, CatalogProductSetIndex $productSetIndex, CatalogProductSetEdit $productSetEdit ) { - $filter = ['set_name' => $productTemplate->getAttributeSetName()]; + $filter = ['set_name' => $attributeSet->getAttributeSetName()]; $productSetIndex->open(); $productSetIndex->getGrid()->searchAndOpen($filter); - $attributeCode = $productTemplate + $attributeCode = $attributeSet ->getDataFieldConfig('assigned_attributes')['source'] ->getAttributes()[0] ->getAttributeCode(); \PHPUnit_Framework_Assert::assertFalse( $productSetEdit->getAttributeSetEditBlock()->checkProductAttribute($attributeCode), - "Attribute " . $attributeCode . " is present in Product template's Groups section." + "Attribute " . $attributeCode . " is present in Attribute set's Groups section." ); } /** - * Text absent Product Attribute in Product template's Groups section + * Text absent Product Attribute in Attribute set's Groups section * * @return string */ public function toString() { - return "Product Attribute is absent in Product template's Groups section."; + return "Product Attribute is absent in Attribute set's Groups section."; } } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeAbsenceInUnassignedAttributes.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeAbsenceInUnassignedAttributes.php index d1f2f5e1eff19ed4e746ab1e8a2559be47318fc3..460d46cf55d1fca61d01ceeeacfc7e8dea29ade7 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeAbsenceInUnassignedAttributes.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeAbsenceInUnassignedAttributes.php @@ -13,45 +13,45 @@ use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductAttributeAbsenceInUnassignedAttributes - * Checks that product attribute isn't displayed in Product template's Unassigned Attributes section + * Checks that product attribute isn't displayed in Attribute set's Unassigned Attributes section */ class AssertProductAttributeAbsenceInUnassignedAttributes extends AbstractConstraint { /** - * Assert that deleted attribute isn't displayed in Product template's Unassigned Attributes section + * Assert that deleted attribute isn't displayed in Attribute set's Unassigned Attributes section * - * @param CatalogAttributeSet $productTemplate + * @param CatalogAttributeSet $attributeSet * @param CatalogProductSetIndex $productSetIndex * @param CatalogProductSetEdit $productSetEdit * @return void */ public function processAssert( - CatalogAttributeSet $productTemplate, + CatalogAttributeSet $attributeSet, CatalogProductSetIndex $productSetIndex, CatalogProductSetEdit $productSetEdit ) { - $filter = ['set_name' => $productTemplate->getAttributeSetName()]; + $filter = ['set_name' => $attributeSet->getAttributeSetName()]; $productSetIndex->open(); $productSetIndex->getGrid()->searchAndOpen($filter); - $attributeCode = $productTemplate + $attributeCode = $attributeSet ->getDataFieldConfig('assigned_attributes')['source'] ->getAttributes()[0] ->getAttributeCode(); \PHPUnit_Framework_Assert::assertFalse( $productSetEdit->getAttributeSetEditBlock()->checkUnassignedProductAttribute($attributeCode), - "Attribute " . $attributeCode . " is present in Unassigned Product template's section." + "Attribute " . $attributeCode . " is present in Unassigned Attribute set's section." ); } /** - * Text absent Product Attribute Unassigned Product template's section + * Text absent Product Attribute Unassigned Attribute set's section * * @return string */ public function toString() { - return "Product Attribute is absent in Unassigned Product template's section."; + return "Product Attribute is absent in Unassigned Attribute set's section."; } } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductDuplicatedInGrid.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductDuplicatedInGrid.php index 64fcf763899dc95f7d178fdc4261b07285f67b0f..59462fc83da81a765185c39886437f18f8b2a23c 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductDuplicatedInGrid.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductDuplicatedInGrid.php @@ -16,7 +16,7 @@ use Magento\Mtf\Fixture\FixtureInterface; class AssertProductDuplicatedInGrid extends AbstractConstraint { /** - * Assert that duplicated product is found by sku and has correct product type, product template, + * Assert that duplicated product is found by sku and has correct product type, attribute set, * product status disabled and out of stock * * @param FixtureInterface $product diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/AttributeSetId.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/AttributeSetId.php index 9a314c06e7d285c25dad13cf614d6317987a1d60..4865ef44562457ea5c3ef364fa1386a9b6919bac 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/AttributeSetId.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/AttributeSetId.php @@ -11,7 +11,7 @@ use Magento\Mtf\Fixture\FixtureFactory; use Magento\Catalog\Test\Fixture\CatalogAttributeSet; /** - * Product template entity data source. + * Attribute set entity data source. * * Data keys: * - dataset diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/NavigateMenuTest.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/NavigateMenuTest.xml index f38ac7d9baf9c18ad79bdfb4944e4c5b358527c9..847a1f2c242e6cbc840de37609d98898dd308a48 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/NavigateMenuTest.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/NavigateMenuTest.xml @@ -23,8 +23,8 @@ <constraint name="Magento\Backend\Test\Constraint\AssertBackendPageIsAvailable"/> </variation> <variation name="NavigateMenuTest12"> - <data name="menuItem" xsi:type="string">Stores > Product Template</data> - <data name="pageTitle" xsi:type="string">Product Templates</data> + <data name="menuItem" xsi:type="string">Stores > Attribute Set</data> + <data name="pageTitle" xsi:type="string">Attribute Sets</data> <constraint name="Magento\Backend\Test\Constraint\AssertBackendPageIsAvailable"/> </variation> </testCase> diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateAttributeSetEntityTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateAttributeSetEntityTest.php index 7ddb966ed99a38aed91201c7cb802a182f26d2b3..835086f15fa8d575fbfa0483ed570ee28f16bce8 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateAttributeSetEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateAttributeSetEntityTest.php @@ -18,12 +18,12 @@ use Magento\Mtf\TestCase\Injectable; * * Test Flow: * 1. Log in to Backend. - * 2. Navigate to Stores > Attributes > Product Template. - * 3. Start to create new Product Template. + * 2. Navigate to Stores > Attributes > Attribute Set. + * 3. Start to create new Attribute Set. * 4. Fill out fields data according to data set. - * 5. Add created Product Attribute to Product Template. - * 6. Save new Product Template. - * 7. Verify created Product Template. + * 5. Add created Product Attribute to Attribute Set. + * 6. Save new Attribute Set. + * 7. Verify created Attribute Set. * * @group Product_Attributes_(MX) * @ZephyrId MAGETWO-25104 diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateAttributeSetEntityTest.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateAttributeSetEntityTest.xml index 68b4d38d82e36065fd6c206f58d7966f45ce8661..2db56cfeb2012c7c1c8a26487403f349d8329274 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateAttributeSetEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateAttributeSetEntityTest.xml @@ -6,14 +6,14 @@ */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../vendor/magento/mtf/etc/variations.xsd"> - <testCase name="Magento\Catalog\Test\TestCase\ProductAttribute\CreateAttributeSetEntityTest" summary="Create Attribute Set (Product Template)" ticketId="MAGETWO-25104"> + <testCase name="Magento\Catalog\Test\TestCase\ProductAttribute\CreateAttributeSetEntityTest" summary="Create Attribute Set (Attribute Set)" ticketId="MAGETWO-25104"> <variation name="CreateAttributeSetEntityTestVariation1"> - <data name="attributeSet/data/attribute_set_name" xsi:type="string">ProductTemplate%isolation%</data> + <data name="attributeSet/data/attribute_set_name" xsi:type="string">AttributeSet%isolation%</data> <data name="attributeSet/data/skeleton_set/dataset" xsi:type="string">default</data> - <constraint name="Magento\Catalog\Test\Constraint\AssertProductTemplateSuccessSaveMessage" /> - <constraint name="Magento\Catalog\Test\Constraint\AssertProductTemplateForm" /> - <constraint name="Magento\Catalog\Test\Constraint\AssertProductTemplateInGrid" /> - <constraint name="Magento\Catalog\Test\Constraint\AssertProductTemplateOnProductForm" /> + <constraint name="Magento\Catalog\Test\Constraint\AssertAttributeSetSuccessSaveMessage" /> + <constraint name="Magento\Catalog\Test\Constraint\AssertAttributeSetForm" /> + <constraint name="Magento\Catalog\Test\Constraint\AssertAttributeSetInGrid" /> + <constraint name="Magento\Catalog\Test\Constraint\AssertAttributeSetOnProductForm" /> </variation> </testCase> </config> diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateProductAttributeEntityTest.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateProductAttributeEntityTest.xml index b945d770fe82d5992ca0a769a3da02da2da2a10d..0274ac1132fb7e40a0591841020499780d0a51d7 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateProductAttributeEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/CreateProductAttributeEntityTest.xml @@ -8,7 +8,7 @@ <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../vendor/magento/mtf/etc/variations.xsd"> <testCase name="Magento\Catalog\Test\TestCase\ProductAttribute\CreateProductAttributeEntityTest" summary="Create Product Attribute" ticketId="MAGETWO-24767"> <variation name="CreateProductAttributeEntityTestVariation1"> - <data name="productTemplate/dataset" xsi:type="string">custom_attribute_set</data> + <data name="attributeSet/dataset" xsi:type="string">custom_attribute_set</data> <data name="productAttribute/data/frontend_label" xsi:type="string">Text_Field_Admin_%isolation%</data> <data name="productAttribute/data/frontend_input" xsi:type="string">Text Field</data> <data name="productAttribute/data/is_required" xsi:type="string">No</data> @@ -19,7 +19,7 @@ <constraint name="Magento\Catalog\Test\Constraint\AssertAddedProductAttributeOnProductForm" /> </variation> <variation name="CreateProductAttributeEntityTestVariation2"> - <data name="productTemplate/dataset" xsi:type="string">custom_attribute_set</data> + <data name="attributeSet/dataset" xsi:type="string">custom_attribute_set</data> <data name="productAttribute/data/frontend_label" xsi:type="string">Text_Field_Admin_%isolation%</data> <data name="productAttribute/data/frontend_input" xsi:type="string">Text Area</data> <data name="productAttribute/data/is_required" xsi:type="string">Yes</data> @@ -41,7 +41,7 @@ <constraint name="Magento\Catalog\Test\Constraint\AssertProductAttributeIsComparable" /> </variation> <variation name="CreateProductAttributeEntityTestVariation3"> - <data name="productTemplate/dataset" xsi:type="string">custom_attribute_set</data> + <data name="attributeSet/dataset" xsi:type="string">custom_attribute_set</data> <data name="productAttribute/data/frontend_label" xsi:type="string">Date_Admin_%isolation%</data> <data name="productAttribute/data/frontend_input" xsi:type="string">Date</data> <data name="productAttribute/data/is_required" xsi:type="string">No</data> @@ -64,7 +64,7 @@ <constraint name="Magento\CatalogRule\Test\Constraint\AssertProductAttributeIsUsedPromoRules" /> </variation> <variation name="CreateProductAttributeEntityTestVariation4"> - <data name="productTemplate/dataset" xsi:type="string">custom_attribute_set</data> + <data name="attributeSet/dataset" xsi:type="string">custom_attribute_set</data> <data name="productAttribute/data/frontend_label" xsi:type="string">Yes/No_Admin_%isolation%</data> <data name="productAttribute/data/frontend_input" xsi:type="string">Yes/No</data> <data name="productAttribute/data/is_required" xsi:type="string">Yes</data> @@ -80,7 +80,7 @@ <constraint name="Magento\Catalog\Test\Constraint\AssertAddedProductAttributeOnProductForm" /> </variation> <variation name="CreateProductAttributeEntityTestVariation5"> - <data name="productTemplate/dataset" xsi:type="string">custom_attribute_set</data> + <data name="attributeSet/dataset" xsi:type="string">custom_attribute_set</data> <data name="productAttribute/data/frontend_label" xsi:type="string">Multiple_Select_Admin_%isolation%</data> <data name="productAttribute/data/frontend_input" xsi:type="string">Multiple Select</data> <data name="productAttribute/data/options/dataset" xsi:type="string">default</data> @@ -109,7 +109,7 @@ <constraint name="Magento\Catalog\Test\Constraint\AssertAttributeOptionsOnProductForm" /> </variation> <variation name="CreateProductAttributeEntityTestVariation6"> - <data name="productTemplate/dataset" xsi:type="string">custom_attribute_set</data> + <data name="attributeSet/dataset" xsi:type="string">custom_attribute_set</data> <data name="productAttribute/data/frontend_label" xsi:type="string">Dropdown_Admin_%isolation%</data> <data name="productAttribute/data/frontend_input" xsi:type="string">Dropdown</data> <data name="productAttribute/data/options/dataset" xsi:type="string">default</data> @@ -142,7 +142,7 @@ <constraint name="Magento\Catalog\Test\Constraint\AssertAttributeOptionsOnProductForm" /> </variation> <variation name="CreateProductAttributeEntityTestVariation7"> - <data name="productTemplate/dataset" xsi:type="string">custom_attribute_set</data> + <data name="attributeSet/dataset" xsi:type="string">custom_attribute_set</data> <data name="productAttribute/data/frontend_label" xsi:type="string">Price_Admin_%isolation%</data> <data name="productAttribute/data/frontend_input" xsi:type="string">Price</data> <data name="productAttribute/data/is_required" xsi:type="string">No</data> @@ -163,7 +163,7 @@ <constraint name="Magento\Catalog\Test\Constraint\AssertProductAttributeIsFilterableInSearch" /> </variation> <variation name="CreateProductAttributeEntityTestVariation8"> - <data name="productTemplate/dataset" xsi:type="string">custom_attribute_set</data> + <data name="attributeSet/dataset" xsi:type="string">custom_attribute_set</data> <data name="productAttribute/data/frontend_label" xsi:type="string">Fixed_Product_Tax_Admin_%isolation%</data> <data name="productAttribute/data/frontend_input" xsi:type="string">Fixed Product Tax</data> <data name="productAttribute/data/attribute_code" xsi:type="string">attr_fpt_code_%isolation%</data> @@ -173,7 +173,7 @@ <constraint name="Magento\Catalog\Test\Constraint\AssertAddedProductAttributeOnProductForm" /> </variation> <variation name="CreateProductAttributeEntityTestVariation9"> - <data name="productTemplate/dataset" xsi:type="string">custom_attribute_set</data> + <data name="attributeSet/dataset" xsi:type="string">custom_attribute_set</data> <data name="productAttribute/data/frontend_label" xsi:type="string">Text_Field_Admin_%isolation%</data> <data name="productAttribute/data/frontend_input" xsi:type="string">Text Field</data> <data name="productAttribute/data/is_required" xsi:type="string">Yes</data> diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAssignedToTemplateProductAttributeTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAssignedToTemplateProductAttributeTest.php index a3c0028f6e70c13d348e9db060bbf528c24209d8..32b9303f802a36ebeb4c43bc7ee4fe2cb15a2160 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAssignedToTemplateProductAttributeTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAssignedToTemplateProductAttributeTest.php @@ -13,7 +13,7 @@ use Magento\Mtf\TestCase\Injectable; /** * Preconditions: - * 1. Create Product template, based on Default. + * 1. Create Attribute set, based on Default. * 2. Create product attribute and add to created template. * * Test Flow: @@ -64,14 +64,14 @@ class DeleteAssignedToTemplateProductAttributeTest extends Injectable /** * Run test. * - * @param CatalogAttributeSet $productTemplate + * @param CatalogAttributeSet $attributeSet * @return array */ - public function test(CatalogAttributeSet $productTemplate) + public function test(CatalogAttributeSet $attributeSet) { // Precondition - $productTemplate->persist(); - $attribute = $productTemplate->getDataFieldConfig('assigned_attributes')['source']->getAttributes()[0]; + $attributeSet->persist(); + $attribute = $attributeSet->getDataFieldConfig('assigned_attributes')['source']->getAttributes()[0]; // Steps $filter = ['attribute_code' => $attribute->getAttributeCode()]; @@ -80,6 +80,6 @@ class DeleteAssignedToTemplateProductAttributeTest extends Injectable $this->attributeNew->getPageActions()->delete(); $this->attributeNew->getModalBlock()->acceptAlert(); - return ['productTemplate' => $productTemplate, 'attribute' => $attribute]; + return ['attributeSet' => $attributeSet, 'attribute' => $attribute]; } } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAssignedToTemplateProductAttributeTest.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAssignedToTemplateProductAttributeTest.xml index 75b7694459abb5885d8dd3d12f3440888773ff2a..f864cc8afa7c47a2b04b9c19e2a7f5470a5b52ce 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAssignedToTemplateProductAttributeTest.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAssignedToTemplateProductAttributeTest.xml @@ -8,16 +8,16 @@ <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../vendor/magento/mtf/etc/variations.xsd"> <testCase name="Magento\Catalog\Test\TestCase\ProductAttribute\DeleteAssignedToTemplateProductAttributeTest" summary="Delete Assigned to Template Product Attribute" ticketId="MAGETWO-26011"> <variation name="DeleteAssignedToTemplateProductAttributeTestVariation1"> - <data name="productTemplate/dataset" xsi:type="string">custom_attribute_set</data> - <data name="productTemplate/data/assigned_attributes/dataset" xsi:type="string">attribute_type_dropdown</data> + <data name="attributeSet/dataset" xsi:type="string">custom_attribute_set</data> + <data name="attributeSet/data/assigned_attributes/dataset" xsi:type="string">attribute_type_dropdown</data> <constraint name="Magento\Catalog\Test\Constraint\AssertProductAttributeSuccessDeleteMessage" /> <constraint name="Magento\Catalog\Test\Constraint\AssertProductAttributeAbsenceInGrid" /> <constraint name="Magento\Catalog\Test\Constraint\AssertProductAttributeAbsenceInTemplateGroups" /> <constraint name="Magento\Catalog\Test\Constraint\AssertProductAttributeAbsenceInUnassignedAttributes" /> </variation> <variation name="DeleteAssignedToTemplateProductAttributeTestVariation2"> - <data name="productTemplate/dataset" xsi:type="string">default</data> - <data name="productTemplate/data/assigned_attributes/dataset" xsi:type="string">attribute_type_text_field</data> + <data name="attributeSet/dataset" xsi:type="string">default</data> + <data name="attributeSet/data/assigned_attributes/dataset" xsi:type="string">attribute_type_text_field</data> <constraint name="Magento\Catalog\Test\Constraint\AssertProductAttributeSuccessDeleteMessage" /> <constraint name="Magento\Catalog\Test\Constraint\AssertProductAttributeAbsenceInGrid" /> <constraint name="Magento\ConfigurableProduct\Test\Constraint\AssertProductAttributeAbsenceInVariationsSearch" /> diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAttributeSetTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAttributeSetTest.php index d996e70adb41097c9c62ff5f37f52c5cfb7d4760..b6c3875db64af917d5f940e0f55456bd5070bc79 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAttributeSetTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAttributeSetTest.php @@ -13,7 +13,7 @@ use Magento\Mtf\Fixture\FixtureFactory; use Magento\Mtf\TestCase\Injectable; /** - * Test Creation for Delete Attribute Set (Product Template) + * Test Creation for Delete Attribute Set (Attribute Set) * * Preconditions: * 1. An attribute is created. @@ -22,8 +22,8 @@ use Magento\Mtf\TestCase\Injectable; * * Test Flow: * 1. Log in to Backend. - * 2. Navigate to Stores > Attributes > Product Template. - * 3. Open created Product Template. + * 2. Navigate to Stores > Attributes > Attribute Set. + * 3. Open created Attribute Set. * 4. Click 'Delete' button. * 5. Perform all assertions. * @@ -70,26 +70,26 @@ class DeleteAttributeSetTest extends Injectable * Run DeleteAttributeSet test * * @param FixtureFactory $fixtureFactory - * @param CatalogAttributeSet $productTemplate + * @param CatalogAttributeSet $attributeSet * @return array */ - public function test(FixtureFactory $fixtureFactory, CatalogAttributeSet $productTemplate) + public function test(FixtureFactory $fixtureFactory, CatalogAttributeSet $attributeSet) { // Precondition - $productTemplate->persist(); + $attributeSet->persist(); $product = $fixtureFactory->createByCode( 'catalogProductSimple', [ 'dataset' => 'default', 'data' => [ - 'attribute_set_id' => ['attribute_set' => $productTemplate], + 'attribute_set_id' => ['attribute_set' => $attributeSet], ], ] ); $product->persist(); // Steps - $filter = ['set_name' => $productTemplate->getAttributeSetName()]; + $filter = ['set_name' => $attributeSet->getAttributeSetName()]; $this->productSetIndex->open(); $this->productSetIndex->getGrid()->searchAndOpen($filter); $this->productSetEdit->getPageActions()->delete(); diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAttributeSetTest.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAttributeSetTest.xml index b4e1608eef6ac7612ace94d17441871b6923a2ed..b10b1444aa30daa3159fffe8cfb7fdd9141af889 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAttributeSetTest.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/DeleteAttributeSetTest.xml @@ -6,13 +6,13 @@ */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../vendor/magento/mtf/etc/variations.xsd"> - <testCase name="Magento\Catalog\Test\TestCase\ProductAttribute\DeleteAttributeSetTest" summary="Delete Attribute Set (Product Template)" ticketId="MAGETWO-25473"> + <testCase name="Magento\Catalog\Test\TestCase\ProductAttribute\DeleteAttributeSetTest" summary="Delete Attribute Set (Attribute Set)" ticketId="MAGETWO-25473"> <variation name="DeleteAttributeSetTestVariation1"> - <data name="productTemplate/dataset" xsi:type="string">custom_attribute_set</data> - <data name="productTemplate/data/assigned_attributes/dataset" xsi:type="string">default</data> + <data name="attributeSet/dataset" xsi:type="string">custom_attribute_set</data> + <data name="attributeSet/data/assigned_attributes/dataset" xsi:type="string">default</data> <data name="product/dataset" xsi:type="string">default</data> - <constraint name="Magento\Catalog\Test\Constraint\AssertProductTemplateSuccessDeleteMessage" /> - <constraint name="Magento\Catalog\Test\Constraint\AssertProductTemplateNotInGrid" /> + <constraint name="Magento\Catalog\Test\Constraint\AssertAttributeSetSuccessDeleteMessage" /> + <constraint name="Magento\Catalog\Test\Constraint\AssertAttributeSetNotInGrid" /> <constraint name="Magento\Catalog\Test\Constraint\AssertProductNotInGrid" /> </variation> </testCase> diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateAttributeSetTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateAttributeSetTest.php index 0939c76aadbe4c131169f2cbb7bed5ffc2d95a65..96b3e5971e1d6d661b789c8895646a22868ddd62 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateAttributeSetTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateAttributeSetTest.php @@ -21,12 +21,12 @@ use Magento\Mtf\TestCase\Injectable; * * Test Flow: * 1. Log in to Backend. - * 2. Navigate to Stores > Attributes > Product Template. - * 3. Open created Product Template. + * 2. Navigate to Stores > Attributes > Attribute Set. + * 3. Open created Attribute Set. * 4. Click 'Add New' button to create new group * 5. Add created Product Attribute to created group. * 6. Fill out other fields data according to data set. - * 7. Save Product Template. + * 7. Save Attribute Set. * 8. Preform all assertions. * * @group Product_Attributes_(MX) @@ -69,7 +69,7 @@ class UpdateAttributeSetTest extends Injectable } /** - * Run UpdateProductTemplate test + * Run UpdateAttributeSet test * * @param CatalogAttributeSet $attributeSet * @param CatalogAttributeSet $attributeSetOriginal diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateAttributeSetTest.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateAttributeSetTest.xml index 7a24dab72439588f6480959d2ee73229223140ea..4c10e0aa85c72d428c30ab8038170dc2fe766262 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateAttributeSetTest.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateAttributeSetTest.xml @@ -6,17 +6,17 @@ */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../vendor/magento/mtf/etc/variations.xsd"> - <testCase name="Magento\Catalog\Test\TestCase\ProductAttribute\UpdateAttributeSetTest" summary="Update Product Template" ticketId="MAGETWO-26251"> + <testCase name="Magento\Catalog\Test\TestCase\ProductAttribute\UpdateAttributeSetTest" summary="Update Attribute Set" ticketId="MAGETWO-26251"> <variation name="UpdateAttributeSetTestVariation1"> - <data name="attributeSet/data/attribute_set_name" xsi:type="string">ProductTemplateEdit1%isolation%</data> + <data name="attributeSet/data/attribute_set_name" xsi:type="string">AttributeSetEdit1%isolation%</data> <data name="attributeSet/data/group" xsi:type="string">Custom-group%isolation%</data> <data name="attributeSetOriginal/dataset" xsi:type="string">custom_attribute_set</data> <data name="productAttributeOriginal/dataset" xsi:type="string">attribute_type_text_field</data> - <constraint name="Magento\Catalog\Test\Constraint\AssertProductTemplateSuccessSaveMessage" /> - <constraint name="Magento\Catalog\Test\Constraint\AssertProductTemplateForm" /> - <constraint name="Magento\Catalog\Test\Constraint\AssertProductTemplateInGrid" /> - <constraint name="Magento\Catalog\Test\Constraint\AssertProductTemplateOnProductForm" /> - <constraint name="Magento\Catalog\Test\Constraint\AssertProductTemplateGroupOnProductForm" /> + <constraint name="Magento\Catalog\Test\Constraint\AssertAttributeSetSuccessSaveMessage" /> + <constraint name="Magento\Catalog\Test\Constraint\AssertAttributeSetForm" /> + <constraint name="Magento\Catalog\Test\Constraint\AssertAttributeSetInGrid" /> + <constraint name="Magento\Catalog\Test\Constraint\AssertAttributeSetOnProductForm" /> + <constraint name="Magento\Catalog\Test\Constraint\AssertAttributeSetGroupOnProductForm" /> </variation> </testCase> </config> diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateProductAttributeEntityTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateProductAttributeEntityTest.php index 755ff5eb886e3548425a84dec20644430f4b9330..d3b51ebdce2cc33be18ba574bf2a546534f14e69 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateProductAttributeEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateProductAttributeEntityTest.php @@ -18,7 +18,7 @@ use Magento\Mtf\TestCase\Injectable; * Preconditions: * Dataset : AttributeOptions * 1. Attribute is created (Attribute) - * 2. Attribute set is created (Product Template) + * 2. Attribute set is created (Attribute Set) * * Test Flow: * 1. Log in to Backend. @@ -61,7 +61,7 @@ class UpdateProductAttributeEntityTest extends Injectable * * @param CatalogProductAttribute $productAttributeOriginal * @param CatalogProductAttribute $attribute - * @param CatalogAttributeSet $productTemplate + * @param CatalogAttributeSet $attributeSet * @param CatalogProductAttributeIndex $attributeIndex * @param CatalogProductAttributeNew $attributeNew * @param CatalogProductSimple $productSimple @@ -70,13 +70,13 @@ class UpdateProductAttributeEntityTest extends Injectable public function testUpdateProductAttribute( CatalogProductAttribute $productAttributeOriginal, CatalogProductAttribute $attribute, - CatalogAttributeSet $productTemplate, + CatalogAttributeSet $attributeSet, CatalogProductAttributeIndex $attributeIndex, CatalogProductAttributeNew $attributeNew, CatalogProductSimple $productSimple ) { //Precondition - $productTemplate->persist(); + $attributeSet->persist(); $productAttributeOriginal->persist(); $filter = [ @@ -91,7 +91,7 @@ class UpdateProductAttributeEntityTest extends Injectable $attribute = $this->prepareAttribute($attribute, $productAttributeOriginal); $productSimple->persist(); - return ['product' => $this->prepareProduct($productSimple, $attribute, $productTemplate)]; + return ['product' => $this->prepareProduct($productSimple, $attribute, $attributeSet)]; } /** @@ -99,13 +99,13 @@ class UpdateProductAttributeEntityTest extends Injectable * * @param CatalogProductSimple $product * @param CatalogProductAttribute $attribute - * @param CatalogAttributeSet $productTemplate + * @param CatalogAttributeSet $attributeSet * @return CatalogProductSimple */ - protected function prepareProduct($product, $attribute, $productTemplate) + protected function prepareProduct($product, $attribute, $attributeSet) { $data = [ - 'attribute_set_id' => ['attribute_set' => $productTemplate], + 'attribute_set_id' => ['attribute_set' => $attributeSet], 'custom_attribute' => $attribute ]; $data = array_merge($data, $product->getData()); diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateProductAttributeEntityTest.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateProductAttributeEntityTest.xml index 63dabf015796e34f589b4ac24a2ac9188da26507..e58233de491d59dc45764d5db260528f7abc077f 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateProductAttributeEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/ProductAttribute/UpdateProductAttributeEntityTest.xml @@ -8,7 +8,7 @@ <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../vendor/magento/mtf/etc/variations.xsd"> <testCase name="Magento\Catalog\Test\TestCase\ProductAttribute\UpdateProductAttributeEntityTest" summary="Update Product Attribute" ticketId="MAGETWO-23459"> <variation name="UpdateProductAttributeEntityTestVariation1"> - <data name="productTemplate/dataset" xsi:type="string">custom_attribute_set</data> + <data name="attributeSet/dataset" xsi:type="string">custom_attribute_set</data> <data name="productAttributeOriginal/dataset" xsi:type="string">attribute_type_text_field</data> <data name="attribute/data/frontend_label" xsi:type="string">Text_Field_%isolation%</data> <data name="attribute/data/is_required" xsi:type="string">Yes</data> @@ -28,7 +28,7 @@ <constraint name="Magento\Catalog\Test\Constraint\AssertAddedProductAttributeOnProductForm" /> </variation> <variation name="UpdateProductAttributeEntityTestVariation2"> - <data name="productTemplate/dataset" xsi:type="string">custom_attribute_set</data> + <data name="attributeSet/dataset" xsi:type="string">custom_attribute_set</data> <data name="productAttributeOriginal/dataset" xsi:type="string">attribute_type_dropdown</data> <data name="attribute/data/frontend_label" xsi:type="string">Dropdown_%isolation%</data> <data name="attribute/data/options/dataset" xsi:type="string">default</data> diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/AddAttributeToProductTemplateStep.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/AddAttributeToAttributeSetStep.php similarity index 90% rename from dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/AddAttributeToProductTemplateStep.php rename to dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/AddAttributeToAttributeSetStep.php index 3d5aa19186cec9f6a342ae492fd60df73e1b6f38..c956fda4cffc3381af93b772fee29737fd676b37 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/AddAttributeToProductTemplateStep.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/AddAttributeToAttributeSetStep.php @@ -18,7 +18,7 @@ use Magento\Mtf\TestStep\TestStepInterface; /** * Move attribute To attribute set. */ -class AddAttributeToProductTemplateStep implements TestStepInterface +class AddAttributeToAttributeSetStep implements TestStepInterface { /** * Catalog ProductSet Index page. @@ -46,7 +46,7 @@ class AddAttributeToProductTemplateStep implements TestStepInterface * * @var CatalogAttributeSet */ - protected $productTemplate; + protected $attributeSet; /** * Catalog Product Index page. @@ -67,7 +67,7 @@ class AddAttributeToProductTemplateStep implements TestStepInterface * @param CatalogProductSetIndex $catalogProductSetIndex * @param CatalogProductSetEdit $catalogProductSetEdit * @param CatalogProductAttribute $attribute - * @param CatalogAttributeSet $productTemplate + * @param CatalogAttributeSet $attributeSet * @param FixtureFactory $fixtureFactory * @param CatalogProductIndex $catalogProductIndex * @param CatalogProductEdit $catalogProductEdit @@ -76,7 +76,7 @@ class AddAttributeToProductTemplateStep implements TestStepInterface CatalogProductSetIndex $catalogProductSetIndex, CatalogProductSetEdit $catalogProductSetEdit, CatalogProductAttribute $attribute, - CatalogAttributeSet $productTemplate, + CatalogAttributeSet $attributeSet, FixtureFactory $fixtureFactory, CatalogProductIndex $catalogProductIndex, CatalogProductEdit $catalogProductEdit @@ -84,7 +84,7 @@ class AddAttributeToProductTemplateStep implements TestStepInterface $this->catalogProductSetIndex = $catalogProductSetIndex; $this->catalogProductSetEdit = $catalogProductSetEdit; $this->attribute = $attribute; - $this->productTemplate = $productTemplate; + $this->attributeSet = $attributeSet; $this->fixtureFactory = $fixtureFactory; $this->catalogProductIndex = $catalogProductIndex; $this->catalogProductEdit = $catalogProductEdit; @@ -97,7 +97,7 @@ class AddAttributeToProductTemplateStep implements TestStepInterface */ public function run() { - $filterAttribute = ['set_name' => $this->productTemplate->getAttributeSetName()]; + $filterAttribute = ['set_name' => $this->attributeSet->getAttributeSetName()]; $this->catalogProductSetIndex->open()->getGrid()->searchAndOpen($filterAttribute); $this->catalogProductSetEdit->getAttributeSetEditBlock()->moveAttribute($this->attribute->getData()); $this->catalogProductSetEdit->getPageActions()->save(); @@ -108,7 +108,7 @@ class AddAttributeToProductTemplateStep implements TestStepInterface [ 'dataset' => 'product_with_category_with_anchor', 'data' => [ - 'attribute_set_id' => ['attribute_set' => $this->productTemplate], + 'attribute_set_id' => ['attribute_set' => $this->attributeSet], 'custom_attribute' => $this->attribute ], ] diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/CreateProductTemplateStep.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/CreateAttributeSetStep.php similarity index 62% rename from dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/CreateProductTemplateStep.php rename to dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/CreateAttributeSetStep.php index e8b106042af164484fbc0f73c6ad92deba48eafc..d844cccdc24e195a07befafdebf90515dfa0a46a 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/CreateProductTemplateStep.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/CreateAttributeSetStep.php @@ -12,24 +12,24 @@ use Magento\Mtf\TestStep\TestStepInterface; /** * Create product attribute template using handler. */ -class CreateProductTemplateStep implements TestStepInterface +class CreateAttributeSetStep implements TestStepInterface { /** * CatalogAttributeSet fixture. * * @var string */ - protected $productTemplate; + protected $attributeSet; /** * Preparing step properties. * * @constructor - * @param CatalogAttributeSet $productTemplate + * @param CatalogAttributeSet $attributeSet */ - public function __construct(CatalogAttributeSet $productTemplate) + public function __construct(CatalogAttributeSet $attributeSet) { - $this->productTemplate = $productTemplate; + $this->attributeSet = $attributeSet; } /** @@ -39,8 +39,8 @@ class CreateProductTemplateStep implements TestStepInterface */ public function run() { - $this->productTemplate->persist(); + $this->attributeSet->persist(); - return ['productTemplate' => $this->productTemplate]; + return ['attributeSet' => $this->attributeSet]; } } diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/SaveProductTemplateStep.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/SaveAttributeSetStep.php similarity index 93% rename from dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/SaveProductTemplateStep.php rename to dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/SaveAttributeSetStep.php index 759f036f3f818a5e024b9ae80253c4d0895737eb..2b7e0ac641f20cbda67cd693cc3696d5e4ea62c4 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/SaveProductTemplateStep.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestStep/SaveAttributeSetStep.php @@ -12,7 +12,7 @@ use Magento\Mtf\TestStep\TestStepInterface; /** * Save attributeSet on attribute set page. */ -class SaveProductTemplateStep implements TestStepInterface +class SaveAttributeSetStep implements TestStepInterface { /** * Catalog ProductSet Edit page. diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/di.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/di.xml index 92c41c11a06ef9e15ec3f1f2fa85775387f59ee3..aaf0ac2bcbda12b35e15d84c59dd1cd0c8c9e0fd 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/di.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/di.xml @@ -76,22 +76,22 @@ <argument name="severity" xsi:type="string">middle</argument> </arguments> </type> - <type name="Magento\Catalog\Test\Constraint\AssertProductTemplateSuccessSaveMessage"> + <type name="Magento\Catalog\Test\Constraint\AssertAttributeSetSuccessSaveMessage"> <arguments> <argument name="severity" xsi:type="string">high</argument> </arguments> </type> - <type name="Magento\Catalog\Test\Constraint\AssertProductTemplateForm"> + <type name="Magento\Catalog\Test\Constraint\AssertAttributeSetForm"> <arguments> <argument name="severity" xsi:type="string">high</argument> </arguments> </type> - <type name="Magento\Catalog\Test\Constraint\AssertProductTemplateInGrid"> + <type name="Magento\Catalog\Test\Constraint\AssertAttributeSetInGrid"> <arguments> <argument name="severity" xsi:type="string">high</argument> </arguments> </type> - <type name="Magento\Catalog\Test\Constraint\AssertProductTemplateOnProductForm"> + <type name="Magento\Catalog\Test\Constraint\AssertAttributeSetOnProductForm"> <arguments> <argument name="severity" xsi:type="string">high</argument> </arguments> @@ -126,7 +126,7 @@ <argument name="severity" xsi:type="string">high</argument> </arguments> </type> - <type name="Magento\Catalog\Test\Constraint\AssertProductTemplateGroupOnProductForm"> + <type name="Magento\Catalog\Test\Constraint\AssertAttributeSetGroupOnProductForm"> <arguments> <argument name="severity" xsi:type="string">high</argument> </arguments> @@ -136,7 +136,7 @@ <argument name="severity" xsi:type="string">high</argument> </arguments> </type> - <type name="Magento\Catalog\Test\Constraint\AssertProductTemplateSuccessDeleteMessage"> + <type name="Magento\Catalog\Test\Constraint\AssertAttributeSetSuccessDeleteMessage"> <arguments> <argument name="severity" xsi:type="string">high</argument> </arguments> diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/testcase.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/testcase.xml index 4e02d8c777cdae0624fb21d771f32920a66a3c69..c1d721c45f35024071b54adffd8335758edacaa8 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/testcase.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/testcase.xml @@ -16,12 +16,12 @@ <step name="setDefaultAttributeValue" module="Magento_Catalog" next="saveProduct"/> <step name="saveProduct" module="Magento_Catalog"/> </scenario> - <scenario name="CreateProductAttributeEntityTest" firstStep="createProductTemplate"> - <step name="createProductTemplate" module="Magento_Catalog" next="openProductAttributesPage"/> + <scenario name="CreateProductAttributeEntityTest" firstStep="createAttributeSet"> + <step name="createAttributeSet" module="Magento_Catalog" next="openProductAttributesPage"/> <step name="openProductAttributesPage" module="Magento_Catalog" next="addNewAttribute"/> <step name="addNewAttribute" module="Magento_Catalog" next="fillAttributeForm"/> <step name="fillAttributeForm" module="Magento_Catalog" next="saveAttribute"/> - <step name="saveAttribute" module="Magento_Catalog" next="addAttributeToProductTemplate"/> - <step name="addAttributeToProductTemplate" module="Magento_Catalog"/> + <step name="saveAttribute" module="Magento_Catalog" next="addAttributeToAttributeSet"/> + <step name="addAttributeToAttributeSet" module="Magento_Catalog"/> </scenario> </config> diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertProductAttributeAbsenceInVariationsSearch.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertProductAttributeAbsenceInVariationsSearch.php index 1c7edf16fe5f56fa2bbca505492f728c8a8e3063..192296493baa48c69b110759e7ed7837f91cead8 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertProductAttributeAbsenceInVariationsSearch.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertProductAttributeAbsenceInVariationsSearch.php @@ -15,7 +15,7 @@ use Magento\Mtf\Constraint\AbstractConstraint; /** * Class AssertProductAttributeAbsenceInVariationsSearch - * Check that deleted attribute can't be added to product template on Product Page via Add Attribute control + * Check that deleted attribute can't be added to attribute set on Product Page via Add Attribute control */ class AssertProductAttributeAbsenceInVariationsSearch extends AbstractConstraint { @@ -25,7 +25,7 @@ class AssertProductAttributeAbsenceInVariationsSearch extends AbstractConstraint const TAB_VARIATIONS = 'variations'; /** - * Assert that deleted attribute can't be added to product template on Product Page via Add Attribute control + * Assert that deleted attribute can't be added to attribute set on Product Page via Add Attribute control * * @param CatalogProductAttribute $productAttribute * @param CatalogProductIndex $productGrid diff --git a/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/CreateSalesRuleEntityTest.xml b/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/CreateSalesRuleEntityTest.xml index 4c384ea3f8853265fa0ba9877a56492a871914dc..c75becfb6b45fd1b54a25031a6d17f0d94586d4c 100644 --- a/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/CreateSalesRuleEntityTest.xml +++ b/dev/tests/functional/tests/app/Magento/SalesRule/Test/TestCase/CreateSalesRuleEntityTest.xml @@ -249,7 +249,7 @@ <data name="salesRule/data/website_ids/0" xsi:type="string">Main Website</data> <data name="salesRule/data/customer_group_ids/0" xsi:type="string">NOT LOGGED IN</data> <data name="salesRule/data/coupon_type" xsi:type="string">No Coupon</data> - <data name="salesRule/data/conditions_serialized" xsi:type="string">{Product attribute combination:[Product Template|is|Default]}</data> + <data name="salesRule/data/conditions_serialized" xsi:type="string">{Product attribute combination:[Attribute Set|is|Default]}</data> <data name="salesRule/data/simple_action" xsi:type="string">Percent of product price discount</data> <data name="salesRule/data/discount_amount" xsi:type="string">50</data> <data name="salesRule/data/apply_to_shipping" xsi:type="string">No</data> diff --git a/dev/tests/functional/tests/app/Magento/Weee/Test/TestCase/CreateTaxWithFptTest.php b/dev/tests/functional/tests/app/Magento/Weee/Test/TestCase/CreateTaxWithFptTest.php index 1bdedf647cb0b99bd7ccfff33cd1ed1782eec882..ce13fcc374129d215af42f18ccd4cb4c8423ba5a 100644 --- a/dev/tests/functional/tests/app/Magento/Weee/Test/TestCase/CreateTaxWithFptTest.php +++ b/dev/tests/functional/tests/app/Magento/Weee/Test/TestCase/CreateTaxWithFptTest.php @@ -24,15 +24,15 @@ use Magento\Mtf\TestCase\Injectable; * 7. Go to Stores > Attributes > Product and add new attribute. * 8. Select Fixed Product Tax type and fill attribute label. * 9. Save attribute. - * 10. Go to Stores > Attributes > Product Template. - * 11. Add new product template based on default. + * 10. Go to Stores > Attributes > Attribute Set. + * 11. Add new attribute set based on default. * 12. Add created FPT attribute to Product Details group and fill set name. * 13. Save attribute set. * * Steps: * 1. Go to Products > Catalog. * 2. Add new product. - * 3. Select created product template. + * 3. Select created attribute set. * 4. Fill data according to dataset. * 5. Save product. * 6. Go to Stores > Configuration. @@ -69,12 +69,12 @@ class CreateTaxWithFptTest extends Injectable $this->fixtureFactory = $fixtureFactory; $customer = $fixtureFactory->createByCode('customer', ['dataset' => 'johndoe_with_addresses']); $customer->persist(); - $productTemplate = $this->fixtureFactory + $attributeSet = $this->fixtureFactory ->createByCode('catalogAttributeSet', ['dataset' => 'custom_attribute_set_with_fpt']); - $productTemplate->persist(); + $attributeSet->persist(); return [ 'customer' => $customer, - 'productTemplate' => $productTemplate + 'attributeSet' => $attributeSet ]; } @@ -97,7 +97,7 @@ class CreateTaxWithFptTest extends Injectable * * @param string $configData * @param Customer $customer - * @param CatalogAttributeSet $productTemplate + * @param CatalogAttributeSet $attributeSet * @param array $productData * @return array */ @@ -105,12 +105,12 @@ class CreateTaxWithFptTest extends Injectable $productData, $configData, Customer $customer, - CatalogAttributeSet $productTemplate + CatalogAttributeSet $attributeSet ) { $this->fixtureFactory->createByCode('taxRule', ['dataset' => 'tax_rule_default'])->persist(); $product = $this->fixtureFactory->createByCode( 'catalogProductSimple', - ['dataset' => $productData, 'data' => ['attribute_set_id' => ['attribute_set' => $productTemplate]]] + ['dataset' => $productData, 'data' => ['attribute_set_id' => ['attribute_set' => $attributeSet]]] ); $product->persist(); $this->objectManager->create( diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Set/DeleteTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Set/DeleteTest.php index 6fdab58458c5d43ee1840d57a5d6e120487d090f..ddd37fc1cb63f24d3dc7d601856bc80a1d7a97ee 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Set/DeleteTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Set/DeleteTest.php @@ -21,7 +21,7 @@ class DeleteTest extends \Magento\TestFramework\TestCase\AbstractBackendControll $this->assertNull($this->getAttributeSetByName('empty_attribute_set')); $this->assertSessionMessages( - $this->equalTo(['The product template has been removed.']), + $this->equalTo(['The attribute set has been removed.']), MessageInterface::TYPE_SUCCESS ); $this->assertRedirect($this->stringContains('catalog/product_set/index/')); 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 cf42cd0950a7a806535e76d213079ad68a03a6ee..600e6d97eaa56a4fe077825de0cabae976ff5ddf 100755 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php @@ -3949,8 +3949,8 @@ return [ ['Magento\Catalog\Ui\Component\Listing\Filters'], ['Magento\Customer\Ui\Component\Listing\Filters'], ['Magento\Catalog\Block\Product\TemplateSelector'], - ['Magento\Downloadable\Controller\Adminhtml\Downloadable\Product\Edit\SuggestProductTemplates'], - ['Magento\Bundle\Controller\Adminhtml\Bundle\Product\Edit\SuggestProductTemplates'], + ['Magento\Downloadable\Controller\Adminhtml\Downloadable\Product\Edit\SuggestAttributeSets'], + ['Magento\Bundle\Controller\Adminhtml\Bundle\Product\Edit\SuggestAttributeSets'], ['Magento\ConfigurableProduct\Block\Adminhtml\Product\Edit\Tab\Super\Config\Attribute'], ['Magento\Wishlist\Model\Observer'], ['Magento\Swatches\Model\Observer', 'Magento\Swatches\Observer\*'], diff --git a/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Repository.php b/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Repository.php index 496ba2e8d173a62d6fbc89560d3925af7ff43234..6922234a56df3321cbbb4aba73a12acf97b9c072 100644 --- a/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Repository.php +++ b/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Repository.php @@ -467,20 +467,20 @@ class Repository extends \Magento\Framework\Code\Generator\EntityAbstract { $body = "\$collection = \$this->" . $this->_getSourceCollectionFactoryPropertyName() . "->create();\n" . "\$this->extensionAttributesJoinProcessor->process(\$collection);\n" - . "foreach (\$criteria->getFilterGroups() as \$filterGroup) {\n" + . "foreach (\$searchCriteria->getFilterGroups() as \$filterGroup) {\n" . " foreach (\$filterGroup->getFilters() as \$filter) {\n" . " \$condition = \$filter->getConditionType() ? \$filter->getConditionType() : 'eq';\n" . " \$collection->addFieldToFilter(\$filter->getField(), [\$condition => \$filter->getValue()]);\n" . " }\n" . "}\n" - . "\$collection->setCurPage(\$criteria->getCurrentPage());\n" - . "\$collection->setPageSize(\$criteria->getPageSize());\n" + . "\$collection->setCurPage(\$searchCriteria->getCurrentPage());\n" + . "\$collection->setPageSize(\$searchCriteria->getPageSize());\n" . "return \$collection;\n"; return [ 'name' => 'getList', 'parameters' => [ [ - 'name' => 'criteria', + 'name' => 'searchCriteria', 'type' => self::SEARCH_CRITERIA, ], ], @@ -490,7 +490,7 @@ class Repository extends \Magento\Framework\Code\Generator\EntityAbstract 'tags' => [ [ 'name' => 'param', - 'description' => self::SEARCH_CRITERIA . ' $criteria', + 'description' => self::SEARCH_CRITERIA . ' $searchCriteria', ], [ 'name' => 'return', diff --git a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/SampleRepository.txt b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/SampleRepository.txt index d135ca64dd1fccfc3382920cd9d3a6d02daa6750..803d9828cf54dd50d5fcf56752d61d9f0937103f 100644 --- a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/SampleRepository.txt +++ b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/SampleRepository.txt @@ -103,21 +103,21 @@ class SampleRepository implements \Magento\Framework\ObjectManager\Code\Generato /** * Find entities by criteria * - * @param \Magento\Framework\Api\SearchCriteria $criteria + * @param \Magento\Framework\Api\SearchCriteria $searchCriteria * @return \Magento\Framework\ObjectManager\Code\Generator\SampleInterface[] */ - public function getList(\Magento\Framework\Api\SearchCriteria $criteria) + public function getList(\Magento\Framework\Api\SearchCriteria $searchCriteria) { $collection = $this->sampleInterfaceSearchResultFactory->create(); $this->extensionAttributesJoinProcessor->process($collection); - foreach ($criteria->getFilterGroups() as $filterGroup) { + foreach ($searchCriteria->getFilterGroups() as $filterGroup) { foreach ($filterGroup->getFilters() as $filter) { $condition = $filter->getConditionType() ? $filter->getConditionType() : 'eq'; $collection->addFieldToFilter($filter->getField(), [$condition => $filter->getValue()]); } } - $collection->setCurPage($criteria->getCurrentPage()); - $collection->setPageSize($criteria->getPageSize()); + $collection->setCurPage($searchCriteria->getCurrentPage()); + $collection->setPageSize($searchCriteria->getPageSize()); return $collection; }