To give you the best possible experience, this site uses cookies. Using your site means your agree to our use of cookies. We have published a new cookies policy, which you should need to find out more about the cookies we use. View Cookies Policy.

Our Jewellery Repair Services

At our studio nestled in the heart of Bedford, Nova Scotia, you’ll discover an enchanting realm of jewelry repair where expert skill meets swift service. Whether it’s a treasured heirloom or your everyday favorite piece, our professional jeweler is devoted to breathing new life into your cherished items.

Quick and Professional Repairs

Speed without sacrificing quality - that’s our promise. From intricate chain repairs to custom jewelry design, we ensure each service is delivered with meticulous attention to detail, all while providing a turnaround time that respects the pace of your life.

Services We Provide:

Chain Repair

Broken chains no longer spell the end for your adored jewelry. We specialise in delicate soldering that revives all varieties of chains, making them whole and robust once again.

Polish Jewelry

Revitalise your precious metals with our cleaning and polishing services. Say farewell to tarnish and scratches, and hello to unabated sparkle and shine.

Replace Clasp

Don’t let a damaged clasp compromise your jewellery's security. We efficiently repair or replace clasps so you can wear your pieces with confidence.

Restringing Pearls and Beads

Trust us to maintain the elegance of your pearls and beads with our professional restringing services, recommended every five years for enduring beauty.

Jump Ring Welding

Our welding service fortifies jump rings, a critical component in the resilience and functionality of chains and bracelets.

Custom Jewelry Design

Create something as unique as you are with our bespoke design service, turning your vision into a wearable work of art.

Permanent Jewelry

Experience the convenience and chic style of permanent jewelry with our expert welding services for bracelets, anklets, and necklaces.

Engraving

Imbue your jewellery with meaning through our engraving service – perfect for personalizing gifts or creating memorable pieces for any occasion.

Personalized Name Cutting

Wear or gift a piece of jewellery that speaks directly from the heart with our silver personalized name necklaces.

Ring Sizing

Craft the perfect fit for comfort and security with our ring sizing service.

Rhodium and Gold Plating

Give your jewellery an extra touch of luxury with our rhodium and gold plating options.

Watch Battery Replacement 

We have right battery for almost all of watch models in the market. With well-known, high quality brands, you are guaranteed to be provided with long lasting power for your watch. 

Why Choose Us?

We're more than a repair shop; we're a local studio where speed meets savings. Choosing us means entrusting your jewellery to skillful hands that care about preserving your stories and styles, all at competitive prices that only a one-roof operation like ours can provide.

Trust in our tradition of excellence and local touch. Drop by our Bedford studio or contact us today to experience unparalleled craftsmanship in jewellery repair and design.

GENERAL TERMS & CONDITIONS OF REPAIR SERVICE

By leaving or sending your item it is understood that you are in agreeance with our terms and conditions.

Prices of services offered are liable to change at any time without notice, and we reserve the right to modify or discontinue a service (or any part of the service) without notice.

We do not undertake work on items made of base metals.

We provide an initial estimate for repair, on receipt of your item, which is understood as accepted when leaving said item. This estimate is subject to change following jeweller inspection. Where repair cannot be completed within the initial agreed estimate, we would notify you as soon as reasonably possible of any additional charges. At this stage there is no obligation to accept and proceed, however depending on the extent of investigations required there may be a charge payable to cover labour and materials if declined. No work will be carried out prior to confirmation of a revised estimate from you.

We do our best to provide an accurate turnaround time for any repair, however this is only an estimated time frame. We will do our best to keep you informed, however we cannot be held responsible for any extension/delays caused due to circumstances outside of our control.

Whilst we work with the utmost care and attention, and will do our best to make you aware of any obvious risks before commencing any repair, we would ask you to be mindful that no repair is free of risk and you therefore agree to the commencement of the repair under your own risk. There are times where parts and materials may break or fail during normal repair due to wear and tear. We cannot accept liability for such breakages as they are beyond our control and could not be reasonably foreseen.

Precious stones are particularly vulnerable during repairs due to their structure and existing and natural flaws contained there in making them more susceptible to fracture, especially in the event of removal from setting or re-clawing. We cannot be held responsible for the replacement of any broken or damaged stones that occur due to natural causes.

Some metals become brittle over time and may have undergone past plating treatment. We cannot be held responsible for any deterioration, discolouration that occurs following repair/finishing due to the condition of the metal and/or past treatment we have not been made aware of.

We may also request a deposit in advance of repair where any materials are needed for replacement.

Any warranty given on the repair will be limited to the exact repair and does not cover damage or deterioration caused by accident, misuse or mishandling. 

We reserve the right to keep or dispose of any materials which we have replaced – unless you have requested otherwise and explicitly agreed prior to proceeding. 

