Skip to content

Commit 4c9ecee

Browse files
committed
MAGETWO-60014: [Performance] Caching of swatches data in block cache
2 parents 67ec6f9 + 5fdfe12 commit 4c9ecee

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

app/code/Magento/Swatches/Block/Product/Renderer/Configurable.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,6 @@ protected function getConfigurableOptionsIds(array $attributeData)
392392
/**
393393
* Produce and return block's html output
394394
*
395-
* @codeCoverageIgnore
396395
* @return string
397396
*/
398397
public function toHtml()
@@ -407,7 +406,6 @@ public function toHtml()
407406
/**
408407
* Return HTML code
409408
*
410-
* @codeCoverageIgnore
411409
* @return string
412410
*/
413411
protected function _toHtml()
@@ -429,7 +427,7 @@ protected function getRendererTemplate()
429427
}
430428

431429
/**
432-
* @codeCoverageIgnore
430+
* @deprecated Now is used _toHtml() directly
433431
* @return string
434432
*/
435433
protected function getHtmlOutput()

app/code/Magento/Swatches/Block/Product/Renderer/Listing/Configurable.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,17 @@ protected function getRendererTemplate()
2121
}
2222

2323
/**
24+
* Render block hook
25+
*
26+
* Produce and return block's html output
27+
*
2428
* @return string
2529
*/
26-
protected function getHtmlOutput()
30+
protected function _toHtml()
2731
{
2832
$output = '';
2933
if ($this->isProductHasSwatchAttribute()) {
30-
$output = parent::getHtmlOutput();
34+
$output = parent::_toHtml();
3135
}
3236

3337
return $output;

0 commit comments

Comments
 (0)