Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-swatches
view
frontend
templates
product
view
renderer.phtml
Go to the documentation of this file.
1
<?php
6
// @codingStandardsIgnoreFile
7
//"swatchRenderer": {
8
?>
9
<?php ?>
10
<div
class
=
"swatch-opt"
data-role=
"swatch-options"
></div>
11
12
<script type=
"text/x-magento-init"
>
13
{
14
"[data-role=swatch-options]"
: {
15
"Magento_Swatches/js/swatch-renderer"
: {
16
"jsonConfig"
: <?=
/* @escapeNotVerified */
$swatchOptions =
$block
->getJsonConfig() ?>,
17
"jsonSwatchConfig"
: <?php
/* @escapeNotVerified */
18
echo $swatchOptions =
$block
->getJsonSwatchConfig(); ?>,
19
"mediaCallback"
:
"<?= /* @escapeNotVerified */ $block->getMediaCallback() ?>"
,
20
"gallerySwitchStrategy"
:
"<?php /* @escapeNotVerified */ echo $block->getVar('gallery_switch_strategy',
21
'Magento_ConfigurableProduct') ?: 'replace'; ?>"
,
22
"jsonSwatchImageSizeConfig"
: <?php
/* @noEscape */
echo
$block
->getJsonSwatchSizeConfig() ?>
23
}
24
},
25
"*"
: {
26
"Magento_Swatches/js/catalog-add-to-cart"
: {}
27
}
28
}
29
</script>
$block
$block
Definition:
block.php:8