diff --git a/app/code/Magento/BundleImportExport/Model/Import/Product/Type/Bundle.php b/app/code/Magento/BundleImportExport/Model/Import/Product/Type/Bundle.php index e476ec7bde833..33bf810cd81e7 100644 --- a/app/code/Magento/BundleImportExport/Model/Import/Product/Type/Bundle.php +++ b/app/code/Magento/BundleImportExport/Model/Import/Product/Type/Bundle.php @@ -648,8 +648,13 @@ protected function _initAttributes() */ protected function deleteOptionsAndSelections($productIds) { + if (empty($productIds)) { + return $this; + } + $optionTable = $this->_resource->getTableName('catalog_product_bundle_option'); $optionValueTable = $this->_resource->getTableName('catalog_product_bundle_option_value'); + $selectionTable = $this->_resource->getTableName('catalog_product_bundle_selection'); $valuesIds = $this->connection->fetchAssoc($this->connection->select()->from( ['bov' => $optionValueTable], ['value_id'] @@ -662,17 +667,16 @@ protected function deleteOptionsAndSelections($productIds) $productIds )); $this->connection->delete( - $optionTable, + $optionValueTable, $this->connection->quoteInto('value_id IN (?)', array_keys($valuesIds)) ); - $productIdsInWhere = $this->connection->quoteInto('parent_id IN (?)', $productIds); $this->connection->delete( $optionTable, - $this->connection->quoteInto('parent_id IN (?)', $productIdsInWhere) + $this->connection->quoteInto('parent_id IN (?)', $productIds) ); $this->connection->delete( - $optionTable, - $this->connection->quoteInto('parent_product_id IN (?)', $productIdsInWhere) + $selectionTable, + $this->connection->quoteInto('parent_product_id IN (?)', $productIds) ); return $this; } diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Validate.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Validate.php index b41c67bb82e00..f14cb709c9ebb 100644 --- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Validate.php +++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Validate.php @@ -128,7 +128,7 @@ private function isUniqueAdminValues(array $optionsValues, array $deletedOptions } } $uniqueValues = array_unique($adminValues); - return ($uniqueValues === $adminValues); + return array_diff_assoc($adminValues, $uniqueValues); } /** @@ -157,10 +157,16 @@ private function checkUniqueOption(DataObject $response, array $options = null) if (is_array($options) && !empty($options['value']) && !empty($options['delete']) - && !$this->isUniqueAdminValues($options['value'], $options['delete']) ) { - $this->setMessageToResponse($response, [__("The value of Admin must be unique.")]); - $response->setError(true); + $duplicates = $this->isUniqueAdminValues($options['value'], $options['delete']); + if ($duplicates) { + $this->setMessageToResponse( + $response, + [__('The value of Admin must be unique. (%1)', implode(', ', $duplicates))] + ); + + $response->setError(true); + } } return $this; } diff --git a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media/ImageEntryConverter.php b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media/ImageEntryConverter.php index a8eff8d54a4c8..e8b619ac8bb84 100644 --- a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media/ImageEntryConverter.php +++ b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media/ImageEntryConverter.php @@ -100,16 +100,16 @@ public function convertFrom(ProductAttributeMediaGalleryEntryInterface $entry) protected function convertFromMediaGalleryEntryContentInterface( ImageContentInterface $content = null ) { - if ($content == null) { + if ($content === null) { return null; - } else { - return [ - 'data' => [ - ImageContentInterface::BASE64_ENCODED_DATA => $content->getBase64EncodedData(), - ImageContentInterface::TYPE => $content->getType(), - ImageContentInterface::NAME => $content->getName(), - ], - ]; } + + return [ + 'data' => [ + ImageContentInterface::BASE64_ENCODED_DATA => $content->getBase64EncodedData(), + ImageContentInterface::TYPE => $content->getType(), + ImageContentInterface::NAME => $content->getName(), + ], + ]; } } diff --git a/app/code/Magento/Catalog/i18n/en_US.csv b/app/code/Magento/Catalog/i18n/en_US.csv index 94b32f979383d..145ead923d61e 100644 --- a/app/code/Magento/Catalog/i18n/en_US.csv +++ b/app/code/Magento/Catalog/i18n/en_US.csv @@ -717,3 +717,4 @@ none,none Overview,Overview Details,Details "The value of Admin must be unique.", "The value of Admin must be unique." +"The value of Admin must be unique. (%1)", "The value of Admin must be unique. (%1)" diff --git a/app/code/Magento/Catalog/view/adminhtml/web/catalog/product/attribute/unique-validate.js b/app/code/Magento/Catalog/view/adminhtml/web/catalog/product/attribute/unique-validate.js index 034085df6cbb3..7fcd30fc49c63 100644 --- a/app/code/Magento/Catalog/view/adminhtml/web/catalog/product/attribute/unique-validate.js +++ b/app/code/Magento/Catalog/view/adminhtml/web/catalog/product/attribute/unique-validate.js @@ -10,11 +10,17 @@ define([ 'use strict'; return function (config) { - var _config = jQuery.extend({ - element: null, - message: '', - uniqueClass: 'required-unique' - }, config); + var msg = '', + _config = jQuery.extend({ + element: null, + message: '', + uniqueClass: 'required-unique' + }, config), + + /** @inheritdoc */ + messager = function () { + return msg; + }; if (typeof _config.element === 'string') { jQuery.validator.addMethod( @@ -25,21 +31,27 @@ define([ .closest('table') .find('.' + _config.uniqueClass + ':visible'), valuesHash = {}, - isValid = true; + isValid = true, + duplicates = []; inputs.each(function (el) { var inputValue = inputs[el].value; if (typeof valuesHash[inputValue] !== 'undefined') { isValid = false; + duplicates.push(inputValue); } valuesHash[inputValue] = el; }); + if (!isValid) { + msg = _config.message + ' (' + duplicates.join(', ') + ')'; + } + return isValid; }, - _config.message + messager ); } }; diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml index bdcfce204b185..928e00ffa466a 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml @@ -42,11 +42,10 @@ $_helper = $this->helper('Magento\Catalog\Helper\Output'); $pos = $block->getPositioned(); ?>
-
    - ' : '
  1. ' ?> +
  2. getImage($_product, $image); @@ -112,7 +111,7 @@ $_helper = $this->helper('Magento\Catalog\Helper\Output');
