diff --git a/app/code/Magento/Catalog/Test/Unit/Observer/AddCatalogToTopmenuItemsObserverTest.php b/app/code/Magento/Catalog/Test/Unit/Observer/AddCatalogToTopmenuItemsObserverTest.php index e0eb21a8bba306a258a26440a5cf957438427c5e..a8c8405730b143ae61d83e67d8a2e5dcd408e56a 100644 --- a/app/code/Magento/Catalog/Test/Unit/Observer/AddCatalogToTopmenuItemsObserverTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Observer/AddCatalogToTopmenuItemsObserverTest.php @@ -81,9 +81,18 @@ class AddCatalogToTopmenuItemsObserverTest extends \PHPUnit_Framework_TestCase ->getMock(); $collection = $this->getMockBuilder('\Magento\Catalog\Model\ResourceModel\Category\Collection') - ->disableOriginalConstructor() + ->setMethods( + [ + 'addIsActiveFilter', + 'addAttributeToSelect', + 'addFieldToFilter', + 'addAttributeToFilter', + 'addUrlRewriteToResult', + 'getIterator' + ] + )->disableOriginalConstructor() ->getMock(); - + $collection->expects($this->once())->method('addIsActiveFilter'); $collectionFactory->expects($this->once())->method('create') ->willReturn($collection); @@ -151,6 +160,4 @@ class AddCatalogToTopmenuItemsObserverTest extends \PHPUnit_Framework_TestCase $observer = $this->_preparationData(); $this->_observer->execute($observer); } - - } diff --git a/app/code/Magento/CatalogImportExport/Model/Export/Product.php b/app/code/Magento/CatalogImportExport/Model/Export/Product.php index 2dff6244adf18ec8ca5999a63fa956d742db6aec..90f8640d493a8211ce4ad303024db85f93e0b171 100644 --- a/app/code/Magento/CatalogImportExport/Model/Export/Product.php +++ b/app/code/Magento/CatalogImportExport/Model/Export/Product.php @@ -1230,6 +1230,9 @@ class Product extends \Magento\ImportExport\Model\Export\Entity\AbstractEntity $row['price'] = $option['price']; $row['price_type'] = ($option['price_type'] == 'percent') ? $option['price_type'] : 'fixed'; $row['sku'] = $option['sku']; + if ($option['max_characters']) { + $row['max_characters'] = $option['max_characters']; + } $values = $option->getValues(); diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product/Option.php b/app/code/Magento/CatalogImportExport/Model/Import/Product/Option.php index b047d8aeb20e44694147cd3adb7892f5d93ac011..8d6310d3a182527add7d0c3e5ba80db4f337afef 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product/Option.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product/Option.php @@ -56,6 +56,11 @@ class Option extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity */ const XML_PATH_PAGE_SIZE = 'import/format_v1/page_size'; + /** + * @var string + */ + private $columnMaxCharacters = '_custom_option_max_characters'; + /** * All stores code-ID pairs * @@ -1043,9 +1048,7 @@ class Option extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity * Get multiRow format from one line data. * * @param array $rowData - * * @return array - * @SuppressWarnings(PHPMD.NPathComplexity) */ protected function _getMultiRowFormat($rowData) { @@ -1057,34 +1060,61 @@ class Option extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity } $i = 0; - foreach ($rowData['custom_options'] as $name => $customOption) { $i++; foreach ($customOption as $rowOrder => $optionRow) { - $row = [ - self::COLUMN_STORE => '', - self::COLUMN_TYPE => $name ? $optionRow['type'] : '', - self::COLUMN_TITLE => $name, - self::COLUMN_IS_REQUIRED => $optionRow['required'], - self::COLUMN_SORT_ORDER => $i, - self::COLUMN_ROW_TITLE => isset($optionRow['option_title']) ? $optionRow['option_title'] : '', - self::COLUMN_ROW_SKU => $optionRow['sku'], - self::COLUMN_ROW_SORT => $rowOrder, - self::COLUMN_PREFIX . 'sku' => $optionRow['sku'] - ]; + $row = array_merge( + [ + self::COLUMN_STORE => '', + self::COLUMN_TITLE => $name, + self::COLUMN_SORT_ORDER => $i, + self::COLUMN_ROW_SORT => $rowOrder + ], + $this->processOptionRow($name, $optionRow) + ); + $name = ''; + $multiRow[] = $row; + } + } + + return $multiRow; + } - $percent_suffix = isset($optionRow['price_type']) && ($optionRow['price_type'] == 'percent') ? '%' : ''; - $row[self::COLUMN_ROW_PRICE] = isset($optionRow['price']) ? $optionRow['price'] . $percent_suffix : ''; - $row[self::COLUMN_PREFIX . 'price'] = $row[self::COLUMN_ROW_PRICE]; + /** + * @param string $name + * @param array $optionRow + * @return array + */ + private function processOptionRow($name, $optionRow) + { + $result = [ + self::COLUMN_TYPE => $name ? $optionRow['type'] : '', + self::COLUMN_IS_REQUIRED => $optionRow['required'], + self::COLUMN_ROW_SKU => $optionRow['sku'], + self::COLUMN_PREFIX . 'sku' => $optionRow['sku'], + self::COLUMN_ROW_TITLE => '', + self::COLUMN_ROW_PRICE => '' + ]; - $name = ''; + if (isset($optionRow['option_title'])) { + $result[self::COLUMN_ROW_TITLE] = $optionRow['option_title']; + } - $multiRow[] = $row; + if (isset($optionRow['price'])) { + $percent_suffix = ''; + if (isset($optionRow['price_type']) && $optionRow['price_type'] == 'percent') { + $percent_suffix = '%'; } + $result[self::COLUMN_ROW_PRICE] = $optionRow['price'] . $percent_suffix; + } + + $result[self::COLUMN_PREFIX . 'price'] = $result[self::COLUMN_ROW_PRICE]; + if (isset($optionRow['max_characters'])) { + $result[$this->columnMaxCharacters] = $optionRow['max_characters']; } - return $multiRow; + return $result; } /** diff --git a/app/code/Magento/Checkout/Block/Cart/Item/Renderer.php b/app/code/Magento/Checkout/Block/Cart/Item/Renderer.php index 74865f2a8836dccfa9e80cc3b7c65cde56accb13..66278630b39af8a8063c298882c6b1e1d1905e7d 100644 --- a/app/code/Magento/Checkout/Block/Cart/Item/Renderer.php +++ b/app/code/Magento/Checkout/Block/Cart/Item/Renderer.php @@ -336,7 +336,7 @@ class Renderer extends \Magento\Framework\View\Element\Template implements ]; } } - $this->messageManager->getMessages('quote_item' . $quoteItem->getId())->clear(); + $this->messageManager->getMessages(true, 'quote_item' . $quoteItem->getId())->clear(); return $messages; } diff --git a/app/code/Magento/Customer/Api/CustomerNameGenerationInterface.php b/app/code/Magento/Customer/Api/CustomerNameGenerationInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..5e9fea97e275ce2a47b9499b645a3d304f92407c --- /dev/null +++ b/app/code/Magento/Customer/Api/CustomerNameGenerationInterface.php @@ -0,0 +1,26 @@ +<?php +/** + * + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\Customer\Api; + +use Magento\Customer\Api\Data\CustomerInterface; + +/** + * Interface CustomerNameGenerationInterface + * + * @api + */ +interface CustomerNameGenerationInterface +{ + /** + * Concatenate all customer name parts into full customer name. + * + * @param CustomerInterface $customerData + * @return string + */ + public function getCustomerName(CustomerInterface $customerData); +} diff --git a/app/code/Magento/Customer/Helper/View.php b/app/code/Magento/Customer/Helper/View.php index d6b833002e849a947449c0b4f99cf70a79f7f76e..183f2171420eca7211eead7da59ff9ffd74665f0 100644 --- a/app/code/Magento/Customer/Helper/View.php +++ b/app/code/Magento/Customer/Helper/View.php @@ -5,13 +5,14 @@ */ namespace Magento\Customer\Helper; +use Magento\Customer\Api\CustomerNameGenerationInterface; use Magento\Customer\Api\CustomerMetadataInterface; use Magento\Customer\Api\Data\CustomerInterface; /** * Customer helper for view. */ -class View extends \Magento\Framework\App\Helper\AbstractHelper +class View extends \Magento\Framework\App\Helper\AbstractHelper implements CustomerNameGenerationInterface { /** * @var CustomerMetadataInterface @@ -33,10 +34,7 @@ class View extends \Magento\Framework\App\Helper\AbstractHelper } /** - * Concatenate all customer name parts into full customer name. - * - * @param CustomerInterface $customerData - * @return string + * {@inheritdoc} */ public function getCustomerName(CustomerInterface $customerData) { diff --git a/app/code/Magento/Customer/etc/di.xml b/app/code/Magento/Customer/etc/di.xml index 0b8450f053a0786ca82977d55e6b9510140fc0fe..03747e91db6592b54bca6001c6f4da0f5cededd1 100644 --- a/app/code/Magento/Customer/etc/di.xml +++ b/app/code/Magento/Customer/etc/di.xml @@ -43,6 +43,8 @@ type="Magento\Customer\Model\Metadata\AddressMetadataManagement" /> <preference for="Magento\Customer\Api\CustomerManagementInterface" type="Magento\Customer\Model\CustomerManagement" /> + <preference for="Magento\Customer\Api\CustomerNameGenerationInterface" + type="Magento\Customer\Helper\View" /> <type name="Magento\Customer\Model\Session"> <arguments> <argument name="configShare" xsi:type="object">Magento\Customer\Model\Config\Share\Proxy</argument> diff --git a/app/code/Magento/GoogleOptimizer/Model/Plugin/Catalog/Product/Category/DataProvider.php b/app/code/Magento/GoogleOptimizer/Model/Plugin/Catalog/Product/Category/DataProvider.php index 88ecd965cb5f6aca7de8d9dc83001b383d14e2be..9a49c48ead20bdb037795ccb6d04ca435e14a531 100644 --- a/app/code/Magento/GoogleOptimizer/Model/Plugin/Catalog/Product/Category/DataProvider.php +++ b/app/code/Magento/GoogleOptimizer/Model/Plugin/Catalog/Product/Category/DataProvider.php @@ -34,9 +34,27 @@ class DataProvider public function afterGetMeta(NewCategoryDataProvider $subject, $result) { $isDisabled = !$this->helper->isGoogleExperimentActive(); + $experimentScriptFieldConfig = [ + 'arguments' => [ + 'data' => [ + 'config' => [ + 'componentDisabled' => $isDisabled + ] + ] + ] + ]; - $result['data']['children']['experiment_script']['componentDisabled'] = $isDisabled; - $result['data']['children']['code_id']['componentDisabled'] = $isDisabled; + $codeIdFieldConfig = [ + 'arguments' => [ + 'data' => [ + 'config' => [ + 'componentDisabled' => $isDisabled + ] + ] + ] + ]; + $result['data']['children']['experiment_script'] = $experimentScriptFieldConfig; + $result['data']['children']['code_id'] = $codeIdFieldConfig; return $result; } diff --git a/app/code/Magento/GoogleOptimizer/Test/Unit/Model/Plugin/Catalog/Product/Category/DataProviderTest.php b/app/code/Magento/GoogleOptimizer/Test/Unit/Model/Plugin/Catalog/Product/Category/DataProviderTest.php index 0651398ed306fbd1c794dcc91fc69ad75d58bcb5..965e52a218d5dd23d538f9fea8268c9597d9bcff 100644 --- a/app/code/Magento/GoogleOptimizer/Test/Unit/Model/Plugin/Catalog/Product/Category/DataProviderTest.php +++ b/app/code/Magento/GoogleOptimizer/Test/Unit/Model/Plugin/Catalog/Product/Category/DataProviderTest.php @@ -48,10 +48,11 @@ class DataProviderTest extends \PHPUnit_Framework_TestCase $this->helper->expects($this->any())->method('isGoogleExperimentActive')->willReturn(true); $result = $this->plugin->afterGetMeta($this->subject, []); - $this->assertArrayHasKey('experiment_script', $result['data']['children']); - $this->assertFalse($result['data']['children']['experiment_script']['componentDisabled']); - $this->assertArrayHasKey('code_id', $result['data']['children']); - $this->assertFalse($result['data']['children']['code_id']['componentDisabled']); + $children = $result['data']['children']; + $this->assertArrayHasKey('experiment_script', $children); + $this->assertFalse($children['experiment_script']['arguments']['data']['config']['componentDisabled']); + $this->assertArrayHasKey('code_id', $children); + $this->assertFalse($children['code_id']['arguments']['data']['config']['componentDisabled']); } public function testAfterGetMetaNegative() @@ -59,9 +60,10 @@ class DataProviderTest extends \PHPUnit_Framework_TestCase $this->helper->expects($this->any())->method('isGoogleExperimentActive')->willReturn(false); $result = $this->plugin->afterGetMeta($this->subject, []); - $this->assertArrayHasKey('experiment_script', $result['data']['children']); - $this->assertTrue($result['data']['children']['experiment_script']['componentDisabled']); - $this->assertArrayHasKey('code_id', $result['data']['children']); - $this->assertTrue($result['data']['children']['code_id']['componentDisabled']); + $children = $result['data']['children']; + $this->assertArrayHasKey('experiment_script', $children); + $this->assertTrue($children['experiment_script']['arguments']['data']['config']['componentDisabled']); + $this->assertArrayHasKey('code_id', $children); + $this->assertTrue($children['code_id']['arguments']['data']['config']['componentDisabled']); } } diff --git a/app/code/Magento/ProductVideo/view/adminhtml/web/js/get-video-information.js b/app/code/Magento/ProductVideo/view/adminhtml/web/js/get-video-information.js index 3df07df06771ce85039289947afa93dd29f900b2..bdb789e3b2070a910424cc6e0fe60bf58f266894 100644 --- a/app/code/Magento/ProductVideo/view/adminhtml/web/js/get-video-information.js +++ b/app/code/Magento/ProductVideo/view/adminhtml/web/js/get-video-information.js @@ -335,6 +335,8 @@ define([ _FINISH_UPDATE_INFORMATION_TRIGGER: 'finish_update_information', + _VIDEO_URL_VALIDATE_TRIGGER: 'validate_video_url', + _videoInformation: null, _currentVideoUrl: null, @@ -350,6 +352,23 @@ define([ this._currentVideoUrl = null; }, this )); + this.element.on(this._VIDEO_URL_VALIDATE_TRIGGER, $.proxy(this._onUrlValidateHandler, this)); + }, + + /** + * @private + */ + _onUrlValidateHandler: function (event, callback, forceVideo) { + var url = this.element.val(), + videoInfo; + + videoInfo = this._validateURL(url, forceVideo); + + if (videoInfo) { + callback(); + } else { + this._onRequestError($.mage.__('Invalid video url')); + } }, /** @@ -461,7 +480,7 @@ define([ * @private */ function _onVimeoLoaded(data) { - var tmp = data[0], + var tmp, respData; if (data.length < 1) { diff --git a/app/code/Magento/ProductVideo/view/adminhtml/web/js/new-video-dialog.js b/app/code/Magento/ProductVideo/view/adminhtml/web/js/new-video-dialog.js index 6f224fefae452ccd42e1f56a3387eba72e872125..2b52034c667878793e9cc154340c04f746cb09af 100644 --- a/app/code/Magento/ProductVideo/view/adminhtml/web/js/new-video-dialog.js +++ b/app/code/Magento/ProductVideo/view/adminhtml/web/js/new-video-dialog.js @@ -726,33 +726,32 @@ define([ videoLoaded = true; this._blockActionButtons(true); - this._videoUrlWidget.on('finish_update_information.validation', $.proxy( - function (event, status) { - videoForm.mage('validation', { - - /** - * @param {jQuery} error - * @param {jQuery} element - */ - errorPlacement: function (error, element) { - error.insertAfter(element); - } - }).on('highlight.validate', function () { - $(this).validation('option'); - }); - videoForm.validation(); - if (this._videoRequestComplete === false) { - videoLoaded = false; + this._videoUrlWidget.trigger('validate_video_url', $.proxy(function () { + + videoForm.mage('validation', { + + /** + * @param {jQuery} error + * @param {jQuery} element + */ + errorPlacement: function (error, element) { + error.insertAfter(element); } + }).on('highlight.validate', function () { + $(this).validation('option'); + }); - callback(status && videoForm.valid() && videoLoaded); - this._videoUrlWidget.off('finish_update_information.validation'); - this._blockActionButtons(false); - }, this - )); + videoForm.validation(); - this._videoUrlWidget.trigger('update_video_information'); + if (this._videoRequestComplete === false) { + videoLoaded = false; + } + + callback(videoForm.valid() && videoLoaded); + }, this)); + + this._blockActionButtons(false); }, /** diff --git a/app/code/Magento/Swatches/view/frontend/layout/wishlist_index_configure_type_configurable.xml b/app/code/Magento/Swatches/view/frontend/layout/wishlist_index_configure_type_configurable.xml new file mode 100644 index 0000000000000000000000000000000000000000..aa5a712406497efe19fdb5b9ad6e5bf663f388ec --- /dev/null +++ b/app/code/Magento/Swatches/view/frontend/layout/wishlist_index_configure_type_configurable.xml @@ -0,0 +1,18 @@ +<?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"> + <head> + <css src="Magento_Swatches::css/swatches.css"/> + </head> + <body> + <referenceBlock name="product.info.options.configurable" remove="true"/> + <referenceBlock name="product.info.options.wrapper"> + <block class="Magento\Swatches\Block\Product\Renderer\Configurable" name="product.info.options.swatches" as="swatch_options" before="-" /> + </referenceBlock> + </body> +</page> diff --git a/app/code/Magento/Swatches/view/frontend/web/js/SwatchRenderer.js b/app/code/Magento/Swatches/view/frontend/web/js/SwatchRenderer.js index 403b5153ad95677d797b1efa7b6b2486fc3a7947..22025f64994d33669c86583b4c89c83d444f35ec 100644 --- a/app/code/Magento/Swatches/view/frontend/web/js/SwatchRenderer.js +++ b/app/code/Magento/Swatches/view/frontend/web/js/SwatchRenderer.js @@ -430,9 +430,11 @@ define([ * @private */ _RenderFormInput: function (config) { - return '<input class="' + this.options.classes.attributeInput + '" ' + + return '<input class="' + this.options.classes.attributeInput + ' super-attribute-select" ' + 'name="super_attribute[' + config.id + ']" ' + + 'type="text" ' + 'value="" ' + + 'data-selector="super_attribute[' + config.id + ']" ' + 'data-validate="{required:true}" ' + 'aria-required="true" ' + 'aria-invalid="true" ' + @@ -500,6 +502,7 @@ define([ } $widget._LoadProductMedia(); + $input.trigger('change'); }, /** @@ -524,6 +527,7 @@ define([ $widget._Rebuild(); $widget._UpdatePrice(); $widget._LoadProductMedia(); + $input.trigger('change'); }, /** diff --git a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php index 604e317213c9d76357e66200e7b976221abcb9e0..5d104dfef4cf4d74efcf7d89e56474363a5469f9 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php @@ -62,7 +62,13 @@ class ProductTest extends \PHPUnit_Framework_TestCase 'Magento\ImportExport\Model\Export\Adapter\Csv' ) ); - $this->assertNotEmpty($this->_model->export()); + $exportData = $this->_model->export(); + $this->assertContains('New Product', $exportData); + + $this->markTestIncomplete('Test must be unskiped after implementation MAGETWO-49018'); + $this->assertContains('Option 1 Value 1', $exportData); + $this->assertContains('test_option_code_2', $exportData); + $this->assertContains('max_characters=10', $exportData); } /** diff --git a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ProductTest.php b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ProductTest.php index c1b78575dd5bb8f39e1350481f37a1314e8c7851..4f44de03137faed64f08cda5d84f6987aad07e1e 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ProductTest.php +++ b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ProductTest.php @@ -69,6 +69,7 @@ class ProductTest extends \Magento\TestFramework\Indexer\TestCase 'price' => '_custom_option_price', 'sku' => '_custom_option_sku', 'sort_order' => '_custom_option_sort_order', + 'max_characters' => '_custom_option_max_characters', ]; /** diff --git a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/_files/product_with_custom_options.csv b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/_files/product_with_custom_options.csv index 17106cdac132c22cbfe8c2e0472df7b9ebc09867..2fb3e879a8aedddafdeb885d338c56b4a619d1ad 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/_files/product_with_custom_options.csv +++ b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/_files/product_with_custom_options.csv @@ -1,2 +1,2 @@ sku,website_code,store_view_code,attribute_set_code,product_type,name,description,short_description,weight,product_online,visibility,product_websites,categories,price,special_price,special_price_from_date,special_price_to_date,tax_class_name,url_key,meta_title,meta_keywords,meta_description,base_image,base_image_label,small_image,small_image_label,thumbnail_image,thumbnail_image_label,additional_images,additional_image_labels,configurable_variation_labels,configurable_variations,bundle_price_type,bundle_sku_type,bundle_weight_type,bundle_values,downloadble_samples,downloadble_links,associated_skus,related_skus,crosssell_skus,upsell_skus,custom_options,additional_attributes,manage_stock,is_in_stock,qty,out_of_stock_qty,is_qty_decimal,allow_backorders,min_cart_qty,max_cart_qty,notify_on_stock_below,qty_increments,enable_qty_increments,is_decimal_divided,new_from_date,new_to_date,gift_message_available,created_at,updated_at,custom_design,custom_design_from,custom_design_to,custom_layout_update,page_layout,product_options_container,msrp_price,msrp_display_actual_price_type,map_enabled -simple,base,,Default,simple,New Product,,,9,1,"Catalog, Search",base,,10,,,,Taxable Goods,new-product,,,,,,,,,,,,,,,,,,,,,,,,"name=Test Field Title,type=field,required=1;sku=1-text,price=0,price_type=fixed|name=Test Date and Time Title,type=date_time,required=1,price=2,option_title=custom option 1,sku=2-date|name=Test Select,type=drop_down,required=1,price=3,option_title=Option 1,sku=3-1-select|name=Test Select,type=drop_down,required=1,price=3,option_title=Option 2,sku=3-2-select|name=Test Radio,type=radio,required=1,price=3,option_title=Option 1,sku=4-1-radio|name=Test Radio,type=radio,required=1,price=3,option_title=Option 2,sku=4-2-radio",,1,1,999,0,0,0,1,10000,1,1,0,0,,,,,,,,,,,Block after Info Column,,, +simple,base,,Default,simple,New Product,,,9,1,"Catalog, Search",base,,10,,,,Taxable Goods,new-product,,,,,,,,,,,,,,,,,,,,,,,,"name=Test Field Title,type=field,required=1;sku=1-text,price=0,price_type=fixed,max_characters=10|name=Test Date and Time Title,type=date_time,required=1,price=2,option_title=custom option 1,sku=2-date|name=Test Select,type=drop_down,required=1,price=3,option_title=Option 1,sku=3-1-select|name=Test Select,type=drop_down,required=1,price=3,option_title=Option 2,sku=3-2-select|name=Test Radio,type=radio,required=1,price=3,option_title=Option 1,sku=4-1-radio|name=Test Radio,type=radio,required=1,price=3,option_title=Option 2,sku=4-2-radio",,1,1,999,0,0,0,1,10000,1,1,0,0,,,,,,,,,,,Block after Info Column,,, diff --git a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/_files/product_with_custom_options_new.csv b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/_files/product_with_custom_options_new.csv index 9c4e884646335f655a6995dff184af3091b116ab..7fe8832cd5804020b6007c41270851e4080115a9 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/_files/product_with_custom_options_new.csv +++ b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/_files/product_with_custom_options_new.csv @@ -1,2 +1,2 @@ sku,store_view_code,attribute_set_code,product_type,categories,product_websites,name,description,short_description,weight,product_online,tax_class_name,visibility,price,special_price,special_price_from_date,special_price_to_date,url_key,meta_title,meta_keywords,meta_description,base_image,base_image_label,small_image,small_image_label,thumbnail_image,thumbnail_image_label,created_at,updated_at,new_from_date,new_to_date,display_product_options_in,map_price,msrp_price,map_enabled,gift_message_available,custom_design,custom_design_from,custom_design_to,custom_layout_update,page_layout,product_options_container,msrp_display_actual_price_type,country_of_manufacture,additional_attributes,qty,out_of_stock_qty,use_config_min_qty,is_qty_decimal,allow_backorders,use_config_backorders,min_cart_qty,use_config_min_sale_qty,max_cart_qty,use_config_max_sale_qty,is_in_stock,notify_on_stock_below,use_config_notify_stock_qty,manage_stock,use_config_manage_stock,use_config_qty_increments,qty_increments,use_config_enable_qty_inc,enable_qty_increments,is_decimal_divided,website_id,related_skus,crosssell_skus,upsell_skus,additional_images,additional_image_labels,hide_from_product_page,custom_options,bundle_price_type,bundle_sku_type,bundle_price_view,bundle_weight_type,bundle_values,associated_skus -simple_new,,Default,simple,,base,"New Product",,,,1,"Taxable Goods","Catalog, Search",10.0000,,,,new-product,"New Product","New Product","New Product ",,,,,,,"2015-10-20 07:05:38","2015-10-20 07:05:38",,,"Block after Info Column",,,,,,,,,,,,,"has_options=1,quantity_and_stock_status=In Stock,required_options=1",100.0000,0.0000,1,0,0,1,1.0000,1,10000.0000,1,1,1.0000,1,1,0,1,1.0000,0,0,0,1,,,,,,,"name=New Radio,type=radio,required=1,price=3.0000,price_type=fixed,sku=4-1-radio,option_title=Option 1|name=New Radio,type=radio,required=1,price=3.0000,price_type=fixed,sku=4-2-radio,option_title=Option 2|name=New Select,type=drop_down,required=1,price=3.0000,price_type=fixed,sku=3-1-select,option_title=Option 1|name=New Select,type=drop_down,required=1,price=3.0000,price_type=fixed,sku=3-2-select,option_title=Option2|name=Test Date and Time Title,type=date_time,required=1,price=2.0000,price_type=fixed,sku=2-date|name=Test Field Title,type=field,required=1,price=0.0000,price_type=fixed,sku=1-text",,,,,, +simple_new,,Default,simple,,base,"New Product",,,,1,"Taxable Goods","Catalog, Search",10.0000,,,,new-product,"New Product","New Product","New Product ",,,,,,,"2015-10-20 07:05:38","2015-10-20 07:05:38",,,"Block after Info Column",,,,,,,,,,,,,"has_options=1,quantity_and_stock_status=In Stock,required_options=1",100.0000,0.0000,1,0,0,1,1.0000,1,10000.0000,1,1,1.0000,1,1,0,1,1.0000,0,0,0,1,,,,,,,"name=New Radio,type=radio,required=1,price=3.0000,price_type=fixed,sku=4-1-radio,option_title=Option 1|name=New Radio,type=radio,required=1,price=3.0000,price_type=fixed,sku=4-2-radio,option_title=Option 2|name=New Select,type=drop_down,required=1,price=3.0000,price_type=fixed,sku=3-1-select,option_title=Option 1|name=New Select,type=drop_down,required=1,price=3.0000,price_type=fixed,sku=3-2-select,option_title=Option2|name=Test Date and Time Title,type=date_time,required=1,price=2.0000,price_type=fixed,sku=2-date|name=Test Field Title,type=field,required=1,price=0.0000,price_type=fixed,sku=1-text,max_characters=10",,,,,, diff --git a/dev/tests/integration/testsuite/Magento/CatalogImportExport/_files/product_export_data.php b/dev/tests/integration/testsuite/Magento/CatalogImportExport/_files/product_export_data.php index 7e949966a08a6066c6c5c55675ab78a55e17e91a..a340e37e69ba962b0fc4f212ae121c0a25e87c99 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogImportExport/_files/product_export_data.php +++ b/dev/tests/integration/testsuite/Magento/CatalogImportExport/_files/product_export_data.php @@ -15,8 +15,8 @@ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $productModel = $objectManager->create('Magento\Catalog\Model\Product'); $customOptions = [ - 1 => [ - 'id' => '1', + [ + 'id' => 'test_option_code_1', 'option_id' => '0', 'sort_order' => '0', 'title' => 'Option 1', @@ -26,7 +26,17 @@ $customOptions = [ 1 => ['option_type_id' => -1, 'title' => 'Option 1 Value 1', 'price' => '1.00', 'price_type' => 'fixed'], 2 => ['option_type_id' => -1, 'title' => 'Option 1 Value 2', 'price' => '2.00', 'price_type' => 'fixed'] ] - ] + ], + [ + 'title' => 'test_option_code_2', + 'type' => 'field', + 'is_require' => true, + 'sort_order' => 1, + 'price' => 10.0, + 'price_type' => 'fixed', + 'sku' => 'sku1', + 'max_characters' => 10, + ], ]; $productModel->setTypeId( diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/ResourceModel/CustomerRepositoryTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/ResourceModel/CustomerRepositoryTest.php index c24fac5a1f4f8cd998c52c7ff4880af6c4deabbc..d2de41ae0b7fb9e2977b878152172a5efe00e45b 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Model/ResourceModel/CustomerRepositoryTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Model/ResourceModel/CustomerRepositoryTest.php @@ -50,6 +50,9 @@ class CustomerRepositoryTest extends \PHPUnit_Framework_TestCase $this->accountManagement = $this->objectManager->create('Magento\Customer\Api\AccountManagementInterface'); $this->converter = $this->objectManager->create('Magento\Framework\Api\ExtensibleDataObjectConverter'); $this->dataObjectHelper = $this->objectManager->create('Magento\Framework\Api\DataObjectHelper'); + /** @var \Magento\Framework\Config\CacheInterface $cache */ + $cache = $this->objectManager->create('Magento\Framework\Config\CacheInterface'); + $cache->remove('extension_attributes_config'); } protected function tearDown()