File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
Catalog/Test/Unit/Pricing/Render
Swatches/view/frontend/templates/product/listing Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -246,7 +246,8 @@ public function testRenderMsrpEnabled()
246246
247247 //assert price wrapper
248248 $ this ->assertEquals (
249- '<div class="price-box price-final_price" data-role="priceBox" data-product-id="" data-price-box="product-id-">test</div> ' ,
249+ '<div class="price-box price-final_price" data-role="priceBox" data-product-id="" ' .
250+ 'data-price-box="product-id-">test</div> ' ,
250251 $ result
251252 );
252253 }
Original file line number Diff line number Diff line change 44 * See COPYING.txt for license details.
55 */
66?>
7- <?php /** @var $block \Magento\Swatches\Block\Product\Renderer\Listing\Configurable */ ?>
8- <div class="swatch-opt-<?= /* @escapeNotVerified */ $ block ->getProduct ()->getId () ?> " data-role="swatch-option-<?= /* @escapeNotVerified */ $ block ->getProduct ()->getId () ?> "></div>
7+ <?php
8+ /** @var $block \Magento\Swatches\Block\Product\Renderer\Listing\Configurable */
9+ $ productId = $ block ->getProduct ()->getId ();
10+ ?>
11+ <div class="swatch-opt-<?= /* @escapeNotVerified */ $ productId ?> " data-role="swatch-option-<?= /* @escapeNotVerified */ $ productId ?> "></div>
912
1013<script type="text/x-magento-init">
1114 {
12- "[data-role=swatch-option-<?= /* @escapeNotVerified */ $ block -> getProduct ()-> getId () ?> ]": {
15+ "[data-role=swatch-option-<?= /* @escapeNotVerified */ $ productId ?> ]": {
1316 "Magento_Swatches/js/swatch-renderer": {
1417 "selectorProduct": ".product-item-details",
1518 "onlySwatches": true,
2528
2629<script type="text/x-magento-init">
2730 {
28- "[data-role=priceBox][data-price-box=product-id-<?= /* @escapeNotVerified */ $ block -> escapeHtml ( $ block -> getProduct ()-> getId ()) ?> ]": {
31+ "[data-role=priceBox][data-price-box=product-id-<?= /* @escapeNotVerified */ $ productId ?> ]": {
2932 "priceBox": {
3033 "priceConfig": {
3134 "priceFormat": <?= /* @escapeNotVerified */ $ block ->getPriceFormatJson (); ?> ,
You can’t perform that action at this time.
0 commit comments