')[1]; $('#contextualized_product').hide().removeClass("contextualized_product").html(match).fadeIn("slow"); //Hack to load missing javascript var sections = new theme.Sections(); sections.register('cart-template', theme.Cart); sections.register('product', theme.Product); sections.register('collection-template', theme.Filters); sections.register('product-template', theme.Product); sections.register('header-section', theme.HeaderSection); sections.register('map', theme.Maps); sections.register('slideshow-section', theme.SlideshowSection); sections.register('quotes', theme.Quotes); theme.init(); carouselInit(); } }); //} var price = 0; var name = null; var variant = null; if(variant == null){ variant = ""; } var category = ""; if(personaLabel){ console.log(price); gtag('event', 'view_item', {"items": [{"id": productId,"name": name,"category": category,"price": ,"variant": variant}],"static_makeup": personaLabel}); } else{ console.log(price); gtag('event', 'view_item', {"items": [{"id": productId,"name": name,"category": category,"price": 0,"quantity":1,"variant": variant}],"static_makeup":"NA"}); } } //This listener is using to check 'shopify:section:load' when rendered into the theme editor. //When this is loaded, we will invoke the function again to reload the data $(document).on('shopify:section:load', function(event){ loadProductDetails(); }); function carouselInit(){ $('.cs-carousel').each(function() { var carousel = $(this).attr("id"); $('#'+carousel).slick({ infinite: true, dots: false, slidesToShow: 6, slidesToScroll: 1, draggable: false }); }); }