Skip to content

Commit 5fdfe12

Browse files
author
Valeriy Nayda
committed
MAGETWO-60014: [Performance] Caching of swatches data in block cache
1 parent c80d266 commit 5fdfe12

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
@@ -391,7 +391,6 @@ protected function getConfigurableOptionsIds(array $attributeData)
391391
/**
392392
* Produce and return block's html output
393393
*
394-
* @codeCoverageIgnore
395394
* @return string
396395
*/
397396
public function toHtml()
@@ -406,7 +405,6 @@ public function toHtml()
406405
/**
407406
* Return HTML code
408407
*
409-
* @codeCoverageIgnore
410408
* @return string
411409
*/
412410
protected function _toHtml()
@@ -428,7 +426,7 @@ protected function getRendererTemplate()
428426
}
429427

430428
/**
431-
* @codeCoverageIgnore
429+
* @deprecated Now is used _toHtml() directly
432430
* @return string
433431
*/
434432
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
@@ -19,13 +19,17 @@ protected function getRendererTemplate()
1919
}
2020

2121
/**
22+
* Render block hook
23+
*
24+
* Produce and return block's html output
25+
*
2226
* @return string
2327
*/
24-
protected function getHtmlOutput()
28+
protected function _toHtml()
2529
{
2630
$output = '';
2731
if ($this->isProductHasSwatchAttribute()) {
28-
$output = parent::getHtmlOutput();
32+
$output = parent::_toHtml();
2933
}
3034

3135
return $output;

0 commit comments

Comments
 (0)