1jQuery(document).ready(function() { 2 jQuery('.product-thumbnail').show(); 3 4 jQuery('#wp2print_billing_addresses').change(function(){ 5 var akey = jQuery(this).val(); 6 if (akey > 0) { 7 wp2print_set_billing_address(akey); 8 } 9 return false; 10 }); 11 12 jQuery('#wp2print_shipping_addresses').change(function(){ 13 var akey = jQuery(this).val(); 14 if (akey > 0) { 15 wp2print_set_shipping_address(akey); 16 } 17 return false; 18 }); 19 if (jQuery('.print-products-area .product-attributes-list .a-help').length) { 20 jQuery('.print-products-area .product-attributes-list .a-help').each(function(){ 21 var awidth = jQuery(this).parent().width() + 29; 22 var aleft = awidth - 14; 23 jQuery(this).find('.a-help-text').css('width', awidth+'px'); 24 jQuery(this).find('.a-help-text').css('margin-left', '-'+aleft+'px'); 25 }); 26 } 27 jQuery('.print-products-area .product-attributes-list .a-help img').hover( 28 function(){ jQuery(this).parent().find('.a-help-text').fadeIn(); }, 29 function(){ jQuery(this).parent().find('.a-help-text').hide(); } 30 ); 31 jQuery('.ma-section-head').click(function(){ 32 var thisdiv = jQuery(this); 33 var reldiv = thisdiv.attr('rel'); 34 if (jQuery('.'+reldiv).is(':visible')) { 35 jQuery('.'+reldiv).slideUp(400, function(){ 36 thisdiv.removeClass('opened'); 37 }); 38 } else { 39 jQuery('.'+reldiv).slideDown(400, function(){ 40 thisdiv.addClass('opened'); 41 }); 42 } 43 }); 44 if (jQuery('.attribute-images').length) { 45 jQuery('.attribute-images img').click(function(){ 46 var relto = jQuery(this).attr('rel'); 47 var iclass = jQuery(this).attr('class').replace(' active', ''); 48 var aterm_id = iclass.replace('attribute-image-', ''); 49 jQuery('.'+relto+' select option').removeAttr('selected'); 50 jQuery('.'+relto+' select option[value="'+aterm_id+'"]').prop('selected', true); 51 jQuery('.'+relto+' select').trigger('change'); 52 matrix_image_aradio(relto, aterm_id); 53 return false; 54 }); 55 jQuery('.matrix-type-simple').each(function(){ 56 jQuery(this).find('.print-attributes .smatrix-attr').each(function(){ 57 var aid = jQuery(this).attr('data-aid'); 58 if (jQuery('.attribute-images-'+aid).length) { 59 if (!jQuery('.attribute-images-'+aid+' img.active').length) { 60 jQuery(this).trigger('change'); 61 } 62 } 63 }); 64 }); 65 jQuery('.matrix-type-finishing').each(function(){ 66 jQuery(this).find('.finishing-attributes .fmatrix-attr').each(function(){ 67 var aid = jQuery(this).attr('data-aid'); 68 if (jQuery('.attribute-images-'+aid).length) { 69 if (!jQuery('.attribute-images-'+aid+' img.active').length) { 70 jQuery(this).trigger('change'); 71 } 72 } 73 }); 74 }); 75 } 76 if (jQuery('.attribute-colors').length) { 77 jQuery('.attribute-colors span').click(function(){ 78 var relto = jQuery(this).attr('rel'); 79 var iclass = jQuery(this).attr('class').replace(' active', ''); 80 var aterm_id = iclass.replace('attribute-color-', ''); 81 jQuery('.'+relto+' select option').removeAttr('selected'); 82 jQuery('.'+relto+' select option[value="'+aterm_id+'"]').prop('selected', true); 83 jQuery('.'+relto+' select').trigger('change'); 84 matrix_image_aradio(relto, aterm_id); 85 return false; 86 }); 87 } 88 jQuery('.upload-artwork-btn').click(function(){ jQuery('.add-cart-form .atc-action').val('artwork'); }); 89 jQuery('.design-online-btn').click(function(){ jQuery('.add-cart-form .atc-action').val('design'); }); 90 jQuery('.simple-add-btn').click(function(){ jQuery('.add-cart-form .atc-action').val('artwork'); }); 91 92 var spiniconnum = 1; 93 if (jQuery('.spinning-icon').length) { 94 var sitimer = setInterval(function() { 95 jQuery('.spinning-icon').each(function(){ 96 var thumb_src = jQuery(this).attr('data-thumb'); 97 var thisid = jQuery(this).attr('id'); 98 var imgspinning = new Image(); 99 imgspinning.src = thumb_src; 100 imgspinning.onload = function() { 101 jQuery('#'+thisid).attr('src', thumb_src); 102 jQuery('#'+thisid).removeClass('spinning-icon').addClass('blitline-img'); 103 jQuery('#'+thisid).parent().attr('href', thumb_src); 104 } 105 }); 106 spiniconnum++; 107 if (spiniconnum >= 6) { 108 jQuery('.spinning-icon').each(function(){ 109 var icon_src = jQuery(this).attr('data-icon'); 110 var file_src = jQuery(this).attr('data-file'); 111 var thisid = jQuery(this).attr('id'); 112 var imgspinning = new Image(); 113 imgspinning.src = icon_src; 114 imgspinning.onload = function() { 115 jQuery('#'+thisid).attr('src', icon_src); 116 jQuery('#'+thisid).removeClass('spinning-icon'); 117 jQuery('#'+thisid).parent().attr('href', file_src); 118 } 119 }); 120 } 121 if (!jQuery('.spinning-icon').length || spiniconnum >= 6) { 122 clearInterval(sitimer); 123 } 124 }, 5000); 125 } 126 var ww = jQuery(window).width(); 127 jQuery('.o-notes .o-notes-more').click(function(){ 128 var tdh = jQuery(this).parent().parent().height(); 129 jQuery('.o-notes-text').hide(); 130 jQuery(this).parent().find('.o-notes-text').css('top', tdh).fadeIn(300); 131 return false;
132 }); 133 jQuery('html').click(function(event) { 134 if (jQuery(event.target).closest('.o-notes .o-notes-more').length === 0) { 135 jQuery('.o-notes-text').hide(); 136 } 137 }); 138 139 // reCaptcha 140 if (jQuery('.g-recaptcha').length) { 141 jQuery('form').each(function(){ 142 if (jQuery(this).find('.g-recaptcha').length) { 143 jQuery(this).find('[type=submit]').attr('disabled', 'disabled'); 144 } 145 }); 146 } 147 wp2print_wcbof_init(); 148 jQuery('.wcbulkordertable .add-to-cart-single').on('click', function() { 149 wp2print_wcbof_init(); 150 }); 151}); 152 153function wp2print_recaptcha() { 154 jQuery('form').each(function(){ 155 if (jQuery(this).find('.g-recaptcha').length) { 156 var grr = jQuery(this).find('.g-recaptcha-response').val(); 157 if (grr != '') { 158 jQuery(this).find('[type=submit]').removeAttr('disabled'); 159 } 160 } 161 }); 162} 163 164function reorder_error() { 165 jQuery('.pp-reorder-error').slideDown(); 166} 167 168function reorder_product_action(item_id, tp) { 169 var rcolor = jQuery('.history-reorder-form-'+item_id+' .reorder-color').val(); 170 jQuery('.history-reorder-form-'+item_id+' .atc-action').val(tp); 171 jQuery('.history-reorder-form-'+item_id+' .redesign-fld').val('false'); 172 if (tp == 'design') { 173 jQuery('.history-reorder-form-'+item_id+' .redesign-fld').val('true'); 174 } 175 if (rcolor == '1') { 176 var tn = jQuery('td.product-tracking-'+item_id).html(); 177 jQuery('.reorder-color-popup .rcp-tracking span').html(tn); 178 jQuery('.reorder-color-popup').data('item-id', item_id); 179 jQuery.colorbox({inline:true, href:"#reorder-color-popup"}); 180 } else { 181 jQuery('.history-reorder-form-'+item_id).submit(); 182 } 183} 184 185function reorder_color_change(o) { 186 var otherval = jQuery('.reorder-color-popup').data('other-value'); 187 var cval = jQuery(o).val(); 188 if (cval == otherval) { 189 jQuery('.reorder-color-popup .other-row').slideDown(200); 190 } else { 191 jQuery('.reorder-color-popup .other-row').slideUp(200); 192 } 193} 194 195function reorder_color_continue() { 196 var item_id = jQuery('.reorder-color-popup').data('item-id'); 197 var otherval = jQuery('.reorder-color-popup').data('other-value'); 198 var othererror = jQuery('.reorder-color-popup').data('other-error'); 199 var cval = jQuery('.reorder-color-popup .rcp-color').val(); 200 if (cval == otherval) { 201 cval = jQuery('.reorder-color-popup .rcp-other').val(); 202 } 203 if (cval) { 204 jQuery('.history-reorder-form-'+item_id+' .reorder-color-value').val(cval); 205 jQuery('.history-reorder-form-'+item_id).submit(); 206 } else { 207 alert(othererror); 208 } 209} 210 211function matrix_aradio(o) { 212 var afield = jQuery(o).attr('rel'); 213 var oval = jQuery(o).val(); 214 if (jQuery(o).is(':checked')) { 215 jQuery('.'+afield+' option').removeAttr('selected'); 216 jQuery('.'+afield+' option[value="'+oval+'"]').prop('selected', true); 217 jQuery('.'+afield).trigger('change'); 218 } 219} 220 221function matrix_image_aradio(orel, aterm_id) { 222 var rarray = orel.split('-'); 223 var mtype_id = rarray[2]; 224 var mattr_id = rarray[3]; 225 if (jQuery('.a-radio-'+mtype_id+'-'+mattr_id).length) { 226 jQuery('.a-radio-'+mtype_id+'-'+mattr_id+' input').removeAttr('checked'); 227 jQuery('.a-radio-'+mtype_id+'-'+mattr_id+' input[value="'+aterm_id+'"]').prop('checked', true); 228 } 229} 230 231function matrix_get_numbers(num, numbers) { 232 var lastnum = num; 233 var matrix_numbers = new Array(); 234 matrix_numbers[0] = 0; 235 matrix_numbers[1] = 0; 236 if (num > 0) { 237 for (var i=0; i<numbers.length; i++) { 238 anumb = parseFloat(numbers[i]); 239 if (num < anumb) { 240 matrix_numbers[0] = lastnum; 241 matrix_numbers[1] = anumb; 242 return matrix_numbers; 243 } else if (num == anumb) { 244 matrix_numbers[0] = anumb; 245 matrix_numbers[1] = anumb; 246 return matrix_numbers; 247 } 248 lastnum = anumb; 249 } 250 if (numbers.length == 1) { 251 matrix_numbers[0] = numbers[0]; 252 } else { 253 matrix_numbers[0] = numbers[numbers.length - 2]; 254 } 255 matrix_numbers[1] = lastnum; 256 } 257 return matrix_numbers; 258} 259 260function matrix_get_price(pmatrix, mval, nmb, nums) { 261 var p = 0; 262 var min_nmb = nums[0]; 263 var max_nmb = nums[1]; 264 if (nmb == min_nmb && nmb < max_nmb) { 265 mval = mval + '-' + max_nmb; 266 if (pmatrix[mval]) { 267 p = (pmatrix[mval] / max_nmb) * nmb; 268 } 269 } else if (nmb == min_nmb && nmb == max_nmb) { 270 mval = mval + '-' + nmb; 271 if (pmatrix[mval]) { 272 p = pmatrix[mval]; 273 } 274 } else if (nmb > min_nmb && nmb < max_nmb) { 275 var min_mval = mval + '-' + min_nmb; 276 var max_mval = mval + '-' + max_nmb; 277 if (pmatrix[min_mval] && pmatrix[max_mval]) { 278 p = pmatrix[min_mval] + (nmb - min_nmb) * (pmatrix[max_mval] - pmatrix[min_mval]) / (max_nmb - min_nmb); 279 } 280 } else if (nmb > min_nmb && nmb > max_nmb) { 281 var min_mval = mval + '-' + min_nmb; 282 var max_mval = mval + '-' + max_nmb; 283 if (pmatrix[min_mval] && pmatrix[max_mval]) { 284 if (min_nmb == max_nmb) { 285 p = pmatrix[max_mval] * nmb; 286 } else { 287 p = pmatrix[max_mval] + (nmb - max_nmb) * (pmatrix[max_mval] - pmatrix[min_mval]) / (max_nmb - min_nmb); 288 } 289 } 290 } 291 return p; 292} 293 294function matrix_aval(val) { 295 if (val) { 296 if (val.indexOf('-') > -1) { val = wp2print_replace(val, '-', '{dc}'); } 297 if (val.indexOf(':') > -1) { val = wp2print_replace(val, ':', '{cc}'); } 298 if (val.indexOf('|') > -1) { val = wp2print_replace(val, '|', '{vc}'); } 299 } 300 return val; 301} 302 303function matrix_get_corrected_num(nmb, nums) { 304 var min_nmb = nums[0]; 305 var max_nmb = nums[1]; 306 if (nmb == min_nmb && nmb < max_nmb) { 307 return min_nmb; 308 } else if (nmb == min_nmb && nmb == max_nmb) { 309 return nmb; 310 } else if (nmb > min_nmb && nmb < max_nmb) { 311 var min_diff = nmb - min_nmb; 312 var max_diff = max_nmb - nmb; 313 if (min_diff < max_diff) { 314 return min_nmb; 315 } else { 316 return max_nmb; 317 } 318 } else if (nmb > min_nmb && nmb > max_nmb) { 319 return max_nmb; 320 } 321} 322 323function matrix_is_pdf_exist() { 324 var pdfs = autoproof_get_pdf_files(); 325 if (pdfs != '') { 326 return true; 327 } 328 return false;
329} 330 331function autoproof_get_pdf_files() { 332 var pdf_files = ''; 333 var artworkfiles = jQuery('.add-cart-form .artwork-files').val(); 334 if (artworkfiles != '') { 335 var fext = '', fsep = ''; 336 var alist = artworkfiles.split(';'); 337 for (var f=0; f<alist.length; f++) { 338 fext = alist[f].substring(alist[f].length - 3); 339 if (fext == 'pdf' || fext == 'PDF') { 340 pdf_files = pdf_files + fsep + alist[f]; 341 fsep = ';'; 342 } 343 } 344 } 345 return pdf_files; 346} 347 348function wp2print_set_billing_address(akey) { 349 var avals = wp2print_billing_address[akey].split('|'); 350 jQuery('#billing_first_name').val(avals[0]); 351 jQuery('#billing_last_name').val(avals[1]); 352 jQuery('#billing_company').val(avals[2]); 353 jQuery('#billing_country').val(avals[3]).change(); 354 jQuery("#billing_country_chosen").find('span').html(jQuery('#billing_country option[value="'+avals[3]+'"]').text()); 355 jQuery('#billing_address_1').val(avals[4]); 356 jQuery('#billing_address_2').val(avals[5]); 357 jQuery('#billing_city').val(avals[6]); 358 jQuery('#billing_state').val(avals[7]); 359 jQuery('#billing_postcode').val(avals[8]); 360 jQuery('#billing_phone').val(avals[9]); 361 362 jQuery('#group_billing_email').val(avals[10]); 363 jQuery('#group_billing_nosend').val(avals[11]); 364 365 jQuery('#billing_state option').removeAttr('selected'); 366 jQuery('#billing_state option[value="'+avals[7]+'"]').prop('selected', true); 367 var sname = jQuery('#billing_state option[value="'+avals[7]+'"]').text(); 368 jQuery('#select2-billing_state-container').html(sname); 369} 370 371function wp2print_set_shipping_address(akey) { 372 var avals = wp2print_shipping_address[akey].split('|'); 373 jQuery('#shipping_first_name').val(avals[0]); 374 jQuery('#shipping_last_name').val(avals[1]); 375 jQuery('#shipping_company').val(avals[2]); 376 jQuery('#shipping_country').val(avals[3]).change(); 377 jQuery("#shipping_country_chosen").find('span').html(jQuery('#shipping_country option[value="'+avals[3]+'"]').text()); 378 jQuery('#shipping_address_1').val(avals[4]); 379 jQuery('#shipping_address_2').val(avals[5]); 380 jQuery('#shipping_city').val(avals[6]); 381 jQuery('#shipping_state').val(avals[7]); 382 jQuery('#shipping_postcode').val(avals[8]); 383 384 jQuery('#shipping_state option').removeAttr('selected'); 385 jQuery('#shipping_state option[value="'+avals[7]+'"]').prop('selected', true); 386 var sname = jQuery('#shipping_state option[value="'+avals[7]+'"]').text(); 387 jQuery('#select2-shipping_state-container').html(sname); 388} 389 390function wp2print_trim(str) { 391 if (str != 'undefined') { 392 return str.replace(/^\s+|\s+$/g,""); 393 } else { 394 return ''; 395 } 396} 397 398function wp2print_wwof(pid, o) { 399 var n = jQuery(o).val(); 400 jQuery(o).parent().find('input[name="quantity"]').val(n); 401 jQuery('.wp2print-wwof-prices-'+pid+' span.price').hide(); 402 jQuery('.wp2print-wwof-prices-'+pid+' span.price-qty-'+n).fadeIn(); 403} 404 405function wp2print_wcbof(pid, o) { 406 var n = jQuery(o).val(); 407 jQuery(o).parent().find('input.product_qty').val(n).trigger('change'); 408 jQuery('.wp2print-wwof-prices-'+pid+' span.price').hide(); 409 jQuery('.wp2print-wwof-prices-'+pid+' span.price-qty-'+n).fadeIn(); 410} 411 412function wp2print_wcbof_init() { 413 if (jQuery('.wcbulkordertable select.wp2print-wwof-qty').length) { 414 setTimeout(function(){ 415 jQuery('.wcbulkordertable select.wp2print-wwof-qty').each(function(){ 416 var n = parseInt(jQuery(this).val()); 417 if (n) { 418 jQuery(this).parent().find('input.product_qty').val(n).trigger('change'); 419 } 420 }); 421 }, 1000); 422 } 423} 424 425function wp2print_email_quote() { 426 var eqerror = ''; 427 var email = wp2print_trim(jQuery('.email-quote-box .eq-email').val()); 428 if (email == '') { 429 eqerror = 'empty'; 430 } else if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(email)) { 431 eqerror = 'incorrect'; 432 } 433 jQuery('.email-quote-box .eq-errors, .email-quote-box .eq-errors span').hide(); 434 if (eqerror == '') { 435 var ptype = jQuery('.add-cart-form input.product-type').val(); 436 wp2print_email_quote_request(email, ptype); 437 jQuery('.email-quote-box .eq-success').slideDown(); 438 setTimeout(function(){ jQuery('.email-quote-box .eq-success').slideUp(); }, 5000); 439 } else { 440 jQuery('.email-quote-box .eq-errors .error-'+eqerror).show(); 441 jQuery('.email-quote-box .eq-errors').slideDown(); 442 } 443} 444 445function wp2print_email_quote_request(email, tp) { 446 var site_url = jQuery('.email-quote-box .email-quote-form').attr('action'); 447 var product_id = jQuery('.add-cart-form input.product-id').val(); 448 var quantity = jQuery('.add-cart-form .quantity').val(); 449 var smparams = jQuery('.add-cart-form .sm-params').val(); 450 var fmparams = jQuery('.add-cart-form .fm-params').val(); 451 var price = jQuery('.add-cart-form .p-price').val(); 452 var fnonce = jQuery('.email-quote-form .form-nonce').val(); 453 var ajax_nonce = jQuery('.email-quote-form .ajax-nonce').val(); 454 455 var pspeed = ''; 456 if (jQuery('select.production-speed').length) { 457 pspeed = jQuery('select.production-speed').val(); 458 } 459 460 var rparams = {action: 'email-quote-send', email: email, product_id: product_id, product_type: tp, quantity: quantity, smparams: smparams, fmparams: fmparams, pspeed: pspeed, price: price, form_nonce: fnonce, _ajax_nonce: ajax_nonce}; 461 462 if (tp == 'area') { 463 rparams.width = jQuery('.add-cart-form .width').val(); 464 rparams.height = jQuery('.add-cart-form .height').val(); 465 } else if (tp == 'box') { 466 rparams.width = jQuery('.add-cart-form .width').val(); 467 rparams.height = jQuery('.add-cart-form .height').val(); 468 rparams.length = jQuery('.add-cart-form .length').val(); 469 } else if (tp == 'book') { 470 var pagesqty = ''; 471 jQuery('.add-cart-form .quantity').each(function(){ 472 if (pagesqty != '') { pagesqty += ';'; } 473 pagesqty += jQuery(this).val(); 474 }); 475 rparams.booksqty = jQuery('.add-cart-form .books-quantity').val(); 476 rparams.pagesqty = pagesqty; 477 } else if (tp == 'aec' || tp == 'aecsimple') { 478 rparams.project_name = jQuery('.add-cart-form .aec-project-name').val(); 479 rparams.total_price = jQuery('.add-cart-form .aec-total-price').val(); 480 rparams.total_area = jQuery('.add-cart-form .aec-total-area').val(); 481 rparams.total_pages = jQuery('.add-cart-form .aec-total-pages').val(); 482 } else if (tp == 'aecbwc') { 483 rparams.project_name = jQuery('.add-cart-form .aec-project-name').val(); 484 rparams.total_price = jQuery('.add-cart-form .aec-total-price').val(); 485 rparams.total_area = jQuery('.add-cart-form .aec-total-area').val(); 486 rparams.total_pages = jQuery('.add-cart-form .aec-total-pages').val(); 487 rparams.area_bw = jQuery('.add-cart-form .aec-area-bw').val(); 488 rparams.pages_bw = jQuery('.add-cart-form .aec-pages-bw').val(); 489 rparams.area_cl = jQuery('.add-cart-form .aec-area-cl').val(); 490 rparams.pages_cl = jQuery('.add-cart-form .aec-pages-cl').val(); 491 } 492 493 jQuery.post(wp2print_ajaxurl, rparams); 494} 495 496function wp2print_replace(s, f, r) { 497 return s.replace(new RegExp(f, 'gi'), r); 498} 499 500function wp2print_clear_fname(s) { 501 s = s.toLowerCase(); 502 s = s.replace(/ /g, ''); 503 s = s.replace(/[&\/\\#,+()$~%'":*?<>{}^@!]/g, ''); 504 s = wp2print_transliterate(s); 505 s = s.replace(/[^\x00-\x7F]/g, ''); 506 s = encodeURI(s); 507 s = s.replace(/[%]/g, ''); 508 return s; 509} 510 511var wp2print_transliterate = function(text) { 512 text = text 513 .replace(/\u042A/g, '-') 514 .replace(/\u0451/g, 'yo') 515 .replace(/\u0439/g, 'i')
516 .replace(/\u0446/g, 'ts') 517 .replace(/\u0443/g, 'u') 518 .replace(/\u043A/g, 'k') 519 .replace(/\u0435/g, 'e') 520 .replace(/\u043D/g, 'n') 521 .replace(/\u0433/g, 'g') 522 .replace(/\u0448/g, 'sh') 523 .replace(/\u0449/g, 'sch') 524 .replace(/\u0437/g, 'z') 525 .replace(/\u0445/g, 'h') 526 .replace(/\u044A/g, '-') 527 .replace(/\u0410/g, 'a') 528 .replace(/\u0444/g, 'f') 529 .replace(/\u044B/g, 'i') 530 .replace(/\u0432/g, 'v') 531 .replace(/\u0430/g, 'a') 532 .replace(/\u043F/g, 'p') 533 .replace(/\u0440/g, 'r') 534 .replace(/\u043E/g, 'o') 535 .replace(/\u043B/g, 'l') 536 .replace(/\u0434/g, 'd') 537 .replace(/\u0436/g, 'zh') 538 .replace(/\u044D/g, 'e') 539 .replace(/\u042C/g, '-') 540 .replace(/\u044F/g, 'a') 541 .replace(/\u0447/g, 'ch') 542 .replace(/\u0441/g, 's') 543 .replace(/\u043C/g, 'm') 544 .replace(/\u0438/g, 'i') 545 .replace(/\u0442/g, 't') 546 .replace(/\u044C/g, '-') 547 .replace(/\u0431/g, 'b') 548 .replace(/\u044E/g, 'u'); 549 550 return text; 551}; 552 553if (jQuery('.woocommerce-MyAccount-content .ois-order-status').length) { 554 jQuery('.woocommerce-MyAccount-content mark.order-number').parent().remove(); 555} 556 557function matrix_printess() { 558 if (jQuery('#printess-customize-button').length && jQuery('.matrix-type-simple').length) { 559 var mtobj = jQuery('.matrix-type-simple').eq(0); 560 var pt_templ_key = ''; 561 if (mtobj.find('.print-attributes .smatrix-size').length) { 562 pt_templ_key = parseInt(mtobj.find('.print-attributes .smatrix-size').eq(0).val()); 563 } 564 if (mtobj.find('.print-attributes .smatrix-colour').length) { 565 if (pt_templ_key != '') { pt_templ_key = pt_templ_key + '-'; } 566 pt_templ_key = pt_templ_key + parseInt(mtobj.find('.print-attributes .smatrix-colour').eq(0).val()); 567 } 568 if (mtobj.find('.print-attributes .smatrix-pagecount').length) { 569 if (pt_templ_key != '') { pt_templ_key = pt_templ_key + '-'; } 570 pt_templ_key = pt_templ_key + parseInt(mtobj.find('.print-attributes .smatrix-pagecount').eq(0).val()); 571 } 572 if (pt_templ_key) { 573 if (pt_templates[pt_templ_key] != undefined) { 574 pt_template_name = pt_templates[pt_templ_key]; 575 } 576 } 577 } 578} 579 580function wp2print_get_price_with_tax(product_id, price, ajax_nonce) { 581 jQuery.post(wp2print_ajaxurl, 582 { 583 action: 'product-get-price-with-tax', 584 product_id: product_id, 585 price: price, 586 _ajax_nonce: ajax_nonce 587 }, 588 function(data) { 589 var pricewithtax = parseFloat(data); 590 jQuery('.product-attributes .price-incl-tax .pprice').html(matrix_html_price(pricewithtax)); 591 } 592 ); 593}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.