- ' : '' ?> + diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/list/items.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/list/items.phtml index 1b9f014b7c27f..aaa040c3a5833 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/list/items.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/list/items.phtml @@ -174,7 +174,6 @@ switch ($type = $block->getType()) {
    - isComposite() && $_item->isSaleable() && $type == 'related'): ?> @@ -183,9 +182,9 @@ switch ($type = $block->getType()) { - ' : '
  1. ' ?> +
  2. ' ?> @@ -252,7 +251,7 @@ switch ($type = $block->getType()) {
- ' : '' ?> + diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/listing.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/listing.phtml index 5f437cc484ed4..f2d5e40cca4e5 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/listing.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/listing.phtml @@ -38,61 +38,60 @@ $_helper = $this->helper('Magento\Catalog\Helper\Output'); } ?>
-
    - ' : '
  1. ' ?> -
    - - - getImage($_product, $image)->toHtml() ?> - -
    - +
    + + + getImage($_product, $image)->toHtml() ?> + +
    + ' - . ' ' - . $_helper->productAttribute($_product, $_product->getName(), 'name') - . ''; - $info['price'] = $block->getProductPrice($_product); - $info['review'] = $block->getReviewsSummaryHtml($_product, $templateType); + $info = []; + $info['name'] = '' + . ' ' + . $_helper->productAttribute($_product, $_product->getName(), 'name') + . ''; + $info['price'] = $block->getProductPrice($_product); + $info['review'] = $block->getReviewsSummaryHtml($_product, $templateType); - if ($_product->isSaleable()) { - $info['button'] = ''; - } else { - $info['button'] = $_product->getIsSalable() ? '
    ' . __('In stock') . '
    ' : - '
    ' . __('Out of stock') . '
    '; - } + if ($_product->isSaleable()) { + $info['button'] = ''; + } else { + $info['button'] = $_product->getIsSalable() ? '
    ' . __('In stock') . '
    ' : + '
    ' . __('Out of stock') . '
    '; + } - $info['links'] = ''; - $info['actions'] = '
    ' . $info['button'] . $info['links'] . '
    '; + $info['links'] = ''; + $info['actions'] = '
    ' . $info['button'] . $info['links'] . '
    '; - if ($showDescription) { - $info['description'] = '
    ' - . $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') - . ' ' - . __('Learn More') . '
    '; - } else { - $info['description'] = ''; - } + if ($showDescription) { + $info['description'] = '
    ' + . $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') + . ' ' + . __('Learn More') . '
    '; + } else { + $info['description'] = ''; + } - $details = $block->getInfoOrder() ?: ['name','price','review','description','actions']; - foreach ($details as $detail) { - /* @escapeNotVerified */ echo $info[$detail]; - } - ?> + $details = $block->getInfoOrder() ?: ['name','price','review','description','actions']; + foreach ($details as $detail) { + /* @escapeNotVerified */ echo $info[$detail]; + } + ?> +
    -
    - ' : '' ?> +
diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/column/new_default_list.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/column/new_default_list.phtml index 9f6576f61ee7f..a4ae3ba907988 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/column/new_default_list.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/column/new_default_list.phtml @@ -14,59 +14,58 @@
getNameInLayout(); ?> -
    getItems() as $_product): ?> - ' : '
  1. ' ?> -
    - - getImage($_product, 'side_column_widget_product_thumbnail')->toHtml() ?> - -
    - - - helper('Magento\Catalog\Helper\Output')->productAttribute($_product, $_product->getName(), 'name') ?> - - - getProductPriceHtml($_product, '-widget-new-' . $suffix) ?> -
    -
    - isSaleable()): ?> - getTypeInstance()->hasRequiredOptions($_product)): ?> - +
  2. +
    + + getImage($_product, 'side_column_widget_product_thumbnail')->toHtml() ?> + +
    + + + helper('Magento\Catalog\Helper\Output')->productAttribute($_product, $_product->getName(), 'name') ?> + + + getProductPriceHtml($_product, '-widget-new-' . $suffix) ?> +
    +
    + isSaleable()): ?> + getTypeInstance()->hasRequiredOptions($_product)): ?> + + + helper('Magento\Framework\Data\Helper\PostHelper'); + $postData = $postDataHelper->getPostData($block->getAddToCartUrl($_product), ['product' => $_product->getEntityId()]); + ?> + + - helper('Magento\Framework\Data\Helper\PostHelper'); - $postData = $postDataHelper->getPostData($block->getAddToCartUrl($_product), ['product' => $_product->getEntityId()]); - ?> - + getIsSalable()): ?> +
    + +
    + +
    + +
    + - - getIsSalable()): ?> -
    - -
    - -
    - -
    - - +
    -
- getItems())+1) ? '' : '' ?> + getPagerHtml() ?> diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/content/new_grid.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/content/new_grid.phtml index e600a571b5b30..11bbfea1ac8ec 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/content/new_grid.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/content/new_grid.phtml @@ -39,9 +39,8 @@ if ($exist = ($block->getProductCollection() && $block->getProductCollection()-> ' ?>
    - - ' : '
  1. ' ?> +
- ' : '' ?> + diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/content/new_list.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/content/new_list.phtml index c83140d9342ce..615cd13fb6d38 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/content/new_list.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/widget/new/content/new_list.phtml @@ -40,91 +40,90 @@ if ($exist = ($block->getProductCollection() && $block->getProductCollection()-> ' ?>
    - - ' : '
  1. ' ?> -
  2. +
    + + getImage($_item, $image)->toHtml() ?> + +
    + + + escapeHtml($_item->getName()) ?> + + + getProductPriceHtml($_item, $type) ?> - - getReviewsSummaryHtml($_item, $templateType) ?> - + + getReviewsSummaryHtml($_item, $templateType) ?> + - -
    - -
    - isSaleable()): ?> - getTypeInstance()->hasRequiredOptions($_item)): ?> - + +
    + +
    + isSaleable()): ?> + getTypeInstance()->hasRequiredOptions($_item)): ?> + + + helper('Magento\Framework\Data\Helper\PostHelper'); + $postData = $postDataHelper->getPostData($block->getAddToCartUrl($_item), ['product' => $_item->getEntityId()]) + ?> + + - helper('Magento\Framework\Data\Helper\PostHelper'); - $postData = $postDataHelper->getPostData($block->getAddToCartUrl($_item), ['product' => $_item->getEntityId()]) - ?> - + getIsSalable()): ?> +
    + +
    + - - getIsSalable()): ?> -
    - -
    +
    + + +
    + helper('Magento\Wishlist\Helper\Data')->isAllow() && $showWishlist): ?> + + + - -
    - - -
    - helper('Magento\Wishlist\Helper\Data')->isAllow() && $showWishlist): ?> - - - - - getAddToCompareUrl() && $showCompare): ?> - helper('Magento\Catalog\Helper\Product\Compare'); ?> - - - - -
    - -
    - - -
    - productAttribute($_item, $_item->getShortDescription(), 'short_description') ?> - -
    - + getAddToCompareUrl() && $showCompare): ?> + helper('Magento\Catalog\Helper\Product\Compare'); ?> + + + + +
    + +
    + + +
    + productAttribute($_item, $_item->getShortDescription(), 'short_description') ?> + +
    + +
    -
