Skip to content

Commit c683dde

Browse files
committed
MAGETWO-96118: Few optimizations on category & product pages
1 parent b1c944b commit c683dde

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

app/code/Magento/Catalog/etc/db_schema.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@
835835
<index referenceId="CATALOG_PRODUCT_ENTITY_MEDIA_GALLERY_VALUE_VALUE_ID" indexType="btree">
836836
<column name="value_id"/>
837837
</index>
838-
<index referenceId="CATALOG_PRODUCT_ENTITY_MEDIA_GALLERY_VALUE_ENTITY_ID_VALUE_ID_STORE_ID" indexType="btree">
838+
<index referenceId="CAT_PRD_ENTT_MDA_GLR_VAL_ENTT_ID_VAL_ID_STORE_ID" indexType="btree">
839839
<column name="entity_id"/>
840840
<column name="value_id"/>
841841
<column name="store_id"/>

app/code/Magento/Catalog/etc/db_schema_whitelist.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@
485485
"CATALOG_PRODUCT_ENTITY_MEDIA_GALLERY_VALUE_STORE_ID": true,
486486
"CATALOG_PRODUCT_ENTITY_MEDIA_GALLERY_VALUE_ENTITY_ID": true,
487487
"CATALOG_PRODUCT_ENTITY_MEDIA_GALLERY_VALUE_VALUE_ID": true,
488-
"CATALOG_PRODUCT_ENTITY_MEDIA_GALLERY_VALUE_ENTITY_ID_VALUE_ID_STORE_ID": true
488+
"CAT_PRD_ENTT_MDA_GLR_VAL_ENTT_ID_VAL_ID_STORE_ID": true
489489
},
490490
"constraint": {
491491
"PRIMARY": true,

dev/tests/integration/testsuite/Magento/ConfigurableProduct/Model/Product/Type/ConfigurableTest.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
* See COPYING.txt for license details.
55
*/
66

7+
// @codingStandardsIgnoreFile
8+
79
namespace Magento\ConfigurableProduct\Model\Product\Type;
810

911
use Magento\Catalog\Api\Data\ProductInterface;
@@ -128,6 +130,10 @@ public function testGetUsedProductAttributes()
128130
$this->assertEquals($testConfigurable->getData(), $attributes[$attributeId]->getData());
129131
}
130132

133+
/**
134+
* @magentoAppIsolation enabled
135+
* @magentoDataFixture Magento/ConfigurableProduct/_files/product_configurable.php
136+
*/
131137
public function testGetConfigurableAttributes()
132138
{
133139
$collection = $this->model->getConfigurableAttributes($this->product);
@@ -332,8 +338,7 @@ public function testGetSelectedAttributesInfo()
332338
$attribute = reset($attributes);
333339
$optionValueId = $attribute['values'][0]['value_index'];
334340

335-
$product->addCustomOption(
336-
'attributes',
341+
$product->addCustomOption('attributes',
337342
$serializer->serialize([$attribute['attribute_id'] => $optionValueId])
338343
);
339344

lib/internal/Magento/Framework/Interception/PluginList/PluginList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ public function getPlugin($type, $code)
264264
public function getNext($type, $method, $code = '__self')
265265
{
266266
$this->_loadScopedData();
267-
if (!isset($this->_inherited[$type]) && !array_key_exists($type, $this->_inherited)) {
267+
if ($this->_inherited !== null && !isset($this->_inherited[$type]) && !array_key_exists($type, $this->_inherited)) {
268268
$this->_inheritPlugins($type);
269269
}
270270
$key = $type . '_' . lcfirst($method) . '_' . $code;

0 commit comments

Comments
 (0)