MTL Cannabis Strawberry n’ Mintz (2024)

" ; barDiv.style="box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;width:"+(percentage)+"%;left:"+offset+"%;background:"+color ; if (french){ nameDiv.children[1].innerHTML =frenchTrepenesMap.get(list[i].terpene) ? frenchTrepenesMap.get(list[i].terpene) : list[i].terpene; } else { nameDiv.children[1].innerHTML =list[i].terpene ; } nameDiv.children[0].style="background:"+ color ; offset+=percentage-2 ; componentsBarItems.insertBefore(barDiv, componentsBarItems.firstChild); //componentsNamesItems.insertBefore(nameDiv, componentsNamesItems.firstChild); // componentsBarItems.appendChild(barDiv) ; componentsNamesItems.appendChild(nameDiv) ; } } if(document.getElementById('total-terpenes') == null && product_cats.children.length > 3){ product_cats.children[product_cats.children.length - 1].remove(); product_cats.children[product_cats.children.length - 1].classList.add("no-border"); }} //donefunction setUpCategories(productDetails){ try{ var category = document.getElementById('product-categories').children; // set THC var thcLow = Math.round(productDetails.cannabinoids.thc.low == null ? 0 : productDetails.cannabinoids.thc.low); var thcHigh = Math.round(productDetails.cannabinoids.thc.high == null ? 0 : productDetails.cannabinoids.thc.high); if(thcLow == thcHigh) { var thc = `THC
${thcLow} mg`; var thcPercent = thcLow/10 + " %"; } else { var thc = `THC
${thcLow} - ${thcHigh} mg`; var thcPercent = thcLow/10 + " - " + thcHigh/10 + " %"; } category[0].innerHTML = thc; try{ category[0].innerHTML += getTrailingUnitType(productDetails.type.name, productDetails.title); if (productDetails.ample_category == "Dried Flower" || productDetails.ample_category == "Pre Rolls") category[0].innerHTML += "
" + thcPercent; } catch(e){} // set CBD var cbdLow = Math.round(productDetails.cannabinoids.cbd.low == null ? 0 : productDetails.cannabinoids.cbd.low); var cbdHigh = Math.round(productDetails.cannabinoids.cbd.high == null ? 0 : productDetails.cannabinoids.cbd.high); if(cbdLow == cbdHigh) { var cbd = `CBD
${cbdHigh} mg`; var cbdPercent = "
" + cbdLow/10 + " %"; } else { var cbd = `CBD
${cbdLow} - ${cbdHigh} mg`; var cbdPercent = "
" + cbdLow/10 + " - " + cbdHigh/10 + " %"; } category[1].innerHTML = cbd; try{ category[1].innerHTML += getTrailingUnitType(productDetails.type.name, productDetails.title); if (productDetails.ample_category == "Dried Flower" || productDetails.ample_category == "Pre Rolls") category[1].innerHTML += cbdPercent; } catch(e){} // set Strain category[2].innerHTML= productDetails.skus.strain== null ? "" : productDetails.skus.strain; var cannabinoidProfile = document.querySelector('.product-cannabinoids-profile'); cannabinoidProfile.innerHTML = ""; if (productDetails.cannabinoids){ // var cannabinoidsMap = filterCannabinoidProfile(productDetails.skus.cannabinoids); var cannabinoidsMap = new Map(Object.entries(productDetails.cannabinoids)); for (var [key, valueJs] of cannabinoidsMap) { if (key == "thc" || key == "cbd") continue; var cbgText = valueJs; /* var cbgLow = Math.round(valueJs.low == null ? 0 : valueJs.low); var cbgHigh = Math.round(valueJs.high == null ? 0 : valueJs.high); if (cbgLow == cbgHigh) var cbgText = cbgLow + " mg"; else var cbgText = cbgLow + " - " + cbgHigh + " mg";*/ var title = document.createElement('div'); title.style = "color:black;padding-right: 3px; width: auto; font-size: 0.9rem;font-weight:bold"; title.innerHTML = key.toLocaleUpperCase(); var value = document.createElement('h6'); value.style = "width: auto;font-size: 0.9rem !important;margin-bottom:0;font-weight:bold"; value.innerHTML = cbgText; /* try { value.innerHTML += getTrailingUnitType(productDetails.type.name, productDetails.title); } catch (e) {} */ var newDiv = document.createElement('div'); newDiv.style = "display: flex;align-items: baseline;"; newDiv.appendChild(title); newDiv.appendChild(value); try { cannabinoidProfile.appendChild(newDiv); } catch (e) { console.log(e); } } } } catch (e) { console.log(e); }}function setUpMinorCanab(productDetails){ try{ let cbn = document.getElementById('cbn'); let thc_a = document.getElementById('thc_a'); let delta_8_thc = document.getElementById('delta_8_thc'); let cbnValue = productDetails.minor_cannabinoids.cbn; let thc_aValue = productDetails.minor_cannabinoids.thc_aValue; let delta_8_thcValue = productDetails.minor_cannabinoids.delta_8_thc; if(cbnValue){ cbn.style = "display: block;"; cbn.children[0].children[1].innerHTML = cbnValue; } if(thc_aValue){ thc_a.style = "display: block;"; thc_a.children[0].children[1].innerHTML = thc_aValue; } if(delta_8_thcValue){ delta_8_thc.style = "display: block;"; delta_8_thc.children[0].children[1].innerHTML = delta_8_thcValue; } }catch(e){ console.log("---------------- setUpMinorCanab failed --------------- " + e); }}async function setUpPrice(productDetails) { try{ setTimeout(()=>{ document.querySelector('.price-preview').innerHTML=formatter.format(productDetails.skus.price.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2})).replace("CA", ""); }, 250); document.querySelector('.price-preview').style="color:black ;font-weight:bold;"; } catch (e){ console.log(e) ; }}async function setupDeduction(productDetails){ try{ var deduction = document.getElementById('deduction-amount'); deduction.style = "padding-left: 10px; font-weight: bold;"; deduction.id = "deduction-amount"; deduction.innerHTML = deduction.innerHTML.replace(/[0-9.]+/g, '').replace('g','') + " " + productDetails.skus.rx_deduction + "g"; } catch(e){ console.log(e); }}function setUpTerpeneColorsMap(){ colorMap.set('Alpha-Pinene', '#04724D'); colorMap.set('A-Pinene', '#04724D'); colorMap.set('a-Pinene', '#04724D'); colorMap.set('Alpha-Bisabolol', '#FDD303'); colorMap.set('Bisabolol', '#FDD303'); colorMap.set('Borneol', '#FFF102'); colorMap.set('Alpha-Humulene', '#F1995D'); colorMap.set('a-Humulene', '#F1995D'); colorMap.set('Beta-Eudesmol', '#EAEAEA'); colorMap.set('Beta-Myrcene', '#039BE5'); colorMap.set('Myrcene', '#039BE5'); colorMap.set('Beta-Pinene', '#0E7C7B'); colorMap.set('B-Pinene', '#0E7C7B'); colorMap.set('b-Pinene', '#0E7C7B'); colorMap.set('Camphene', '#D6DF24'); colorMap.set('Caryophyllene', '#595959'); colorMap.set('d-Limonene', '#059129'); colorMap.set('Limonene', '#059129'); colorMap.set('Alpha-Cedrene', '#C95A49'); colorMap.set('a-Cedrene', '#C95A49'); colorMap.set('Cedrene', '#C95A49'); colorMap.set('Eucalyptol', '#2BB672'); colorMap.set('Carene', '#8DC641'); colorMap.set('Geraniol', '#DD0564'); colorMap.set('Citronellol', '#028C41'); colorMap.set('Guaiol', '#67b694'); colorMap.set('Geraniol', '#00A79F'); colorMap.set('Humulene', '#F1995D'); colorMap.set('Terpineol', '#DD0564'); colorMap.set('Linalool', '#9F84BD'); colorMap.set('Nerolidol', '#F5F27E'); colorMap.set('Ocimene', '#FFCC80'); colorMap.set('Beta-Ocimene', '#FFCC80'); colorMap.set('Carene', '#255E91'); colorMap.set('Phytol', '#FFFF00'); colorMap.set('Terpinolene', '#FFC200'); colorMap.set('Trans-Beta-Ocimene', '#BFBFBF'); colorMap.set('Trans-Phytol', '#990000'); colorMap.set('Fenchyl Alconol', '#E7E6E6'); colorMap.set('Valencene', '#ED7D31'); colorMap.set('Beta-Caryophyllene', '#5D5951'); colorMap.set('b-Caryophyllene', '#5D5951'); colorMap.set('Farnesene', '#e9a447'); colorMap.set('Trans-Caryophyllene', '#595959'); colorMap.set('Menthol','#f5f27e') ; colorMap.set('Cedrol','#3c7759') ; colorMap.set('Farnesene','#e9a447') ; colorMap.set('Terpinene','#c88762') ; colorMap.set('Phellandrene','#C5EADA') ; colorMap.set('Other','#000000') ;}async function checkLanguage(){ if (french){ try { document.getElementById('description').children[0].classList.add('hide-section') ; document.getElementById('description').children[1].classList.remove('hide-section') ; } catch (e) {} } document.getElementById('product-categories').children[2].innerHTML = "Hybrid";}async function setupFavouriteBtn() { if (!localStorage.getItem("user-profile")) return ; var userProfile = JSON.parse(atob(localStorage.getItem("user-profile"))); var product = await getProductByHandle(); if(document.querySelector('.favourite-btn-product-page')) document.querySelector('.favourite-btn-product-page').setAttribute("data-ample-id",product.ample_id); for (var i =0 ; i< userProfile.favourite_products.length ; i++){ if (userProfile.favourite_products[i].ample_id == product.ample_id) { document.querySelector('.favourite-btn-product-page').classList.add("favourite-btn-checked"); } }}async function filterProduct(){ var backGrey = document.createElement('div'); backGrey.style = "position: fixed; width: 100%; height: 100vh; background: black; opacity: 0.5; z-index: 9999 !important;" var loader = document.createElement('div'); loader.style = "z-index: 9999; position: fixed;"; loader.classList.add('loader'); document.body.insertBefore(loader, document.body.firstChild); document.body.insertBefore(backGrey, document.body.firstChild); while (!localStorage.getItem('user-products') || localStorage.getItem('user-products') == 'null' ) { await new Promise(r => setTimeout(r, 2)); } setupFavouriteBtn(); setUpTerpeneColorsMap(); setupComponents(); checkLanguage(); filterProductSKUs(); initAddToCart(); setupRecommendedProducts(); backGrey.remove(); loader.remove();}async function changeQuantity(){ while(!document.getElementById('updates_product-template').value){ await new Promise(r => setTimeout(r, 2)); } var quantity = parseFloat(document.getElementById('updates_product-template').value); if(currentSkus && quantity){ setTimeout(()=>{ document.querySelector('.price-preview').innerHTML=formatter.format((parseFloat(currentSkus.skus.price)*quantity).toFixed(2)).replace("CA", ""); },500); } } async function getProductByHandle(){ while(!localStorage.getItem('user-products') || localStorage.getItem('user-products') == 'null'){ await new Promise(r => setTimeout(r, 10)); } var allProducts = JSON.parse(localStorage.getItem('user-products')); var current_handle = "mtl-cannabis-strawberry-n-mintz"; return allProducts.find((element) => { return element.handle == current_handle; } ); } async function AddBackEndVariants() { while(!document.querySelector(".product-select-input-page")) { await new Promise(r => setTimeout(r, 10)); } var selector = document.querySelector('.product-select-input-page') ; for (var i =0 ; i < selector.length ; i++){ selector[i].remove() ; i-- ; } var product = await getProductByHandle() ; if (product) { for (var i =0 ; i< product.skus.length ; i++){ createNewVariant(product.skus[i].shopify_id , product.skus[i].title ,i) ; } } var variants = document.querySelector('.amount-wrapper').children ; if (variants.length > 0) variants[0].click() ; } async function changeVariant(obj){ var index = parseInt(obj.getAttribute('index')) ; var buttons = document.querySelector('.amount-wrapper').children ; for (var i=0 ; i setTimeout(r, 10)); } var selector = document.querySelector('.product-select-input-page') ; document.querySelector('.product-select-input-page').value=obj.getAttribute('value'); console.log(obj.getAttribute('value')); var productDetails = await getProductSKUs(obj.getAttribute('value')) ; console.log(productDetails); if(!productDetails.skus.in_stock){ var addToCart = document.querySelector('.add-to-cart'); addToCart.style = 'color: var(--hover_button_color) !important; background: white !important; pointer-events: none; '; if (french) addToCart.innerHTML = frenchSentences.get("Sold out"); else addToCart.innerHTML = "Sold out"; document.querySelector('.quantity-field').style = "pointer-events: none; opacity: 0.5;"; } else{ var addToCart = document.querySelector('.add-to-cart'); addToCart.style = ''; addToCart.removeAttribute('disabled'); if (french) addToCart.innerHTML = frenchSentences.get("Add to Cart"); else addToCart.innerHTML = "Add to Cart"; document.querySelector('.quantity-field').style = ""; } // setupComponents(productDetails); setUpCategories(productDetails); setUpPrice(productDetails); setupDeduction(productDetails); setUpMinorCanab(productDetails); changeQuantity(); } async function createNewVariant (varId , varTitle ,index){ var variantsDiv = document.querySelector('.amount-wrapper') ; var varDiv = document.createElement('div') ; varDiv.setAttribute('value' , varId) ; varDiv.setAttribute('index' , index) ; varDiv.onclick = function(){ changeVariant(varDiv) ; } ; varDiv.innerHTML=varTitle ; varDiv.classList.add('amount-btn'); variantsDiv.appendChild(varDiv) ; var option = document.createElement('option') ; option.setAttribute('value' , varId) ; while(!document.querySelector(".product-select-input-page")) { await new Promise(r => setTimeout(r, 10)); } var selector = document.querySelector('.product-select-input-page') ; selector.appendChild(option); } async function initAddToCart(){ document.querySelector('.add-to-cart').onclick = async () => { activateLoaderMode(); try{ var openOrder = JSON.parse(atob(localStorage.getItem('user-profile'))).order; } catch(e){ console.log("user is not logged in...") ; window.location.href = "/account/login?backto=" + window.location.pathname; return; } var quantity = document.querySelectorAll('.quantity')[1].value; var sku = document.querySelector('.selectedVariant').getAttribute('value'); var product = await getProductByHandle(); var wantedsku = (product.skus.find(e => {return e.shopify_id == sku})); var shopify_id = wantedsku.shopify_id; var ample_id = wantedsku.ample_id; var item = {ample_id, shopify_id, quantity}; var response = await addToCart(openOrder, item); if(!response || response.error_code != null){ deactivateLoaderMode(); if(response.error_code != null) alert(response.error_code); } else{ await getUserInfo2(true); try { document.querySelector('.cart-item-count').classList.remove('cart-item-change'); document.querySelector('.cart-item-count').classList.add('cart-item-change'); document.querySelector('.item-added-alert').classList.remove('item-added-alert-animation'); setTimeout(()=>document.querySelector('.item-added-alert').classList.add('item-added-alert-animation'),100); } catch (e) {} await updateUserGramHeader(); await updateUserPreferedNameHeader() ; setupRecommendedProducts() ; deactivateLoaderMode(); } } }async function clearRecommendedProductsWrapper() { while (!document.querySelector('.recommended-products-wrapper')) { await new Promise(r => setTimeout(r, 10)); } var wrapper = document.querySelector('.recommended-products-wrapper'); var template = wrapper.children[0].cloneNode(true); wrapper.innerHTML = ""; wrapper.appendChild(template);}AddBackEndVariants() ; filterProduct();

Recommended Products

MTL Cannabis Strawberry n’ Mintz (3)

Are you 19 years of age or older?

18+ in Alberta and 21 + in Quebec

MTL Cannabis Strawberry n’ Mintz (4)

Sorry, you aren't of legal age to enter the webist

By entering this website, you certify that you are of legal consumption age in the province in which you reside

MTL Cannabis Strawberry n’ Mintz (2024)

References

Top Articles
Latest Posts
Article information

Author: Tuan Roob DDS

Last Updated:

Views: 5309

Rating: 4.1 / 5 (42 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Tuan Roob DDS

Birthday: 1999-11-20

Address: Suite 592 642 Pfannerstill Island, South Keila, LA 74970-3076

Phone: +9617721773649

Job: Marketing Producer

Hobby: Skydiving, Flag Football, Knitting, Running, Lego building, Hunting, Juggling

Introduction: My name is Tuan Roob DDS, I am a friendly, good, energetic, faithful, fantastic, gentle, enchanting person who loves writing and wants to share my knowledge and understanding with you.