- ' : '' ?> + diff --git a/app/code/Magento/CatalogWidget/view/frontend/templates/product/widget/content/grid.phtml b/app/code/Magento/CatalogWidget/view/frontend/templates/product/widget/content/grid.phtml index 201d6ffe4c683..1eb9b25a9a451 100644 --- a/app/code/Magento/CatalogWidget/view/frontend/templates/product/widget/content/grid.phtml +++ b/app/code/Magento/CatalogWidget/view/frontend/templates/product/widget/content/grid.phtml @@ -33,78 +33,76 @@ ' ?>
    - -
  1. -
    - - getImage($_item, $image)->toHtml() ?> - -
    - - - escapeHtml($_item->getName()) ?> - - - getProductPriceHtml($_item, $type); - ?> +
    + + getImage($_item, $image)->toHtml() ?> + +
    + + + escapeHtml($_item->getName()) ?> + + + getProductPriceHtml($_item, $type); + ?> - - getReviewsSummaryHtml($_item, $templateType) ?> - + + getReviewsSummaryHtml($_item, $templateType) ?> + - -
    - -
    - isSaleable()): ?> - getTypeInstance()->hasRequiredOptions($_item)): ?> - + +
    + +
    + isSaleable()): ?> + getTypeInstance()->hasRequiredOptions($_item)): ?> + + + helper('Magento\Framework\Data\Helper\PostHelper'); + $postData = $postDataHelper->getPostData($block->getAddToCartUrl($_item), ['product' => $_item->getEntityId()]) + ?> + + - helper('Magento\Framework\Data\Helper\PostHelper'); - $postData = $postDataHelper->getPostData($block->getAddToCartUrl($_item), ['product' => $_item->getEntityId()]) - ?> - + getIsSalable()): ?> +
    escapeHtml(__('In stock')) ?>
    + +
    escapeHtml(__('Out of stock')) ?>
    + - - getIsSalable()): ?> -
    escapeHtml(__('In stock')) ?>
    - -
    escapeHtml(__('Out of stock')) ?>
    +
    + + +
    + helper('Magento\Wishlist\Helper\Data')->isAllow() && $showWishlist): ?> + + escapeHtml(__('Add to Wish List')) ?> + + + getAddToCompareUrl() && $showCompare): ?> + helper('Magento\Catalog\Helper\Product\Compare');?> + + escapeHtml(__('Add to Compare')) ?> + - -
    - - -
    - helper('Magento\Wishlist\Helper\Data')->isAllow() && $showWishlist): ?> - - escapeHtml(__('Add to Wish List')) ?> - - - getAddToCompareUrl() && $showCompare): ?> - helper('Magento\Catalog\Helper\Product\Compare');?> - - escapeHtml(__('Add to Compare')) ?> - - -
    - -
    - +
    + +
    + +
    -
    - ' : '' ?> +
diff --git a/app/code/Magento/Checkout/view/frontend/web/js/model/shipping-save-processor/default.js b/app/code/Magento/Checkout/view/frontend/web/js/model/shipping-save-processor/default.js index b2a273513181d..a477856235768 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/model/shipping-save-processor/default.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/model/shipping-save-processor/default.js @@ -33,7 +33,7 @@ define([ saveShippingInformation: function () { var payload; - if (!quote.billingAddress()) { + if (!quote.billingAddress() && quote.shippingAddress().canUseForBilling()) { selectBillingAddressAction(quote.shippingAddress()); } diff --git a/app/code/Magento/Config/Model/Config/Backend/File.php b/app/code/Magento/Config/Model/Config/Backend/File.php index 548239488efc7..f867c2edaccc7 100644 --- a/app/code/Magento/Config/Model/Config/Backend/File.php +++ b/app/code/Magento/Config/Model/Config/Backend/File.php @@ -110,6 +110,8 @@ public function beforeSave() } else { if (is_array($value) && !empty($value['delete'])) { $this->setValue(''); + } elseif (is_array($value) && !empty($value['value'])) { + $this->setValue($value['value']); } else { $this->unsValue(); } diff --git a/app/code/Magento/Reports/Model/ResourceModel/Product/Sold/Collection.php b/app/code/Magento/Reports/Model/ResourceModel/Product/Sold/Collection.php index 96a6e1b6cfe40..ba9ace8badb39 100644 --- a/app/code/Magento/Reports/Model/ResourceModel/Product/Sold/Collection.php +++ b/app/code/Magento/Reports/Model/ResourceModel/Product/Sold/Collection.php @@ -64,17 +64,19 @@ public function addOrderedQty($from = '', $to = '') $this->getSelect()->reset()->from( ['order_items' => $this->getTable('sales_order_item')], - ['ordered_qty' => 'SUM(order_items.qty_ordered)', 'order_items_name' => 'order_items.name'] + [ + 'ordered_qty' => 'order_items.qty_ordered', + 'order_items_name' => 'order_items.name', + 'order_items_sku' => 'order_items.sku' + ] )->joinInner( ['order' => $this->getTable('sales_order')], implode(' AND ', $orderJoinCondition), [] )->where( - 'parent_item_id IS NULL' - )->group( - 'order_items.product_id' + 'order_items.parent_item_id IS NULL' )->having( - 'SUM(order_items.qty_ordered) > ?', + 'order_items.qty_ordered > ?', 0 ); return $this; diff --git a/app/code/Magento/Reports/view/adminhtml/layout/reports_report_product_sold_grid.xml b/app/code/Magento/Reports/view/adminhtml/layout/reports_report_product_sold_grid.xml index 1748a1a378c6f..de82b724e8cf0 100644 --- a/app/code/Magento/Reports/view/adminhtml/layout/reports_report_product_sold_grid.xml +++ b/app/code/Magento/Reports/view/adminhtml/layout/reports_report_product_sold_grid.xml @@ -41,6 +41,16 @@ col-product + + + SKU + text + order_items_sku + sku + col-sku + col-sku + + Ordered Quantity diff --git a/app/code/Magento/Reports/view/frontend/templates/widget/compared/column/compared_default_list.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/compared/column/compared_default_list.phtml index 999452ebb7cbd..56368aa0e7fed 100644 --- a/app/code/Magento/Reports/view/frontend/templates/widget/compared/column/compared_default_list.phtml +++ b/app/code/Magento/Reports/view/frontend/templates/widget/compared/column/compared_default_list.phtml @@ -33,61 +33,60 @@ if ($exist = $block->getRecentlyComparedProducts()) {
getNameInLayout(); ?>
    - - ' : '
  1. ' ?> -
    - - getImage($_product, $image)->toHtml() ?> - -
    - - - helper('Magento\Catalog\Helper\Output')->productAttribute($_product, $_product->getName(), 'name') ?> - - - getProductPriceHtml( - $_product, - \Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE, - \Magento\Framework\Pricing\Render::ZONE_ITEM_LIST, - [ - 'price_id_suffix' => '-widget-compared-' . $suffix - ] - ) ?> -
    - isSaleable()): ?> -
    - getTypeInstance()->hasRequiredOptions($_product)): ?> - +
  2. +
    + + getImage($_product, $image)->toHtml() ?> + +
    + + + helper('Magento\Catalog\Helper\Output')->productAttribute($_product, $_product->getName(), 'name') ?> + + + getProductPriceHtml( + $_product, + \Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE, + \Magento\Framework\Pricing\Render::ZONE_ITEM_LIST, + [ + 'price_id_suffix' => '-widget-compared-' . $suffix + ] + ) ?> +
    + isSaleable()): ?> +
    + getTypeInstance()->hasRequiredOptions($_product)): ?> + + + helper('Magento\Framework\Data\Helper\PostHelper'); + $postData = $postDataHelper->getPostData($block->getAddToCartUrl($_product), ['product' => $_product->getEntityId()]) + ?> + + +
    - helper('Magento\Framework\Data\Helper\PostHelper'); - $postData = $postDataHelper->getPostData($block->getAddToCartUrl($_product), ['product' => $_product->getEntityId()]) - ?> - + getIsSalable()): ?> +
    + +
    +
    - - getIsSalable()): ?> -
    - -
    - -
    -
