news

Saturday, September 18, 2021

Victoria Myers

Good morning lovely knitters!  The foggy morning made me have a late start - so I'm going to TRY to be quick this morning.  (Go ahead and laugh - I won't be offended!)

The Greater Boston Yarn Crawl is less than 2 weeks away!  If you haven't cast on Wayside Waves yet, better grab a kit quick!  It is a relatively quick knit, but if you don't get it this week, it is unlikely you'll have it done for the crawl - which starts on September 30!

For more 15-years fun - Juniper Moon Farm Santa Cruz is Buy 1 Get 1 50% off this week with code SCBOGO!  Santa Cruz is ALREADY 30% off - so this is an incredible deal!  This is a great yarn, but its spot in the store is going to be filled up with something else soon so it is a great time to grab it!

We released a BRAND NEW shawl kit this week - Crystal Axis!  This is SUCH a fun knit - showing off the pretty colors or Noro while softening the whole shawl with luscious Moonshine Fine!  Get the kits here!

And in MORE Mad Ball insanity - another TWENTY FIVE Mad Balls came in this week!  My rack is FINALLY full again!  Grab the one you want before it disappears - they are all their own individuals!  And come with a download code for 13 patterns!!

And you still have a couple of days (deadline is 9/20) to join the 10 Row/100 day challenge - see all the info and everyone's starts here!

Ok - was the quick?  I can't tell - time is revolting on me!  Hope to see you!

Island Yarn 
189 Main Street
Maynard, MA  01754
Hours: Wednesday to Saturday, 12-5

Leave a Comment

Please note, comments must be approved before they are published

const selectVariantByClickingImage = { // Create variant images from productJson object _createVariantImage: function (product) { const variantImageObject = {}; product.variants.forEach((variant) => { if ( typeof variant.featured_image !== 'undefined' && variant.featured_image !== null ) { const variantImage = variant.featured_image.src .split('?')[0] .replace(/http(s)?:/, ''); variantImageObject[variantImage] = variantImageObject[variantImage] || {}; product.options.forEach((option, index) => { const optionValue = variant.options[index]; const optionKey = `option-${index}`; if ( typeof variantImageObject[variantImage][optionKey] === 'undefined' ) { variantImageObject[variantImage][optionKey] = optionValue; } else { const oldValue = variantImageObject[variantImage][optionKey]; if (oldValue !== null && oldValue !== optionValue) { variantImageObject[variantImage][optionKey] = null; } } }); } }); return variantImageObject; }, _updateVariant: function (event, id, product, variantImages) { const arrImage = event.target.src .split('?')[0] .replace(/http(s)?:/, '') .split('.'); const strExtention = arrImage.pop(); const strRemaining = arrImage.pop().replace(/_[a-zA-Z0-9@]+$/, ''); const strNewImage = `${arrImage.join('.')}.${strRemaining}.${strExtention}`; if (typeof variantImages[strNewImage] !== 'undefined') { product.variants.forEach((option, index) => { const optionValue = variantImages[strNewImage][`option-${index}`]; if (optionValue !== null && optionValue !== undefined) { const selects = document.querySelectorAll('#'+ id + ' [class*=single-option-selector]'); const options = selects[index].options; for (let option, n = 0; (option = options[n]); n += 1) { if (option.value === optionValue) { selects[index].selectedIndex = n; selects[index].dispatchEvent(new Event('change')); break; } } } }); } }, _selectVariant: function() { const productJson = document.querySelectorAll('[id^=ProductJson-'); if (productJson.length > 0) { productJson.forEach((product) => { const sectionId = product.id.replace("ProductJson-", "shopify-section-"); const thumbnails = document.querySelectorAll('#'+ sectionId + ' img[src*="/products/"]'); if (thumbnails.length > 1) { const productObject = JSON.parse(product.innerHTML); const variantImages = this._createVariantImage(productObject); // need to check variants > 1 if (productObject.variants.length > 1) { thumbnails.forEach((thumbnail) => { thumbnail.addEventListener('click', (e) => this._updateVariant(e, sectionId, productObject, variantImages), ); }); } } }); } }, }; if (document.readyState !== 'loading') { selectVariantByClickingImage._selectVariant(); } else { document.addEventListener( 'DOMContentLoaded', selectVariantByClickingImage._selectVariant(), ); }