Free Shipping On All U.S. Orders
') }) } function drawBreadcrumb(){ //console.log('productObject.collections',productObject.collections) if ( productObject.collections.length > 0 ){ $('.wbp').before('
Home / '+productObject.collections[0][0]+'
') } else { $('.wbp').before('
Home
') } } function drawForm(firstAvailableVariant,soldOut){ // SOLD OUT if ( soldOut ){ $('.wbp_size_chart_link').remove() $('.wbp_sizes').html('
Sorry, this product is completely sold out.
') } else { $('.wbp_variants_container').append( '
\ \ \
\
' ) } } function drawImages(selectedColor,cb){ if ( productObject.images[ selectedColor ].images.length == 0 ) return cb(); // DESKTOP var swiper var desktop_images = '' var mobile_images = '' var image_hero = '
'+productObject.images[ selectedColor ].images[0].alt+'
' productObject.images[ selectedColor ].images.forEach(function(image){ desktop_images = desktop_images + ''+image.alt+'' mobile_images = mobile_images + '
'+image.alt+'
' }) $('.wbp').prepend('
'+image_hero+'
') $('.wbp').prepend( '
'+desktop_images+'
' ) $('.wbp_images_desktop span').click(function(){ var large_src = $(this).attr('data-large') var large_alt = $(this).attr('data-alt') $('.wbp_images_desktop_hero div').html(''+large_alt+'') $('.zoom').zoom({magnify:1.8,on:'click'}) }) $('.zoom').zoom({magnify:1.8,on:'click'}) // MOBILE $('.wbp').prepend('
') $('.swiper-wrapper').append(mobile_images) if ( swiper ) swiper.destroy(); setTimeout(function(){ if ( productObject.images[ selectedColor ].images.length > 1 ){ // IF ONLY ONE IMAGE, DON'T ACTIVATE SWIPER swiper = new Swiper('.swiper-container',{loop: true}) } else { $('.icon-pdp-swipe').hide() } },500) $('.wbp_size_chart_link').click(function(){ if ( swiper ) swiper.destroy(); $('.icon-pdp-swipe').show() $('.wbp_images_desktop_hero div').html('Beru Kids Size Chart') $('.zoom').zoom({magnify:1.8,on:'click'}) $('.swiper-wrapper').html( '
Beru Kids Size Chart
' + mobile_images ) setTimeout(function(){ swiper = new Swiper('.swiper-container',{loop: true}) },500) return false }) cb() } function drawVariants(inboundVariant,selectedColor,cb){ var colors = '' var colorVariants = [] var sizes = '' var firstAvailableVariant = '' productObject.colors.forEach(function(color){ var colorFirstVariantID = productObject.images[ color ].variants_arr[0].id var urlFirstVariantID = productObject.images[ color ].variants_arr[0].url // STRIP BAD CHARS FROM COLOR NAME var regex = /\w+/g var colorCleaned = color.match(regex).join('_') colorCleaned = colorCleaned.replace('_amp_','_') colorCleaned = colorCleaned.replace('/w','w') colorCleaned = colorCleaned.replace('/','_') console.log('colorCleaned',color,colorCleaned) var color_image = '' var selectedClass = '' if ( color == selectedColor ){ selectedClass = 'class="selected"' } colors = colors + '' + color_image + '' console.log('color_image',color_image) }) var firstAvailableSize = 0 var soldOut = true productObject.images[ selectedColor ].sizes.sizes.forEach(function(size){ for ( var v in productObject.images[ selectedColor ].variants_obj ){ var variant = productObject.images[ selectedColor ].variants_obj[v] var addClass = '' if ( size == variant.options[1] ){ if ( variant.inventory_quantity > 0 ){ firstAvailableSize++ addClass = 'class="available"' soldOut = false } if ( firstAvailableSize == 1 ){ firstAvailableVariant = variant.id addClass = 'class="available selected"' firstAvailableSize++ } sizes = sizes + '' + size + '' } } }) $('.wbp_variants_container').append( '
\
'+colors+'
\
'+sizes+'
\ \
' ) // SET INBOUND VARIANT TO SELECTED $('.wbp_sizes span').each(function(){ if ( $(this).attr('data-id') == inboundVariant ){ if ( $(this).attr('data-inventory') > 0 ){ $('.wbp_sizes span').removeClass('selected') firstAvailableVariant = $(this).attr('data-id') // THIS PASSES THROUGH TO FORM salePrice( $(this) ) $(this).addClass('selected') } } }) $('.wbp_colors span').click(function(){ location.href = $(this).attr('data-url') }) // SIZE CLICK FUNCTION $('.wbp_sizes span.available').click(function(){ $('.wbp_sizes span').removeClass('selected') $(this).toggleClass('selected') $('#wbp_pdp_select').html('') // UPDATE URL AND HISTORY var newVariant = $(this).attr('data-id') var currentURL = location.pathname + location.search + location.hash; if (currentURL.indexOf('variant=') > -1) { currentURL = currentURL.replace(/variant=\d+/, 'variant=' + newVariant); } else { var sep = currentURL.indexOf('?') > -1 ? '&' : '?'; currentURL += sep + 'variant=' + newVariant; } salePrice( $(this) ) window.history.replaceState({}, '', currentURL); }) cb(firstAvailableVariant,soldOut) } function salePrice($sel){ // RESPECT SALE PRICE var thePrice = $sel.attr('data-price') if ( $sel.attr('data-compare-at-price') ){ $('.wbp_price').html(''+$sel.attr('data-compare-at-price')+' '+ thePrice ) } else { $('.wbp_price').text(thePrice) } } function drawProductInfo(inboundVariant,cb){ var description = productObject.product.description.replace(/\+/g,' ') description = decodeURIComponent(description) var price = productObject.variants_obj[inboundVariant].price var priceHtml = price if ( productObject.variants_obj[inboundVariant].compare_at_price ){ priceHtml = ''+productObject.variants_obj[inboundVariant].compare_at_price+' '+ price } $('.wbp').append( '
\

'+productObject.product.title+'

\
'+priceHtml+'
\
\
'+description+'
\
\
' ) cb() } function page_variant(cb){ // LOAD FIRST AVAILABLE VARIANT WITH INVENTORY > 0 if ( location.href.indexOf('variant=') 0 ){ if ( location.href.indexOf('?')
Rosewood
Rosewood
Goldie
Fiona Dress

Fiona Dress

Regular price now