- ' : '' ?> + diff --git a/app/code/Magento/Reports/view/frontend/templates/widget/compared/content/compared_grid.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/compared/content/compared_grid.phtml index f56448b11db0f..d798fe9e58127 100644 --- a/app/code/Magento/Reports/view/frontend/templates/widget/compared/content/compared_grid.phtml +++ b/app/code/Magento/Reports/view/frontend/templates/widget/compared/content/compared_grid.phtml @@ -37,89 +37,88 @@ if ($exist = $block->getRecentlyComparedProducts()) { ' ?>
    - - ' : '
  1. ' ?> -
    - - getImage($_item, $image)->toHtml() ?> - -
    - - - escapeHtml($_item->getName()) ?> - - - getProductPriceHtml( - $_item, - \Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE, - \Magento\Framework\Pricing\Render::ZONE_ITEM_LIST, - [ - 'price_id_suffix' => '-' . $type - ] - ) ?> - - getReviewsSummaryHtml($_item, $rating) ?> - - -
    - -
    - isSaleable()): ?> - getTypeInstance()->hasRequiredOptions($_item)): ?> - +
  2. +
    + + getImage($_item, $image)->toHtml() ?> + +
    + + + escapeHtml($_item->getName()) ?> + + + getProductPriceHtml( + $_item, + \Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE, + \Magento\Framework\Pricing\Render::ZONE_ITEM_LIST, + [ + 'price_id_suffix' => '-' . $type + ] + ) ?> + + getReviewsSummaryHtml($_item, $rating) ?> + + +
    + +
    + isSaleable()): ?> + getTypeInstance()->hasRequiredOptions($_item)): ?> + + + helper('Magento\Framework\Data\Helper\PostHelper'); + $postData = $postDataHelper->getPostData($block->getAddToCartUrl($_item), ['product' => $_item->getEntityId()]) + ?> + + - helper('Magento\Framework\Data\Helper\PostHelper'); - $postData = $postDataHelper->getPostData($block->getAddToCartUrl($_item), ['product' => $_item->getEntityId()]) - ?> - + getIsSalable()): ?> +
    + +
    + - - getIsSalable()): ?> -
    - -
    - - -
    - +
    + - -
    - helper('Magento\Wishlist\Helper\Data')->isAllow() && $showWishlist): ?> - - - - - getAddToCompareUrl() && $showCompare): ?> - helper('Magento\Catalog\Helper\Product\Compare'); ?> - - - - -
    - -
    - + +
    + helper('Magento\Wishlist\Helper\Data')->isAllow() && $showWishlist): ?> + + + + + getAddToCompareUrl() && $showCompare): ?> + helper('Magento\Catalog\Helper\Product\Compare'); ?> + + + + +
    + +
    + +
