{$sizes=','|explode:$product->variant->size}
{foreach $sizes as $size}<div>{$size}</div>{/foreach}
<div>XS</div>
<div>S</div>
<div>L</div>
var windowHeight = $(window).height();
$(document).on('scroll', function() {
$('.block').each(function() {
var self = $(this), height;
var top = $(document).scrollTop();
height = self.offset().top + windowHeight - 30;
if (top + windowHeight > height) {
$('.block').addClass("fixed");
} else {
$('.block').removeClass("fixed");
}
});
});