I am having an issue with double configurable swatches on the related product tab. It is working properly with single swatches such as color swatches only but it creates an issue on products with double swatches such as color and size.
When I choose any option from the main product above
the swatches on the product in the related tab should display the label of the options selected above. But it doesn’t. It shows th selected label on both the options.
Can someone help me with this?
This is my items.phtml
< ?php $objectManager = MagentoFrameworkAppObjectManager::getInstance(); ?>
< ?php
$stockRegistry = $objectManager->create(MagentoCatalogInventoryApiStockRegistryInterface::class);
$product = $block->getCurrentProduct();
$currencySymbol = $block->getCurrencySymbol();
$items = [];
$packageTitle = $block->getGeneralConfig('display_title');
switch ($type = $block->getType()) {
case 'related':
/** @var TekglidePackageProductsBlockProductProductListRelated $block */
if ($exist = $block->getItems()->getSize()) {
$type = 'related';
$class = $type;
$image = 'related_products_list';
$title = __($packageTitle);
$items = $block->getItems();
$limit = 0;
$shuffle = 0;
$canItemsAddToCart = $block->canItemsAddToCart();
$showAddTo = false;
$showCart = true;
$templateType = null;
$description = false;
}
break;
case 'other':
$exist = false;
break;
}
/** @var TekglidePackageProductsBlockProductProductListRelated $block */
?>
< ?php if ($exist):?>
< ?php if ($type == 'related'): ?>
< ?php if ($type == 'related'): ?>