- - ' : '' ?> + diff --git a/app/code/Magento/Reports/view/frontend/templates/widget/compared/content/compared_list.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/compared/content/compared_list.phtml index 48463f3baaa5c..be1c7672a128a 100644 --- a/app/code/Magento/Reports/view/frontend/templates/widget/compared/content/compared_list.phtml +++ b/app/code/Magento/Reports/view/frontend/templates/widget/compared/content/compared_list.phtml @@ -38,97 +38,96 @@ if ($exist = $block->getRecentlyComparedProducts()) { ' ?>
    - - ' : '
  1. ' ?> -
    - - getImage($_item, $image)->toHtml() ?> - -
    - - - escapeHtml($_item->getName()) ?> - - - getProductPriceHtml( - $_item, - \Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE, - \Magento\Framework\Pricing\Render::ZONE_ITEM_LIST, - [ - 'price_id_suffix' => '-' . $type - ] - ) ?> - - getReviewsSummaryHtml($_item, $rating) ?> - - -
    - -
    - isSaleable()): ?> - getTypeInstance()->hasRequiredOptions($_item)): ?> - - - helper('Magento\Framework\Data\Helper\PostHelper'); - $postData = $postDataHelper->getPostData($block->getAddToCartUrl($_item), ['product' => $_item->getEntityId()]) - ?> - - - - getIsSalable()): ?> -
    +
  2. +
    + + getImage($_item, $image)->toHtml() ?> + +
    + + + escapeHtml($_item->getName()) ?> + + + getProductPriceHtml( + $_item, + \Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE, + \Magento\Framework\Pricing\Render::ZONE_ITEM_LIST, + [ + 'price_id_suffix' => '-' . $type + ] + ) ?> + + getReviewsSummaryHtml($_item, $rating) ?> + + +
    + +
    + isSaleable()): ?> + getTypeInstance()->hasRequiredOptions($_item)): ?> + + + helper('Magento\Framework\Data\Helper\PostHelper'); + $postData = $postDataHelper->getPostData($block->getAddToCartUrl($_item), ['product' => $_item->getEntityId()]) + ?> + + -
    + getIsSalable()): ?> +
    + +
    + - -
    - +
    + - -
    - helper('Magento\Wishlist\Helper\Data')->isAllow() && $showWishlist): ?> - - - - - getAddToCompareUrl() && $showCompare): ?> - helper('Magento\Catalog\Helper\Product\Compare');?> - - - - -
    - -
    - - -
    - productAttribute($_item, $_item->getShortDescription(), 'short_description') ?> - -
    - + +
    + helper('Magento\Wishlist\Helper\Data')->isAllow() && $showWishlist): ?> + + + + + getAddToCompareUrl() && $showCompare): ?> + helper('Magento\Catalog\Helper\Product\Compare');?> + + + + +
    + +
    + + +
    + productAttribute($_item, $_item->getShortDescription(), 'short_description') ?> + +
    + +
- - ' : '' ?> + diff --git a/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_default_list.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_default_list.phtml index e26dc7ea31761..aa7d5a7166a6a 100644 --- a/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_default_list.phtml +++ b/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_default_list.phtml @@ -38,60 +38,59 @@ if ($exist = ($block->getRecentlyViewedProducts() && $block->getRecentlyViewedPr
getNameInLayout(); ?>
    - - ' : '
  1. ' ?> -
    - - getImage($_product, $image)->toHtml() ?> - -
    - - - helper('Magento\Catalog\Helper\Output')->productAttribute($_product, $_product->getName(), 'name') ?> - - - getProductPriceHtml( - $_product, - \Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE, - \Magento\Framework\Pricing\Render::ZONE_ITEM_LIST, - [ - 'price_id_suffix' => '-widget-viewed-' . $suffix - ] - ) ?> -
    - isSaleable()): ?> -
    - getTypeInstance()->hasRequiredOptions($_product)): ?> - +
  2. +
    + + getImage($_product, $image)->toHtml() ?> + +
    + + + helper('Magento\Catalog\Helper\Output')->productAttribute($_product, $_product->getName(), 'name') ?> + + + getProductPriceHtml( + $_product, + \Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE, + \Magento\Framework\Pricing\Render::ZONE_ITEM_LIST, + [ + 'price_id_suffix' => '-widget-viewed-' . $suffix + ] + ) ?> +
    + isSaleable()): ?> +
    + getTypeInstance()->hasRequiredOptions($_product)): ?> + + + helper('Magento\Framework\Data\Helper\PostHelper'); + $postData = $postDataHelper->getPostData($block->getAddToCartUrl($_product), ['product' => $_product->getEntityId()]); + ?> + + +
    - helper('Magento\Framework\Data\Helper\PostHelper'); - $postData = $postDataHelper->getPostData($block->getAddToCartUrl($_product), ['product' => $_product->getEntityId()]); - ?> - + getIsSalable()): ?> +
    + +
    +
    - - getIsSalable()): ?> -
    - -
    - -
    -
