Lucyann2

By Kate Spade
CA$228.00
CA$298.00
Save CA$70.00
Frame Color : Black
(function(){ const TAG = 'spz-custom-lamb-add-btn'; class SpzCustomLambAddBtn extends SPZ.BaseElement { constructor(element) { super(element); this.templates_ = null; this.action_ = null; this.selected_variant = '{"id":"d31f8c52-c0f0-41fe-acc0-378b7f0c9542","product_id":"602e143d-3b6f-4399-a2ad-94d3113e77fc","title":"Black","weight_unit":"g","inventory_quantity":1,"sku":"CSK0131-01","barcode":"","position":1,"option1":"Black","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/bd82d9b982efc586d73a4ae6af97f5cd.png","path":"bd82d9b982efc586d73a4ae6af97f5cd.png","width":2048,"height":2048,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":228,"min_quantity":1}],"weight":"0","compare_at_price":"298","price":"228","retail_price":"298","available":true,"url":"\/products\/lucyann2?variant=d31f8c52-c0f0-41fe-acc0-378b7f0c9542","available_quantity":1,"options":[{"name":"Frame Color","value":"Black"}],"off_ratio":23,"flashsale_info":[],"sales":0}'; this.lens_process_id = ""; } buildCallback() { this.xhr_ = SPZServices.xhrFor(this.win); this.action_ = SPZServices.actionServiceForDoc(this.element); this.templates_ = SPZServices.templatesForDoc(this.element); this.getLambLensSteps_(true); this.setupAction_(); } mountCallback() { document.addEventListener('dj.variantChange', (event) => { const variant = event.detail.selected; if (variant.product_id == '602e143d-3b6f-4399-a2ad-94d3113e77fc') { this.selected_variant = JSON.stringify(variant); } }); } fetchLambLensSteps() { const lens_process_id = location.search.replace('?', '').split('&').find(v => v.includes('lens_process_id')); const stepsUrl = '/api/fireant/product/602e143d-3b6f-4399-a2ad-94d3113e77fc/steps' + (lens_process_id ? `?${lens_process_id}` : ''); return fetch(stepsUrl).then((res)=>{ return res.json(); }).then((data)=>{ return data; }) } showProductBtn() { var addToCart = document.getElementById('add_to_cart_normal'); var productQuantityBtn = document.getElementById('product_info_quantity_normal'); addToCart && addToCart.classList.remove('hidden'); productQuantityBtn && productQuantityBtn.classList.remove('hidden'); } getLambLensSteps_(isInit) { try{ this.fetchLambLensSteps().then((data)=>{ if(data.errors) { if(isInit){ this.renderBtn(false); this.showProductBtn(); } }else{ if(isInit){ this.lens_process_id = data?.lens_process_id; let frameOnlyArr = data?.prescription_types?.options.filter((option)=>{ return option.prescription_type === 'Frame Only' }); let frameOnlyObj = frameOnlyArr.length > 0 ? frameOnlyArr[0] : {}; let available = true; if(available && (frameOnlyObj?.frame_only_display_at == 'product_detail' || frameOnlyObj?.frame_only_display_at == 'all')){ this.renderBtn(frameOnlyObj); }else{ this.renderBtn(true); } } } }); }catch(e){ this.renderBtn(false); this.showProductBtn(); } } renderBtn = (isRenderProcessBtn) => { return this.templates_ .findAndRenderTemplate(this.element, isRenderProcessBtn) .then((el) => { const children = this.element.querySelector('*:not(template)'); children && SPZCore.Dom.removeElement(children); this.element.appendChild(el); }); } handleClickBtn_() { this.getLambLensSteps_(false); } handleClickFrameOnlyBtn_ = async () => { try { const reqBody = { product_id: "602e143d-3b6f-4399-a2ad-94d3113e77fc", variant_id: JSON.parse(this.selected_variant)?.id, quantity: 1, properties: { lens_processing_id: this.lens_process_id, prescription_type: "Frame Only" } } const data = await this.xhr_.fetchJson('/api/fireant/customize_cart', { method: "post", body: reqBody }); if(data.state === 'success') { this.atc_loading_ = false; this.element.removeAttribute('atc-loading'); this.triggerEvent_("dj.addToCart", data); window.location.href = "/cart"; } else { this.atc_loading_ = false; this.element.removeAttribute('atc-loading'); } } catch (e) { this.atc_loading_ = false; this.element.removeAttribute('atc-loading'); const toast = SPZCore.Dom.scopedQuerySelector(document, `#error-toast`); toast && SPZ.whenApiDefined(toast).then((api) => { api.showToast(e?.data?.message || 'Unknown error'); }); } } setupAction_ = () => { this.registerAction('handleClickBtn', (invocation) => { const glassesInfo = { product:{ title: "Lucyann2", id: "602e143d-3b6f-4399-a2ad-94d3113e77fc", image: {"src":"\/\/img.staticdj.com\/bd82d9b982efc586d73a4ae6af97f5cd.png","path":"bd82d9b982efc586d73a4ae6af97f5cd.png","width":2048,"height":2048,"alt":"","aspect_ratio":1}, selected_variant: JSON.parse(this.selected_variant) }, atcType: 'add_lens' }; const tempElement = document.getElementById('glasses_custom_atc'); tempElement && SPZ.whenApiDefined(tempElement).then(async (api) => { await api.init_(glassesInfo); }); }); this.registerAction('handleClickFrameOnlyBtn', (invocation) => { this.atc_loading_ = true; this.element.setAttribute('atc-loading',""); this.handleClickFrameOnlyBtn_(); }); } triggerEvent_(name, params) { const event = SPZUtils.Event.create( this.win, name, params, {bubbles: true} ); this.element.dispatchEvent(event); } isLayoutSupported = (layout) => { return layout == SPZCore.Layout.CONTAINER; } } SPZ.defineElement(TAG, SpzCustomLambAddBtn) })()
Prescription Verification
Your eyewear prescription consists of specific instructions that enable you to purchase eyeglasses or contact lenses tailored to address your visual requirements. This document will indicate the lens power, size, and recommended brand. In cases where you have specific needs, like astigmatism correction or multifocal lenses, additional information may be included in your prescription.
You will receive this prescription after receiving an eye examination conducted by a certified eye care professional. During the exam, they will assess your visual needs and provide guidance on when to replace your eyewear based on your lifestyle and eye sensitivity.
Disclaimer:
You hereby confirm that you possess a valid prescription for the lenses you intend to order. This means that your prescription is current, having been issued within the past 24 months, and has been provided by a qualified optometrist or lens fitter (referred to hereafter as a "practitioner").
We reserve the right to verify this information with your practitioner. This same requirement applies to returning customers ordering lenses. If a registered practitioner has advised against wearing lenses, we reserve the right to decline any sale, unless redirected by the same or another registered practitioner.
Furthermore, you affirm that you do not have any medical conditions that contraindicate the use of lenses. When making a purchase from us, you are confirming that a qualified practitioner has prescribed the lenses you are ordering. Consequently, we are not responsible if you purchase lenses that have not been specifically prescribed for you or if the time between the prescription and purchase exceeds 24 months.
We strongly recommend regular eye examinations by a qualified practitioner to safeguard your eye health. Please note that contact lens wearers must be at least 16 years old.
If you need assistance with your prescription, please feel free to email us at pros@theiaoptik.ca

Description