We assume no responsibility for items not claimed within three months following the completion of the repair, and you acknowledge and agree that items not claimed within this timeframe may at our discretion be disposed of or sold without liability to the customer.

Whilst we make every endeavour to secure and protect any items left by you, you accept that any loss or damage that occurs to your item is at your own risk. All claims will be limited to the actual cost of repair or replacement and must be accompanied by an up-to-date valuation or original receipt.

Refunds are only given in exceptional circumstances or if we are unable to complete a repair that was outlined in the estimate. Where a refund is made it will normally be paid in full but this is at the reasonable discretion of the jeweller. 

Upon collection of your item, you will need to provide the original receipt and may be asked for photographic ID matching the name and address shown on the receipt.

You accept that you must reasonably inspect your item upon collection to ensure acceptable condition and satisfactory repair completed. We cannot be held responsible for any subsequent damage that occurs once your item has left our care.

Additional conditions relating to postal repairs

We advise that you contact us prior to posting your item for repair to make sure there is a reasonable chance we may be able to undertake such repairs. You will need to include your name, address, contact details and description of fault requiring repair. 

In some cases, we may not be able to confirm possibility of repair by phone or e-mail prior to jeweller’s inspection. In the event we are unable to assist with the repair/service of an item received by post. There will be a minimum return postage cost of $20 payable by you.

We do not accept repairs by post outside of Canada.

Where items are received by post, the postal charge is payable by you and you are responsible for ensuring the correct and safe packaging of your item. We cannot be held responsible for any damage occurred during transit.

We charge a minimum of $20 for return postage and insurance on all repairs/services, which is subject to change depending on the value of your item and level of insurance cover required.

Where a repair under warranty is returned by post, any postage charges covered will be at our discretion.

All items are returned via Canada Post with insurance cover. We will provide a tracking number upon posting, but please allow 10 days for receipt but no more than 20 days before notifying us of any lost parcels. Whilst we will do our best to ensure the safe return of your items, we cannot be held responsible for any loss incurred. Any insurance claim for lost parcels will be undertaken on a goodwill basis and due to a number of variables it may not be possible for an identical replacement to be arranged.

Term and Conditions of warranty of Permanent Jewellery

If you are not completely satisfied with the quality or the workmanship of any item purchased, we will refund or exchange your purchase at our discretion within 7 calendar days from the date of purchase.

All 14K gold and Sterling silver items come with an exclusive 3-month limited warranty of quality and workmanship from the date of purchase. If the jewelry piece breaks at the weld point, we will re-weld it free of charge. If there is a defect with charms, or an issue that is a result of Mali’s work, we will fix it free of charge. Our warranty will not cover chain breakage or stretching due to rough wear & accidental pulling. But, for a $20 fee, we will reconnect the chain with an additional jump ring or do our best to fix the issue!

If the chain becomes lost, receive 20% off of a replacement chain.

To make a claim under this warranty, simply bring the item purchased and the relevant Mali’s receipt into our studio within 3 months from the date of purchase or contact customerservice@malis.ca for instructions about sending it and the original proof of purchase by mail.

 

 