- ' : '' ?> + diff --git a/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_images_list.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_images_list.phtml index 8a1daebda3049..86f7b4db3da23 100644 --- a/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_images_list.phtml +++ b/app/code/Magento/Reports/view/frontend/templates/widget/viewed/column/viewed_images_list.phtml @@ -35,14 +35,13 @@ if ($exist = ($block->getRecentlyViewedProducts() && $block->getRecentlyViewedPr
getNameInLayout(); ?>
    - - ' : '
  1. ' ?> +
  2. getImage($_product, $image)->toHtml() ?> - ' : '' ?> - +
  3. +
diff --git a/app/code/Magento/Reports/view/frontend/templates/widget/viewed/content/viewed_grid.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/viewed/content/viewed_grid.phtml index de1145a26fe2b..a1d41ada04a5a 100644 --- a/app/code/Magento/Reports/view/frontend/templates/widget/viewed/content/viewed_grid.phtml +++ b/app/code/Magento/Reports/view/frontend/templates/widget/viewed/content/viewed_grid.phtml @@ -39,87 +39,86 @@ if ($exist = ($block->getRecentlyViewedProducts() && $block->getRecentlyViewedPr ' ?>
    - - ' : '
  1. ' ?> -
    - - getImage($_item, $image)->toHtml() ?> - -
    - - - escapeHtml($_item->getName()) ?> - - - getProductPriceHtml( - $_item, - \Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE, - \Magento\Framework\Pricing\Render::ZONE_ITEM_LIST, - [ - 'price_id_suffix' => '-' . $type - ] - ) ?> - - getReviewsSummaryHtml($_item, $rating) ?> - - -
    - -
    - isSaleable()): ?> - getTypeInstance()->hasRequiredOptions($_item)): ?> - +
  2. +
    + + getImage($_item, $image)->toHtml() ?> + +
    + + + escapeHtml($_item->getName()) ?> + + + getProductPriceHtml( + $_item, + \Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE, + \Magento\Framework\Pricing\Render::ZONE_ITEM_LIST, + [ + 'price_id_suffix' => '-' . $type + ] + ) ?> + + getReviewsSummaryHtml($_item, $rating) ?> + + +
    + +
    + isSaleable()): ?> + getTypeInstance()->hasRequiredOptions($_item)): ?> + + + helper('Magento\Framework\Data\Helper\PostHelper'); + $postData = $postDataHelper->getPostData($block->getAddToCartUrl($_item), ['product' => $_item->getEntityId()]) + ?> + + - helper('Magento\Framework\Data\Helper\PostHelper'); - $postData = $postDataHelper->getPostData($block->getAddToCartUrl($_item), ['product' => $_item->getEntityId()]) - ?> - + getIsSalable()): ?> +
    + +
    + - - getIsSalable()): ?> -
    - -
    +
    + + +
    + helper('Magento\Wishlist\Helper\Data')->isAllow() && $showWishlist): ?> + + + + + getAddToCompareUrl() && $showCompare): ?> + helper('Magento\Catalog\Helper\Product\Compare');?> + + + - -
    - - -
    - helper('Magento\Wishlist\Helper\Data')->isAllow() && $showWishlist): ?> - - - - - getAddToCompareUrl() && $showCompare): ?> - helper('Magento\Catalog\Helper\Product\Compare');?> - - - - -
    - -
    - +
    + +
    + +
