{{-- Theme override of plugins/ecommerce::themes.attributes.swatches-renderer. Two amerce-specific tweaks vs the plugin default: 1. Above each attribute swatch, render a Size Guide trigger row when the attribute set is "size" AND the product has a size guide resolved by FOB Product Size Guide. The trigger opens the modal emitted via THEME_FRONT_FOOTER (display_mode = popup). Matches the html demo's Size Guide placement (above the size tile picker). 2. Falls through to the plugin's _layouts/* views unchanged otherwise. --}} @php $key = mt_rand(); $sizeGuide = null; if ( isset($product) && is_plugin_active('fob-product-size-guide') && class_exists(\FriendsOfBotble\ProductSizeGuide\Services\SizeGuideService::class) ) { $sizeGuide = app(\FriendsOfBotble\ProductSizeGuide\Services\SizeGuideService::class) ->getSizeGuideForProduct($product); } @endphp