Skip to content

Commit

Permalink
magento#19184: Static test fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
p-bystritsky committed Apr 26, 2019
1 parent dfaee8e commit 6ce2026
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ public function getJsonSwatchConfig()

/**
* Get number of swatches from config to show on product listing.
*
* Other swatches can be shown after click button 'Show more'
*
* @return string
Expand Down Expand Up @@ -231,6 +232,8 @@ public function getProduct()
}

/**
* Get swatch attributes data.
*
* @return array
*/
protected function getSwatchAttributesData()
Expand All @@ -239,6 +242,8 @@ protected function getSwatchAttributesData()
}

/**
* Init isProductHasSwatchAttribute.
*
* @deprecated 100.1.5 Method isProductHasSwatchAttribute() is used instead of this.
*
* @codeCoverageIgnore
Expand Down Expand Up @@ -367,6 +372,8 @@ protected function getVariationMedia($attributeCode, $optionId)
}

/**
* Get swatch product image.
*
* @param Product $childProduct
* @param string $imageType
* @return string
Expand All @@ -387,6 +394,8 @@ protected function getSwatchProductImage(Product $childProduct, $imageType)
}

/**
* Check if product have image.
*
* @param Product $product
* @param string $imageType
* @return bool
Expand All @@ -397,6 +406,8 @@ protected function isProductHasImage(Product $product, $imageType)
}

/**
* Get configurable options ids.
*
* @param array $attributeData
* @return array
* @since 100.0.3
Expand Down Expand Up @@ -456,15 +467,17 @@ protected function getRendererTemplate()
}

/**
* @inheritDoc
* @deprecated 100.1.5 Now is used _toHtml() directly
* @return string
*/
protected function getHtmlOutput()
{
return parent::_toHtml();
}

/**
* Get media callback url.
*
* @return string
*/
public function getMediaCallback()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -753,9 +753,9 @@ define([
$widget.options.jsonConfig.optionPrices
]);

const checkAdditionalData = JSON.parse(this.options.jsonSwatchConfig[attributeId].additional_data);
var checkAdditionalData = JSON.parse(this.options.jsonSwatchConfig[attributeId]['additional_data']);

if (checkAdditionalData.update_product_preview_image == 1) {
if (1 == checkAdditionalData['update_product_preview_image']) {
$widget._loadMedia();
}

Expand Down

0 comments on commit 6ce2026

Please sign in to comment.