Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
theme.Sections.ProductLargeTemplate = function (container) {
var $mainContainer = $(container);
if($mainContainer.closest('[data-section-id="product-alternate-template"]').length > 0) {
theme.Products.init(container);
theme.Slick.initProdPhoto(container);
theme.Slick.initVariant(container);
theme.Variants.init(container, true);
theme.ProductPage.init(container);
} else {
$mainContainer.find('.desktop-featured-product').each(function() {
var $container = $(this);
theme.Products.init($container);
theme.Slick.initFeaturedCollection($container);
theme.Variants.init($container);
});
}
};
theme.Sections.ProductLargeTemplate.prototype = {
onUnload: function(evt) {
var container = $('[data-section-id]', evt.target)[0];
theme.Slick.uninitFeaturedCollection(container);
theme.Slick.uninitProdPhoto(container);
theme.Slick.uninitVariant(container);
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.