'); } else if (el.find('input[name="captcha_type"]').first().val() == 'v3') { var captchaKey = el.find('input[name="captcha_site_key"]').first().val(); el.prepend(''); } } } function isIE() { ua = navigator.userAgent; /* MSIE used to detect old browsers and Trident used to newer ones*/ var is_ie = ua.indexOf("MSIE ") > -1 || ua.indexOf("Trident/") > -1; return is_ie; } function ets_abancart_mouseleave(event) { var y, _ie = isIE(); if (_ie) { y = event.clientY || event.screenY || event.pageY; } else { y = event.clientY; } if ((y > -5 && !_ie) || (_ie && y > 5)) { return; } ets_abancart_timeout = setTimeout(ets_abancart_leavewebsite, 0); } function ets_abancart_mouseenter() { if (ets_abancart_timeout) { clearTimeout(ets_abancart_timeout); ets_abancart_timeout = null; } } function ets_abancart_keydown(e) { if (ets_abancart_disable_keydown || !e.metaKey || e.keyCode !== 76) { return; } ets_abancart_disable_keydown = true; ets_abancart_timeout = setTimeout(ets_abancart_leavewebsite, ets_abancart_delay); } //display a success/error/notice message function showSuccessMessage(msg) { $.growl.notice({title: "", message: msg}); } function showErrorMessage(msg) { $.growl.error({title: "", message: msg}); } /*----------END LEAVE WEBSITE----------*/ var ets_ab_fn = { init: function () { if (typeof ETSFavico !== "undefined") { window.favicon = new ETSFavico({ animation: 'popFade', bgColor: ETS_ABANCART_BACKGROUND_COLOR, textColor: ETS_ABANCART_TEXT_COLOR, }); ets_ab_fn.loadAjax(true); } ets_ab_fn.initCampaign(); ets_ab_fn.saveCart(); }, initCampaign: function () { if (ETS_ABANCART_CAMPAIGNS) { ETS_ABANCART_CAMPAIGNS.forEach(function (item) { ets_ab_fn.setCampaign(item); }); } if (ETS_ABANCART_COOKIE_CAMPAIGNS) { ETS_ABANCART_COOKIE_CAMPAIGNS.forEach(function (item) { ets_ab_fn.setCampaignCookie(item); }); } }, clearTimeout: function (id, isRemove) { if (typeof ETS_ABANCART_QUEUE[id] !== "undefined") { clearTimeout(ETS_ABANCART_QUEUE[id]); if (isRemove) delete ETS_ABANCART_QUEUE[id]; } }, setCampaign: function (item) { ets_ab_fn.clearTimeout(item.id_ets_abancart_reminder); ETS_ABANCART_QUEUE[item.id_ets_abancart_reminder] = setTimeout( function () { ets_ab_fn.request(parseInt(item.id_ets_abancart_reminder), item.campaign_type); } , parseInt((parseFloat(item.lifetime) > 0 ? parseFloat(item.lifetime) * 1000 : 0)) ); }, setCampaignCookie: function (item) { ets_ab_fn.clearTimeout(item.id_ets_abancart_reminder); var timeOut = 0; if (typeof item.lifetime !== "undefined" || parseFloat(item.redisplay) >= 0) { if (typeof item.lifetime !== "undefined") { timeOut = item.lifetime * 1000; } else { timeOut = parseFloat(item.redisplay) > 0 ? parseFloat(item.redisplay) * 1000 : 0; } ETS_ABANCART_QUEUE[item.id_ets_abancart_reminder] = setTimeout( function () { ets_ab_fn.request(parseInt(item.id_ets_abancart_reminder), item.type); } , timeOut ); } }, mergeCampaign: function (reminder, campaigns, action, isCookie) { var flag = 0; if (campaigns.length > 0) { campaigns.forEach(function (item) { if (isCookie) { if (item.length > 0) { item.forEach(function (rem) { if (parseInt(rem.id_ets_abancart_reminder) === parseInt(reminder.id_ets_abancart_reminder)) { flag = 1; return true; } }); } } else { if (parseInt(item.id_ets_abancart_reminder) === parseInt(reminder.id_ets_abancart_reminder)) { flag = 1; } } if (flag > 0) return true; }); } if (flag < 1) { switch (action) { case 'add': if (isCookie) ets_ab_fn.setCampaignCookie(reminder); else ets_ab_fn.setCampaign(reminder); break; case 'delete': ets_ab_fn.removeCampaign(reminder); break; } } }, restCampaigns: function (campaigns) { if (ETS_ABANCART_CAMPAIGNS.length > 0) { ETS_ABANCART_CAMPAIGNS.forEach(function (item) { ets_ab_fn.mergeCampaign(item, campaigns, 'delete'); }) } if (campaigns.length > 0) { campaigns.forEach(function (item) { ets_ab_fn.mergeCampaign(item, ETS_ABANCART_CAMPAIGNS, 'add'); }); } }, restCookieCampaigns: function (campaigns) { if (ETS_ABANCART_COOKIE_CAMPAIGNS.length > 0) { ETS_ABANCART_COOKIE_CAMPAIGNS.forEach(function (item) { ets_ab_fn.mergeCampaign(item, campaigns, 'delete', true); }); } if (campaigns.length > 0) { campaigns.forEach(function (item) { if (item.length > 0) { item.forEach(function (rem) { ets_ab_fn.mergeCampaign(rem, ETS_ABANCART_COOKIE_CAMPAIGNS, 'add'); }); } }); } }, removeCampaign: function (id) { ets_ab_fn.clearTimeout(id, true); delete ETS_ABANCART_REQUEST[id]; }, ajaxState: function () { var flag = 0, first = 0, requestQueue = Object.keys(ETS_ABANCART_REQUEST); if (requestQueue.length > 0) { requestQueue.forEach(function (key) { if (parseInt(first) <= 0) first = ETS_ABANCART_REQUEST[key].id; if (ETS_ABANCART_REQUEST[key].state > 0) { flag = 1; return true; } }); } return flag <= 0 ? first : 0; }, request: function (id, campaign_type) { if (ETS_ABANCART_LINK_AJAX && parseInt(id) > 0) { ETS_ABANCART_REQUEST[id] = { type: 'post', url: ETS_ABANCART_LINK_AJAX, dataType: 'json', data: 'renderDisplay&id_ets_abancart_reminder=' + id + '&campaign_type=' + campaign_type, state: 0, id: id }; var nextId = ets_ab_fn.ajaxState(); if (parseInt(nextId) > 0) ets_ab_fn.doRequestAjax(id); } }, doRequestAjax: function (id) { var request = ETS_ABANCART_REQUEST[id]; request.state = 1; request.success = function (json) { delete ETS_ABANCART_REQUEST[id]; if (json) { if (json.campaigns) ets_ab_fn.restCampaigns(json.campaigns); if (json.cookies) ets_ab_fn.restCookieCampaigns(json.cookies); if (json.redisplay < 0 && json.id_ets_abancart_reminder > 0) { ets_ab_fn.removeCampaign(json.id_ets_abancart_reminder); } else { switch (json.type) { case 'popup': ets_ab_fn.popup(json, id); break; case 'bar': ets_ab_fn.bar(json, id); break; case 'browser': ets_ab_fn.browser(json, id); break; } } } } $.ajax(request); }, views: function (id, json, group_class) { if (id && json) { // FIRST: var overloadEl = '.ets_abancart_' + json.type + '_overload'; if ($('.ets_abancart_' + json.type + '_overload').length <= 0) { $('body').prepend('
'); } // NEXT: var _container = $('body .ets_abancart_' + json.type + '_overload'); _container .attr({'data-id': id, 'data-type': json.type}) .addClass('active') .find('.ets_abancart_wrapper') .html('
' + json.html + '
') .prepend((json.type === 'popup' ? '

