console.log(''); (function(){ var loadScript = function(url, callback) { var script = document.createElement("script"); script.type = "text/javascript"; if (script.readyState){ script.onreadystatechange = function(){ if (script.readyState == "loaded" || script.readyState == "complete") { script.onreadystatechange = null; callback(); } }; } else { script.onload = function() { callback(); }; } script.src = url; document.getElementsByTagName("head")[0].appendChild(script); }; var fix = function($) { var update_done = false; var str = window.location+''; if(str.indexOf('frame_token')>0) return; var m4u_url = 'https://www.modules4u.biz/shopify/exemptify/'; var txts,text,vat; function setCookie(t,v) { document.cookie = "exemptify="+t+":"+v+"; path=/;"; } function delCookie() { document.cookie = "exemptify=; expires=Thu, 01 Jan 1970 00:00:00 UTC"; } function getCookie() { var name = "exemptify="; var ca = document.cookie.split(';'); for(var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0)==' ') { c = c.substring(1); } if (c.indexOf(name) == 0) { return c.substring(name.length,c.length); } } return ""; } var cartDrawerArr = [ /* smile */ '#cart-box' ]; var drawersel = cartDrawerArr.join(); var selArr = [ /* Boundless */ '.product-item__price-wrapper,.product__price--reg.js-price,.js-price,.product-item__price--reg,.product__price--reg,.on-sale', /*Jumpstart & Minimal*/ '.grid-link__meta,.product-single__price,.cbb-price-digits,div.grid__item.one-third.text-right > span,.product-single__sale-price,.cart__subtotal-price,.grid-link__org_price', /*Venture*/ '.product-card__price,.cart__item-total,.cart__subtotal,.product-card__regular-price,.dualPrice', /*Simple*/ '.product__price,td[data-label="Price"] > span,.cart__table-cell--line-price > span,.product__price--on-sale,.sh-price-varies', /*Classic*/ '.grid-link__meta > strong,div.grid__item.one-third > span', /*Pop*/ 'span#productPrice,.cart__original-price', /*Brooklyn*/ '.cart__price,.grid-product__price,.ajaxcart__subtotal,.options-additional-item,.tb-cart-total-price,.tb-cart-price,.tb-ajaxcart__price', /*Supply*/ 'div.product-item--price small, div.grid-item.one-third.medium-down--one-third.medium-down--text-left.text-right small,span#bk-cart-subtotal-price small,.cart-original-price', /*Label*/ 'p.price,sspan[itemprop="price"],span.feature-copy,div.recolizePrice', /*Classic*/ 'span.money,.grid__item.large--one-fifth.large--display-table-cell.medium--two-thirds>strong', /* Optimal */ '.pr_price', /*Parallax*/ 'span.price > span,span.current_price,p.subtotal_amount>strong,p.price_total,strong.price,span.was_price,span.snize-price', /*Supply BOLD*/ '.medium-down--one-third.text-right>span.h2,span.h1.cart-subtotal--price,span.h1.cart-subtotal--price > small,.medium-down--one-third.text-right>span.h2>span.money,#productPrice-product-template > span,td[data-label=Price] span,td[data-label=Total] span,span.cart__subtotal span', /*Debut*/ '.product-price__price,#ComparePrice-product-template,#ProductPrice-product-template,#ProductPrice-product-pre-order-template,.cart__price-wrapper.cart-flex-item,.text-right.small--hide>div,.price-item,.cart__price-wrapper,.cart__row>.text-right,.cart-subtotal__price,dd[data-cart-item-regular-price],span[data-cart-item-regular-price],.predictive-search-item__price,.cart__total__money', /* Maranello */ '.totals-subtotal-value', /*Palo Alto*/ 'h2#ProductPrice>span,h2#ProductPrice,span.h3.price,h3.cart__subtotal.price>span,s.reduced-price', /* Refresh */ '.finalPrice', /* Minimog */ '.m-price-item,.m-cart-item__price--regular,.m-cart__subtotal--price', /*Canopy*/ 'div.price.ftc>span.amount,div.product-price,div.cart-summary-subtotal>span.amount,span.price.ftc,div.price>h5,div.half.column.align-right>h2', /*Dividio Widget*/ '.divido-widget-launcher>a', /*InstantSearch*/ '.isp_price_compare_at_price_exist,.isp_section_header,.ui-autocomplete.ui-front.ui-menu.ui-widget.ui-widget-contentx.ui-corner-all', /* RonDorff */ '.category__price,.js-article-price,.bag__counter__price', /* Store984 */ '.so-cart-item-line-price,.so-cart-original-total', /* Symmetry */ 'span.price,h2.price-area>span.price,h2.price-area>span.current-price,div.line-total,h2.subtotal.h1-style', /* Basel */ '.price>del,.price>ins,#old-product-price,#product-price,div.product-grid-item > span.price,span#product-price,span.shopify-Price-amount.amount', /* Lorenza */ '.title.gridJustify span', /* Sunrise*/ 'span.price-money', /* Story */ '.price-info', /* Enterprise */ '.price__current', /* Taskhusy */ '#bk-cart-subtotal-price', /* Split */ '#CartTotal > span,div.content>span.price', /* Yanka */ '.pt-price,.pt-price-01,.pt-price-02', /* CBT */ 'td.product-price,td[data-label=Price]>strong,td.cart-line-price,p.cart-totals-accent>span', /* Testament */ '.product-price,.prod-price,.cart-price,.cart-total,#basket-right>h4,.onsale,.was', /* Shoptimized */ '.booster-cart-item-line-price,.wh-original-cart-total,.ls-message-param.money', /* Custom*/ '.price_min,.price_max,.exemptify_h2', /* Yourstore */ '.price-box > span,.shopping-cart-table__product-price,#subtotal>td,#grandtotal>td', /* Embrava */ 'h2.price,td.price,span.total>strong', /* Mojave */ '.price__regular', /* Narrative */ '.product__current-price,.card__price,.cart-item__price,.cart-footer__subtotal,.card__price--sale,.card__price--regular', /* Avone */ '#ProductPrice-quickView', /* Gemini */ '.product-price--current,.product-info__price--current,td[data-label=Price],td[data-label=Total],.cart__total__value', /* Blockshop */ '.product-price--original', /* Elextron */ '.nt-product-item-price,td[data-label="Total"]>span,span#CartCost', /* Buildify */ '.bdf-img-box-price > span', /*Gecko*/ '.product-info>span.price,td.product-subtotal', /* Prestige */ '.Price,.Price>span,button.Cart__Checkout>span,.Cart__Total span,.ProductItem__PriceList', /* Unero */ '.price-new > .amount,.product-subtotal > .amount', /* Free shipping threshold */ '.content_threshold>strong>span.amount', /* Hulkapps */ '.original_price,.ajaxcart__price,.discounted_price,.hulkapps-cart-original-total,.hulkapps-cart-total,.hulkapps-cart-item-price,.hulkapps-cart-item-line-price,[data-hulkapps-ci-price],.cart-template__line-price,[data-hulkapps-cart-total]', /* General */ '.product-price-wrap,.subtotal', /* Ella */ '.regular-product span,.old-price,.special-price,.special-price>span,.total-price span,.fox-cart-item-line-price,.accessory-price', /* Omega */ 'div.price,span.compare-price,div.product--price span', /* Ella */ 'div.cart-collateral>span.price,p.total>span.price,.prices>.price,.info>.price', /* Loft */ 'p.product-price,.js-prod-price,.js-cart-item-price', /* Impulse */ '.grid-product__price--original,.product__price-savings,.product-price__sale,.tb-product-compare-price,.wh-original-price', /* Turbo */ '.price>.money,.item-pricing,.sale', /* Kagami */ '.product-meta__price,.product-item__price,.mini-cart__total-price,.cart-item__subtotal,.cart__total,.mini-cart-item__line-price', /* Electro */ '.price-compare,.price-sale', /* Focal */ '.product-sticky-form__price', /* Empire */ '.money,.price--main>span', /* Frontpage */ '.field-price,:not(.smarte-review-stars) > .total,.itemprice,.saw-cart-original-total', /* Takoon */ '.price__value,.cart-menu__total-text', /* Tony Templates */ '.full-total-js,.cart-total>span:not(.cart-qty),.new-price', /* Venue */ '.hidePrices', /* Pipeline */ '.buttonPrice', /* California */ 'h3.price', /* Electro */ '.addcart-modal-subtotal,.cart-item-total-price,.item-price,.item-total', /* Modular */ '.product-normal-price,.cart-product-total-price,.popover-item-price,.mosaic__product-price,.product-compare-price,.product-sale-price,.cart-product__total-price,.mw-price', /* Streamline */ '.sale-price', /* Code Basetheme */ '.variant-option-price,.ajax-notification-product-price', /* Store Theme */ '.usf-price', /* Broadcast */ '.item__price--final', /* Wokiee */ '.tt-price', /* Request for Quote */ '.sc-shopify-qs-product-price', /* Warehouse */ '.line-item__price,.cart-recap__price-line-price,.search-bar__item-price,.tdf-cart-total-parent,#total-cost', /* Legend*/ '.total-price', /* Athens */ '.dfd-card-price', /* Maker */ '.product-form--price', /* Lusion */ '.subtotal-price', /* Kalles */ '.cart_tot_price,.ch_tt_price,.cart_price', /* Starter theme */ '#comparePrice', /* Alamp */ '.enj-product-price,.product-total-cart,.product-total,.amount', /* Woodstock */ '.hidePrice', /* Effortless */ '.price-cart', /* Creative Monster */ '.cart-item-price,.cart-item-total', /* Dawn */ '.totals__subtotal-value,.price--end,.price--end > div:not(.exemptify_clone),.wn-line-item-original-price,.wn-line-item-discounted-price,.cart-notification-product__qty-price,.total_price,.totals__total-value', /* Quick Quote */ '.quick-quote-price,.quick-quote-extended-price', /* Revolution Slider */ '.tdf-cart-item-p-p', /* Buy Button */ '.shopify-buy__product__actual-price,.shopify-buy__cart-item__price,.shopify-buy__cart__subtotal__price', '.ajaxcart__product-price', /* Bold bundles */ '.bdl-product-price,.vtl-pb-main-widget__total-discount,.vtl-pb-main-widget__total-price,.vtl-pb-main-widget__total-saving,.vtl-pb-main-widget__product-price,.vtl-pb-main-widget__product-initial-price,.exemptify_wrap>span', /* SWYM */ '.swym-price', /* Boost Commerce */ '.bc-sf-filter-product-item-regular-price,.boost-pfs-quickview-price,.boost-pfs-filter-product-item-regular-price', /* Shogun */ '.shg-product-price', /* BCPO */ '.bcpo-cart-item-price,.bcpo-cart-item-line-price,.bcpo-cart-original-total', /* Infinite Options */ '#calculated_option_total', /* Bold Options */ '.hulkapps-cart-original-total>span,.hulkapps-price,.unit_price', /* Dynamic Product Options */ /* MW Options */ '.value-price', '.price-notice', /* Geolizr */ '.geolizr-currency', /* Dummy */ '#dummy', /* Exemptify */ '.exemptify_price,.exemptify_descend span', /* Showcase */ '.showcase-grid,.showcase-grid-item,.showcase-grid-items,.theme-money', /* Saso Cart*/ '.saso-cart-item-price,.saso-cart-item-line-price,.saso-cart-original-total', /* BC Filter */ '.bc-sf-product-regular-price', /* Recharge */ '.rc_price_onetime,.rc_price', /* Upsell */ '.rk-widget-card-price-money,.upsell-price-value,.ak-upsell-original-price,.lb-upsell-money, .lb-upsell-money > b', /* Wiser Product Recommendations */ '.ws-card__price', /* pagefly */ '.sc-pcLzI,[data-pf-type=ProductPrice]', /* EcomSolid */ '.total_price_product,.number_total', /* Boost PFS */ '.boost-pfs-search-suggestion-product-regular-price', /* Boost */ '.theme_money', /* Wholesale Discount App */ '.wn-discounted-subtotal,.wn-original-subtotal,.wcp-cart-total,.wcp-original-cart-total', /* Rebuy */ '.rebuy-money,.rebuy-cart__flyout-subtotal-amount', /* Bundle Bear */ '.ComparePrice', /* etrans */ '.etrans-money', /* Options calculator */ '.inlinePrice', /* Other */ '.pn-price-item,.pn-total-line-item,.kuSalePrice,#rrpPrice,.vtl-product-card__price,.product-price__price,.CartItem__Discount,.transcy-money,.sale-tag,.product-card__regular-price,.product-card__price,#revy-cart-subtotal-price,.ufe-cart-total-price,.checkout-price,.mbc-bundle__compare-price,.mbc-bundle__item-price > span, span[data-cart-item-regular-price] > span > s, dd[data-cart-item-regular-price] > span > s, span.cart-subtotal__price > span > s,.wishlist-hero-price-update,.spicegems-addon-price,.spicegems-main-price,.grid-product__price--from,.cbb-currency,span[data-unit-price],[data-subtotal],[data-product-price],[data-compare-price]:not(.hidden),.tdf-cart-item-lp-p,[bss-b2b-product-price],.csapps-cart-original-total > span,.csapps-cart-original-total,[data-product-type=price],.ufe-cart-item-total-price,[bss-b2b-current-variant-price],.selectedOpt,.priceProduct,.cartSubtotal,.product-price--compare,.ocu-totals__has,sale-price,.ymq-b2b-price-hidden,.items_subtotal,.ht-money,.price__was,.samitaWS-customized-price,.samitaWS-customized-original-price,.product-item__price-main>span,.cart__form-item-price' ]; var sel = selArr.join(); function getVars() { if(getCookie()!='') { var c=getCookie(); c = c.split(':'); text = c[0]; vat = parseFloat(c[1]); setTimeout(function(){ walkElems(); }, 500); } else { m4uRequest(m4u_url+'exemptify.php','POST',{'action' : 'get_vars','shop':'bitcraze.myshopify.com'}); } } function m4uRequest(path,method,vals) { console.log('**************************************************'); console.log('** ATTENTION **'); console.log('** Please update Exemptify immediately! **'); console.log('** Let us help! **'); console.log('** simply send us an Email to info@daxanema.com **'); console.log('******************************************'); return; $.ajax({ url : path, type : method, crossDomain: true, data : vals, dataType:'json', success : function(data) { text=data['text']; vat=data['vat']; setCookie(text,vat); walkElems(); }, error : function(request,error) { console.log(error); } }); } function walkElems() { if(vat==null) return; console.log('Exemptify triggered'); DOMChanges(false); fixSup(); $(sel).each(function(){fixPrice($(this));} ); DOMChanges(true); ExemptifyUpdatesDone = true; } window.ExemptifyTriggerUpdate = function() { setTimeout(function(){ walkElems(); }, 500); }; function fixSup() { var e = $('span[aria-hidden="true"] > sup,small[aria-hidden="true"] > sup'); e.each(function(){ var t = $(this).text(); $(this).replaceWith('.'+t); }); $('span[aria-hidden="true"] > sup').replaceWith('.'+e.text()); } function DOMChanges(on) { if(!on) { $(sel).off(); } else { $(sel).on('DOMSubtreeModified', function() { setTimeout(function(){ walkElems(); }, 500); }); } } function fixPrice(parent) { if (typeof m4u_ptxt !== 'undefined') ptxt = m4u_ptxt; else ptxt = 'inc VAT'; if(ptxt=='') ptxt = '\u0020'; ptxt = htmlentities(ptxt); rate = (vat/100)+1; var matcher1; var matcher2; matcher_dot = /\d{1,3}(,\d{3})*(\.\d{1,2})?/; matcher_comma = /\d{1,3}(\.\d{3})*(,\d{1,2})?/; var t = parent.contents().filter(function(){ return this.nodeType !== 1; }); var rest = parent.contents().filter(function(){ return this.nodeType === 1; }); var txt = t.text(); var txt_old = ''; var match=null; var match_dot = txt.match(matcher_dot); var match_comma = txt.match(matcher_comma); if(match_dot!=null) match_dot=match_dot[0]; if(match_comma!=null) match_comma=match_comma[0]; if(match_dot==null && match_comma==null) return; var dec_sep='.'; var group_sep =','; match= match_dot; if(match_comma.length > match_dot.length) { dec_sep=','; group_sep ='.'; match =match_comma; } var price = match; txt_old = txt; var price_normalized = ''; if(dec_sep=='.') price_normalized = price.replace(/,/g,''); else price_normalized = price.replace(/\./g,''); price_normalized = price_normalized.replace(/,/g,'.'); var price_new = (price_normalized*rate).toFixed(2); if(2 == 0 && 0 == 0) price_new += '.00'; price_new = price_new.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,"); if(isNaN(price_normalized)) return; if(dec_sep==',') { price_new = price_new.replace(/,/g,'#'); price_new = price_new.replace(/\./g,','); price_new = price_new.replace(/#/g,'.'); } txt = txt.replace(price, price_new); if(ptxt=='\u0020') { if( txt.charAt(txt.length-1) != ptxt) { t.remove(); txt +=' '+ptxt; } else return; } else { if(txt.indexOf(ptxt)<0) { t.remove(); txt +=' '+ptxt; } else return; } parent.text(txt); parent.append(rest); } function htmlentities(str) { str = str.replace('ö', 'ö'); str = str.replace('Ö', 'Ö'); str = str.replace('ä', 'ä'); str = str.replace('Ä', 'Ä'); str = str.replace('ü', 'ü'); str = str.replace('Ü', 'Ü'); return str; } $(document).ready(function(){ getVars(); $('a.quick-buy,a.sca-qv-button,#addToCartText-product-template').click(function(){ setTimeout(function(){ walkElems(); }, 500); }); }); }; if ((typeof jQuery === 'undefined') || (parseFloat(jQuery.fn.jquery) < 3)) { loadScript('//modules4u.biz/shopify/js/jquery/jquery-3.2.1.min.js', function() { jQuery32 = jQuery.noConflict(true); fix(jQuery32); } ); } else { fix(jQuery); } })();