- - ' : '' ?> + diff --git a/app/code/Magento/Reports/view/frontend/templates/widget/viewed/content/viewed_list.phtml b/app/code/Magento/Reports/view/frontend/templates/widget/viewed/content/viewed_list.phtml index 076c715dc4049..c9cff81d30a53 100644 --- a/app/code/Magento/Reports/view/frontend/templates/widget/viewed/content/viewed_list.phtml +++ b/app/code/Magento/Reports/view/frontend/templates/widget/viewed/content/viewed_list.phtml @@ -41,96 +41,95 @@ if ($exist = ($block->getRecentlyViewedProducts() && $block->getRecentlyViewedPr ' ?>
    - - ' : '
  1. ' ?> -
    - - getImage($_item, $image)->toHtml() ?> - -
    - - - escapeHtml($_item->getName()) ?> - - - getProductPriceHtml( - $_item, - \Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE, - \Magento\Framework\Pricing\Render::ZONE_ITEM_LIST, - [ - 'price_id_suffix' => '-' . $type - ] - ) ?> - - getReviewsSummaryHtml($_item, $rating) ?> - - -
    - -
    - isSaleable()): ?> - getTypeInstance()->hasRequiredOptions($_item)): ?> - +
  2. +
    + + getImage($_item, $image)->toHtml() ?> + +
    + + + escapeHtml($_item->getName()) ?> + + + getProductPriceHtml( + $_item, + \Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE, + \Magento\Framework\Pricing\Render::ZONE_ITEM_LIST, + [ + 'price_id_suffix' => '-' . $type + ] + ) ?> + + getReviewsSummaryHtml($_item, $rating) ?> + + +
    + +
    + isSaleable()): ?> + getTypeInstance()->hasRequiredOptions($_item)): ?> + + + helper('Magento\Framework\Data\Helper\PostHelper'); + $postData = $postDataHelper->getPostData($block->getAddToCartUrl($_item), ['product' => $_item->getEntityId()]); + ?> + + - helper('Magento\Framework\Data\Helper\PostHelper'); - $postData = $postDataHelper->getPostData($block->getAddToCartUrl($_item), ['product' => $_item->getEntityId()]); - ?> - + getIsSalable()): ?> +
    + +
    - - getIsSalable()): ?> -
    - -
    - -
    - +
    + - -
    - helper('Magento\Wishlist\Helper\Data')->isAllow() && $showWishlist): ?> - - - - - getAddToCompareUrl() && $showCompare): ?> - helper('Magento\Catalog\Helper\Product\Compare');?> - - - - -
    - -
    - - -
    - productAttribute($_item, $_item->getShortDescription(), 'short_description') ?> - -
    - + +
    + helper('Magento\Wishlist\Helper\Data')->isAllow() && $showWishlist): ?> + + + + + getAddToCompareUrl() && $showCompare): ?> + helper('Magento\Catalog\Helper\Product\Compare');?> + + + + +
    + +
    + + +
    + productAttribute($_item, $_item->getShortDescription(), 'short_description') ?> + +
    + +
- - ' : '' ?> + diff --git a/app/code/Magento/Review/Block/Product/ReviewRenderer.php b/app/code/Magento/Review/Block/Product/ReviewRenderer.php index f60b33bffb8cb..8aa10d2437cbb 100644 --- a/app/code/Magento/Review/Block/Product/ReviewRenderer.php +++ b/app/code/Magento/Review/Block/Product/ReviewRenderer.php @@ -57,6 +57,10 @@ public function getReviewsSummaryHtml( $templateType = self::DEFAULT_VIEW, $displayIfNoReviews = false ) { + if (!$product->getRatingSummary()) { + $this->_reviewFactory->create()->getEntitySummary($product, $this->_storeManager->getStore()->getId()); + } + if (!$product->getRatingSummary() && !$displayIfNoReviews) { return ''; } @@ -68,9 +72,6 @@ public function getReviewsSummaryHtml( $this->setDisplayIfEmpty($displayIfNoReviews); - if (!$product->getRatingSummary()) { - $this->_reviewFactory->create()->getEntitySummary($product, $this->_storeManager->getStore()->getId()); - } $this->setProduct($product); return $this->toHtml(); diff --git a/app/code/Magento/Swatches/i18n/en_US.csv b/app/code/Magento/Swatches/i18n/en_US.csv index 98787122894d7..76e87a9ef2443 100644 --- a/app/code/Magento/Swatches/i18n/en_US.csv +++ b/app/code/Magento/Swatches/i18n/en_US.csv @@ -34,4 +34,5 @@ Image,Image "Example format: 200x300.","Example format: 200x300." "Image Position","Image Position" "The value of Admin must be unique.","The value of Admin must be unique." +"The value of Admin must be unique. (%1)","The value of Admin must be unique. (%1)" Description,Description diff --git a/app/code/Magento/Wishlist/view/frontend/templates/item/list.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/list.phtml index eb3d9e58ecfc9..c2172afab94de 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/item/list.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/item/list.phtml @@ -13,17 +13,16 @@ $columns = $block->getColumns(); ?>
- getItems())): ?>
    getItems() as $item): ?> - escapeHtmlAttr($item->getId()) . '">' : '
  1. ' ?> -
    - - setItem($item); echo $column->toHtml($item);?> - -
    - getItems())+1) ? '
  2. ' : '' ?> +
  3. +
    + + setItem($item); echo $column->toHtml($item);?> + +
    +
diff --git a/phpserver/router.php b/phpserver/router.php index 9bee31e870697..3cfba0de463f7 100644 --- a/phpserver/router.php +++ b/phpserver/router.php @@ -61,6 +61,14 @@ } $debug($route); + + if (strpos($route, 'static/version') === 0) { + $redirectRoute = preg_replace("/version\d+\//", "", $route, 1); + $redirectDebugInfo = "redirect static version string to: " . $redirectRoute; + $debug($redirectDebugInfo); + header('Location: /' . $redirectRoute); + exit; + } if (strpos($route, 'media/') === 0 || strpos($route, 'opt/') === 0 ||