' + json.title + '

' : '')) ; /*---HIGHLIGHT BAR---*/ if (json.type !== 'popup') { _container.attr('style', 'background-color: ' + json.background_color + '; color: ' + json.text_color); } var selectorContainer = _container.find('.ets_abancart_container'); if (json.type === 'bar') { selectorContainer = _container.find('.ets_abancart_width'); } selectorContainer.css('margin', '0 auto'); if (json.popup_width) selectorContainer.css('width', json.popup_width + 'px'); if (json.popup_height) { selectorContainer.css('height', json.popup_height + 'px'); selectorContainer.css('min-height', json.popup_height + 'px'); } if (json.border_radius) selectorContainer.css('border-radius', json.border_radius + 'px'); if (json.border_width) { selectorContainer.css('border-width', json.border_width + 'px'); selectorContainer.css('border-style', 'solid'); } if (json.border_color) selectorContainer.css('border-color', json.border_color); if (json.close_btn_color) { _container.find('.ets_abancart_close').find('style').remove(); _container.find('.ets_abancart_close').append(''); } if (json.vertical_align) { $(overloadEl + ' .ets-ac-popup-body p, ' + overloadEl + ' .ets-ac-popup-body a,' + overloadEl + ' .ets-ac-popup-body div:not(.ets_abancart_product_list_table)').css('text-align', 'inherit'); $(overloadEl + ' .ets-ac-popup-body').css('text-align', json.vertical_align); } if (json.font_size) { $('' + overloadEl + ' .ets-ac-popup-body,' + overloadEl + ' .ets-ac-popup-body p, ' + overloadEl + ' .ets-ac-popup-body a,' + overloadEl + ' .ets-ac-popup-body div').css('font-size', json.font_size + 'px'); } if (json.padding) { if (json.popup_width) { if (json.type === 'bar') { selectorContainer.css('padding', json.padding + 'px'); } else $('' + overloadEl + ' .ets-ac-popup-body').css('padding', json.padding + 'px'); } } if (json.overlay_bg) { var color = json.overlay_bg; if (json.overlay_bg_opacity) { var rgbColor = etsAcHexToRgb(json.overlay_bg); color = 'rgba(' + rgbColor.r + ',' + rgbColor.g + ',' + rgbColor.b + ',' + json.overlay_bg_opacity + ')'; } $('.ets_abancart_popup_overload').css('background-color', color); } ets_ab_fn.countdown(); ets_ab_fn.countdown2(); if ($('.ets_ac_datepicker').length) { $('.ets_ac_datepicker').removeClass('hasDatepicker'); $('.ets_ac_datepicker').datepicker({dateFormat: 'yy-mm-dd'}); } if ($('.ets_ac_datetimepicker').length) { $('.ets_ac_datetimepicker').removeClass('hasDatepicker'); $('.ets_ac_datetimepicker').datetimepicker({ prevText: '', nextText: '', dateFormat: 'yy-mm-dd', currentText: 'Now', closeText: 'Done', ampm: false, amNames: ['AM', 'A'], pmNames: ['PM', 'P'], timeFormat: 'hh:mm:ss tt', formatTime: 'hh:mm:ss tt', timeSuffix: '', timeOnlyTitle: 'Choose Time', timeText: 'Time', hourText: 'Hour', minuteText: 'Minute', }); } etsAcOnLoadRecaptcha(); } }, popup: function (json, id) { ets_ab_fn.views(id, json, 'ets_abancart_popup'); }, bar: function (json, id) { ets_ab_fn.views(id, json, ''); }, browser: function (json, id) { if (json && id) { var notification; if (!("Notification" in window)) { //alert("This browser does not support desktop notification 1"); } else if (Notification.permission === "granted") { ets_ab_fn.setNotification(notification, json, id); } else if (Notification.permission !== "denied" && ETS_ABANCART_HAS_BROWSER) { Notification.requestPermission().then(function (permission) { if (permission === "granted") { ets_ab_fn.setNotification(notification, json, id); } }); } } }, setNotification: function (notification, json, id) { // New notification. notification = new Notification(json.title, {icon: json.icon, body: json.html}); // Event click. notification.onclick = function () { if (typeof json.code !== "undefined" && json.code) { $.ajax({ type: 'post', url: ETS_ABANCART_LINK_AJAX, dataType: 'json', data: 'add_cart_rule&discount_code=' + json.code, success: function (json) { if (json) { if (json.errors) { showErrorMessage(json.errors) } else { window.location.href = json.link_checkout; } } }, }); } }; // Event close. notification.onclose = function () { if (id) { $.ajax({ type: 'post', url: ETS_ABANCART_LINK_AJAX, dataType: 'json', data: 'type=browser&redisplay=1&id=' + id, }); } }; }, close: function (type, json) { $('body .ets_abancart_' + type + '_overload.active').remove(); if (parseFloat(json.redisplay) > 0) { ETS_ABANCART_QUEUE[json.id_ets_abancart_reminder] = setTimeout(function () { ets_ab_fn.request(json.id_ets_abancart_reminder, type); }, parseFloat(json.redisplay) * 1000); } }, countdown: function () { var clock = $('.ets_abancart_count_down_clock'); var style = clock.attr('data-style') || ''; if (clock.length > 0) { clock.countdown(parseInt(clock.data('date')) * 1000).on('update.countdown', function (event) { $(this).html(event.strftime('' + (event.offset.weeks > 0 ? '%-w week%!w ' : '') + (event.offset.days > 0 ? '%-d day%!d ' : '') + '%H hr ' + '%M min ' + '%S sec ')); }); } }, countdown2: function () { var clock = $('.ets_ac_evt_countdown2'); var style = clock.attr('data-style') || ''; if (clock.length > 0) { clock.countdown(parseInt(clock.data('date')) * 1000).on('update.countdown', function (event) { $(this).html(event.strftime('' + (event.offset.weeks > 0 ? '%-w week%!w ' : '') + (event.offset.days > 0 ? '%-d day%!d ' : '') + '%H hr ' + '%M min ' + '%S sec ')); }); } }, saveCart: function () { if ((ETS_ABANCART_LIFE_TIME >= 0 || $('#ets_abancart_cart_save.active').length > 0) && ETS_ABANCART_LINK_SHOPPING_CART) { setTimeout(function () { $.ajax({ type: 'POST', dataType: 'json', url: ETS_ABANCART_LINK_SHOPPING_CART, data: 'init', success: function (json) { $('#ets_abancart_cart_save.active').removeClass('active'); if (json) { if ($('body .ets_abancart_shopping_cart_overload').length <= 0) { $('body').prepend('
'); } if (json.html) $('body .ets_abancart_shopping_cart_overload').addClass('active').find('.ets_abancart_wrapper').html(json.html); } }, error: function () { $('#ets_abancart_cart_save.active').removeClass('active'); } }); }, $('#ets_abancart_cart_save.active').length > 0 ? 0 : ETS_ABANCART_LIFE_TIME * 1000); } }, exitPopupSaveCart: function (notReDisplay) { var notReDisplay = notReDisplay || true; $('.ets_abancart_shopping_cart_overload.active').removeClass('active'); if (notReDisplay && ETS_ABANCART_LINK_SHOPPING_CART) { $('#save_cart_form .bootstrap').remove(); $.ajax({ type: 'post', url: ETS_ABANCART_LINK_SHOPPING_CART, dataType: 'json', data: 'ajax=1&offCart', success: function () { }, error: function () { } }); } }, exitPopupCart: function () { $('.ets_abancart_display_shopping_cart_overload.active').removeClass('active'); }, loadAjax: function (initialized) { if (typeof ETS_ABANCART_BROWSER_TAB_ENABLED === "undefined" || !ETS_ABANCART_BROWSER_TAB_ENABLED) return; if (initialized) { favicon.badge(parseInt(ETS_ABANCART_PRODUCT_TOTAL)); } else if (ETS_ABANCART_LINK_AJAX && typeof favicon !== "undefined") { $.ajax({ type: 'POST', dataType: 'JSON', url: ETS_ABANCART_LINK_AJAX, data: 'favicon&ajax=1', success: function (json) { if (json) { favicon.badge(parseInt(json.product_total)); } } }); } }, exitPopupLeave: function () { $('.ets_abancart_leave_website_overload.active').removeClass('active'); $('.ets_abancart_leave_website_overload .ets_abancart_wrapper.active').remove(); }, copyToClipboard: function (el) { var $temp = $(""); $("body").append($temp); $temp.val(el.text().trim()).select(); document.execCommand("copy"); $temp.remove(); showSuccessMessage(ETS_ABANCART_COPIED_MESSAGE); setTimeout(function () { el.removeClass('copy'); }, 300); }, }; $(document).ready(function () { if ($('.ets_ac_datepicker').length) { $('.ets_ac_datepicker').datepicker({dateFormat: 'yy-mm-dd'}); } if ($('.ets_ac_datetimepicker').length) { $('.ets_ac_datetimepicker').datetimepicker({ prevText: '', nextText: '', dateFormat: 'yy-mm-dd', currentText: 'Now', closeText: 'Done', ampm: false, amNames: ['AM', 'A'], pmNames: ['PM', 'P'], timeFormat: 'hh:mm:ss tt', formatTime: 'hh:mm:ss tt', timeSuffix: '', timeOnlyTitle: 'Choose Time', timeText: 'Time', hourText: 'Hour', minuteText: 'Minute', }); } if ($('.ets_speed_dynamic_hook').length < 1) { ets_ab_fn.init(); } $(document).on("hooksLoaded", function () { Object.keys(ETS_ABANCART_QUEUE).forEach(function (i) { clearTimeout(ETS_ABANCART_QUEUE[i]); delete ETS_ABANCART_QUEUE[i]; }); ets_ab_fn.init(); }); /*---favicon---*/ $(document).ajaxComplete(function (event, xhr, settings) { if (typeof settings.data !== "undefined" && (settings.data.toString().match(/(qty=\d+)/i) && settings.data.toString().match(/(add=\d+)/i) || settings.url.match(/(id_product=\d+)/i) && settings.url.match(/(update=\d+)/i) || settings.url.match(/(id_product=\d+)/i) && settings.url.match(/(delete=\d+)/i))) { ets_ab_fn.loadAjax(false); } var nextId = ets_ab_fn.ajaxState(); if (parseInt(nextId) > 0) ets_ab_fn.doRequestAjax(nextId); }); /*---end favicon---*/ $(document).on('click', '.ets_abancart_box .ets_abancart_box_discount', function (ev) { ev.preventDefault(); ets_ab_fn.copyToClipboard($(this)); }); $(document).on('click', '.ets_abancart_leave_website_overload .ets_abancart_close', function (ev) { ev.preventDefault(); ets_ab_fn.exitPopupLeave(); var btn = $(this); if (!btn.hasClass('active') && ETS_ABANCART_LINK_AJAX) { $.ajax({ type: 'post', url: ETS_ABANCART_LINK_AJAX, dataType: 'json', data: 'leave_closed', success: function (json) { btn.removeClass('active'); }, }); } }); $(document).on('click', '.ets_abancart_shopping_cart_overload .ets_abancart_create_account', function (ev) { ev.preventDefault(); if ($('#id_customer').length > 0 && parseInt($('#id_customer').val()) <= 0) { $('.ets_abancart_form_login').fadeOut(); $('.ets_abancart_form_create').fadeIn(); } }); $(document).on('click', '.ets_abancart_view_shopping_cart', function (ev) { ev.preventDefault(); var btn = $(this); if (!btn.hasClass('active') && btn.attr('href') != '') { btn.addClass('active'); $.ajax({ type: 'POST', url: btn.attr('href'), dataType: 'json', data: 'ajax=1', success: function (json) { btn.removeClass('active'); if (json) { if ($('body .ets_abancart_display_shopping_cart_overload').length <= 0) { $('body').prepend('
'); } $('body .ets_abancart_display_shopping_cart_overload').addClass('active').find('.ets_abancart_wrapper').html(json.html); } }, error: function () { btn.removeClass('active'); } }); } }); $(document).on('click', '.ets_abancart_display_shopping_cart_overload .ets_abancart_close, .ets_abancart_display_shopping_cart_overload .ets_abancart_cancel', function (ev) { ev.preventDefault(); ets_ab_fn.exitPopupCart(); }); $(document).on('click', '.ets_abancart_load_this_cart', function (ev) { ev.preventDefault(); var btn = $(this); if (!btn.hasClass('active') && btn.attr('href') != '') { btn.addClass('active'); $.ajax({ type: 'POST', url: btn.attr('href'), dataType: 'json', data: 'ajax=1', success: function (json) { btn.removeClass('active'); if (json) { if (json.errors) $('body .ets_abancart_display_shopping_cart_overload').prepend(json.errors); else window.location.href = json.link_checkout; } }, error: function () { btn.removeClass('active'); } }); } }); $(document).on('click', '.ets_abancart_shopping_cart_overload .ets_abancart_close', function (ev) { ev.preventDefault(); ets_ab_fn.exitPopupSaveCart(); }); $(document).on('click', '.ets_abancart_shopping_cart_overload button[id=submit_cart]', function (ev) { ev.preventDefault(); var btn = $(this), form = $('#save_cart_form'); btn.parents('form#save_cart_form').find('input.cart_name').removeClass('error'); if (!btn.hasClass('active') && form.attr('action')) { btn.addClass('active'); var formData = new FormData(form.get(0)); formData.append('ajax', 1); $('#save_cart_form .bootstrap').remove(); $.ajax({ type: 'post', url: form.attr('action'), dataType: 'json', data: formData, processData: false, contentType: false, success: function (json) { btn.removeClass('active'); if (json) { if (json.not_logged && parseInt($('#id_customer').val()) <= 0) { $('.ets_abancart_form_login').fadeIn(); $('.ets_abancart_form_save_cart').fadeOut(); } else if (json.errors) { form.prepend(json.errors); btn.parents('form#save_cart_form').find('input#cart_name').addClass('error').focus(); } else { if (json.msg) showSuccessMessage(json.msg); $('#ets_abancart_cart_save').remove(); ets_ab_fn.exitPopupSaveCart(false); } } }, error: function () { btn.removeClass('active'); } }); } }); $(document).on('change', 'input#cart_name', function (e) { if ($(this).val() != '') { $(this).removeClass('error'); } else { $(this).addClass('error'); } }); $(document).on('click', '.ets_abancart_shopping_cart_overload button[name=submitLogin]', function (ev) { ev.preventDefault(); var btn = $(this), form = $('#login_form'); if (!btn.hasClass('active') && form.attr('action')) { btn.addClass('active'); var formData = new FormData(form.get(0)); formData.append('cart_name', $('#cart_name').val()); formData.append('ajax', 1); $('#login_form .bootstrap').remove(); $.ajax({ type: 'post', url: form.attr('action'), dataType: 'json', data: formData, processData: false, contentType: false, success: function (json) { btn.removeClass('active'); if (json) { if (json.errors) form.prepend(json.errors); else window.location.reload(); } }, error: function () { btn.removeClass('active'); } }); } }); $(document).on('click', '.ets_abancart_shopping_cart_overload button[name=submitCreate]', function (ev) { ev.preventDefault(); var btn = $(this), form = $('#create_form'); if (!btn.hasClass('active') && form.attr('action')) { btn.addClass('active'); var formData = new FormData(form.get(0)); formData.append('cart_name', $('#cart_name').val()); formData.append('ajax', 1); $('#login_form .bootstrap').remove(); $.ajax({ type: 'post', url: form.attr('action'), dataType: 'json', data: formData, processData: false, contentType: false, success: function (json) { btn.removeClass('active'); if (json) { if (json.errors) form.prepend(json.errors); else window.location.reload(); } }, error: function () { btn.removeClass('active'); window.location.reload(); } }); } }); $(document).on('click', '#ets_abancart_cart_save', function (ev) { ev.preventDefault(); if (!$(this).hasClass('active')) { $(this).addClass('active'); ets_ab_fn.saveCart(); } }); $(document).on('click', '.ets_abancart_close:not(.leave), .ets_abancart_no_thanks', function (ev) { ev.preventDefault(); var btn = $(this), overload = btn.parents('.ets_abancart_overload'), id = overload.attr('data-id'), type = overload.attr('data-type'); $('body .ets_abancart_' + type + '_overload.active').remove(); if (!btn.hasClass('active') && ETS_ABANCART_LINK_AJAX && id) { $.ajax({ type: 'post', url: ETS_ABANCART_LINK_AJAX, dataType: 'json', data: 'type=' + type + '&redisplay=1&id=' + id + (btn.hasClass('ets_abancart_no_thanks') ? '&closed=1' : ''), success: function (json) { if (json) { ets_ab_fn.close(type, json); } } }); } }); $(document).on('click', '.ets_abancart_leave_website_overload .ets_abancart_no_thanks', function (ev) { ev.preventDefault(); var btn = $(this), overload = btn.parents('.ets_abancart_overload'); overload.remove(); if (!btn.hasClass('active') && ETS_ABANCART_LINK_AJAX) { btn.addClass('active'); $.ajax({ type: 'post', url: ETS_ABANCART_LINK_AJAX, dataType: 'json', data: 'offLeave', success: function (json) { btn.removeClass('active'); if (json) { } }, error: function () { btn.removeClass('active'); } }); } }); $(document).on('click', '.ets_abancart_overload .ets_abancart_add_discount', function (ev) { ev.preventDefault(); var btn = $(this), overload = btn.parents('.ets_abancart_overload'), discount_code = btn.data('code'); if (!btn.hasClass('active') && ETS_ABANCART_LINK_AJAX) { $.ajax({ type: 'post', url: ETS_ABANCART_LINK_AJAX, dataType: 'json', data: 'add_cart_rule&discount_code=' + discount_code, success: function (json) { if (json) { if (json.errors) { //overload.prepend(json.errors); showErrorMessage(json.errors); } else window.location.href = json.link_checkout; } } }); } }); $(document).keyup(function (e) { if (e.keyCode === 27) { ets_ab_fn.exitPopupCart(); ets_ab_fn.exitPopupSaveCart(); } }); $(document).mouseup(function (e) { var displayShoppingCart = $('.ets_abancart_display_shopping_cart_overload.active .ets_abancart_container'), displayCartSave = $('.ets_abancart_shopping_cart_overload.active .ets_abancart_shopping_cart'); if (displayShoppingCart.length > 0 && !displayShoppingCart.is(e.target) && displayShoppingCart.has(e.target).length === 0) { ets_ab_fn.exitPopupCart(); } if (displayCartSave.length > 0 && !displayCartSave.is(e.target) && displayCartSave.has(e.target).length === 0) { ets_ab_fn.exitPopupSaveCart(); } }); $(document).on('click', '.ets_abancart_delete_cart, .ets_abancart_delete', function (ev) { var btn = $(this); if (!confirm(btn.data('confirm'))) { ev.preventDefault(); } }); $(document).on('click', '.js-ets-ac-btn-submit-lead-form', function (e) { var $this = $(this); if ($this.hasClass('loading')) { return false; } if ($this.closest('form').find('.ets_ac_captchav2').length && typeof grecaptcha !== 'undefined') { if (!grecaptcha.getResponse()) { $this.closest('.ets-ac-lead-form-field-shortcode').find('.form-errors').html('
'); return false; } } var formData = new FormData(); var inputDatas = $this.closest('form').serializeArray(); $.each(inputDatas, function (i, el) { if ($this.closest('form').find('[name="' + el.name + '"]').attr('type') == 'file') { var fileItem = $this.closest('form').find('[name=' + el.name + ']')[0].files; if (fileItem.length) { formData.append(el.name, fileItem[0]); } } else { formData.append(el.name, el.value); } }); $this.closest('form').find('input[type=file]').each(function () { var fileItem = $(this)[0].files; if (fileItem.length) { formData.append($(this).attr('name'), fileItem[0]); } }); formData.append('submitEtsAcLeadForm', 1); $.ajax({ url: ETS_AC_LINK_SUBMIT_LEAD_FORM + (ETS_AC_LINK_SUBMIT_LEAD_FORM.indexOf('?') !== -1 ? '&ajax=1' : '?ajax=1'), type: 'POST', dataType: 'json', data: formData, processData: false, contentType: false, dataType: 'json', beforeSend: function () { $this.addClass('loading'); $this.prop('disabled', true); }, success: function (res) { if (res.success) { if (res.display_thankyou_page) { $this.closest('.ets_abancart_wrapper').html(res.thankyou); if ($('.ets_abancart_popup_overload .ets_abancart_close').length) { $('.ets_abancart_popup_overload .ets_abancart_close').addClass('thankyou-page'); } } else { $this.closest('.ets-ac-lead-form-field-shortcode').html('
' + res.message + '
'); } } else { var msg = ''; $.each(res.message, function (i, el) { msg += '
  • ' + el + '
  • '; }); $this.closest('.ets-ac-lead-form-field-shortcode').find('.form-errors').html('
    '); } }, complete: function () { $this.removeClass('loading'); $this.prop('disabled', false); } }); return false; }); $(document).on('click', '.ets-ac-btn-submit-lead-form ', function () { var $this = $(this); if ($this.closest('form').find('.ets_ac_captchav2').length && typeof grecaptcha !== 'undefined') { if (!grecaptcha.getResponse()) { $this.closest('form').find('.ets_ac_captchav2').parent().find('.form-error-item').remove(); $this.closest('form').find('.ets_ac_captchav2').after('

    ' + ETS_AC_TRANS.captchv2_invalid + '

    '); return false; } } }); $(document).mouseleave(function () { setTimeout(ets_abancart_leavewebsite, 0) }); }); function etsAcHexToRgb(hex) { // Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF") var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i; hex = hex.replace(shorthandRegex, function (m, r, g, b) { return r + r + g + g + b + b; }); var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); return result ? { r: parseInt(result[1], 16), g: parseInt(result[2], 16), b: parseInt(result[3], 16) } : null; }