www.printonline.ae
Open in
urlscan Pro
192.124.249.27
Public Scan
URL:
https://www.printonline.ae/nfc-business-cards.html
Submission: On January 05 via manual from AE — Scanned from DE
Submission: On January 05 via manual from AE — Scanned from DE
Form analysis
4 forms found in the DOMGET https://www.printonline.ae/catalogsearch/result/
<form id="search_mini_form" action="https://www.printonline.ae/catalogsearch/result/" method="get" class="searchautocomplete UI-SEARCHAUTOCOMPLETE" data-tip="Search PrintOnline.ae" data-url="//www.printonline.ae/searchautocomplete/ajax/get/"
data-minchars="2" data-delay="500" data-hide-delay="1000">
<div class="form-search">
<label for="search">Search:</label>
<input id="search" type="text" autocomplete="off" name="q" value="" class="input-text UI-SEARCH UI-NAV-INPUT" maxlength="128">
<button type="submit" title="Search" class="button search-button"><span><span>Search</span></span></button>
<div class="searchautocomplete-loader UI-LOADER">
<div id="g01"></div>
<div id="g02"></div>
<div id="g03"></div>
<div id="g04"></div>
<div id="g05"></div>
<div id="g06"></div>
<div id="g07"></div>
<div id="g08"></div>
</div>
<div style="display:none; top:50px" id="search_autocomplete" class="UI-PLACEHOLDER search-autocomplete searchautocomplete-placeholder"></div>
</div>
</form>
GET https://www.printonline.ae/catalogsearch/result/
<form id="search_mini_form" action="https://www.printonline.ae/catalogsearch/result/" method="get" class="searchautocomplete UI-SEARCHAUTOCOMPLETE" data-tip="Search PrintOnline.ae" data-url="//www.printonline.ae/searchautocomplete/ajax/get/"
data-minchars="2" data-delay="500" data-hide-delay="1000">
<div class="form-search">
<label for="search">Search:</label>
<input id="search" type="text" autocomplete="off" name="q" value="" class="input-text UI-SEARCH UI-NAV-INPUT" maxlength="128">
<button type="submit" title="Search" class="button search-button"><span><span>Search</span></span></button>
<div class="searchautocomplete-loader UI-LOADER">
<div id="g01"></div>
<div id="g02"></div>
<div id="g03"></div>
<div id="g04"></div>
<div id="g05"></div>
<div id="g06"></div>
<div id="g07"></div>
<div id="g08"></div>
</div>
<div style="display:none; top:50px" id="search_autocomplete" class="UI-PLACEHOLDER search-autocomplete searchautocomplete-placeholder"></div>
</div>
</form>
POST https://www.printonline.ae/pd/design/index/id/3775/
<form action="https://www.printonline.ae/pd/design/index/id/3775/" method="post" id="product_addtocart_form" enctype="multipart/form-data">
<input name="form_key" type="hidden" value="krUXu5cA6y9aDV2p">
<div class="no-display">
<input type="hidden" name="product" value="3775">
<input type="hidden" name="related_product" id="related-products-field" value="">
</div>
<div class="product-img-box col-xs-12 col-lg-8 col-sm-6">
<div class="product-name">
<h1>Smart Business Cards | NFC technology</h1>
</div>
<div id="gallery" style="max-width: 100%; min-width: 150px; height: 660px; width: auto;"
data-imagezoom="{"active":"1","zoom_variant":"unitegallery","unite_skin":"default","unite_strippanel_enable":"0","unite_panel_position":"left","unite_thumb_width":"100","unite_thumb_height":"100","unite_arrows":"1","unite_fullscreen":"0","unite_fullwindow":"0","unite_zoom_panel":"1","unite_play":"0","unite_play_interval":"5000","unite_pause_on_mouseover":"0","unite_controls_always_on":"0"}"
class="ug-gallery-wrapper ug-under-780 ug-theme-grid">
<div class="ug-overlay-disabled" style="display:none"></div>
<div class="ug-strip-panel" style="width: 120px; height: 660px; position: absolute; margin: 0px; left: 0px; top: 0px;">
<div class="ug-strip-arrow ug-strip-arrow-up ug-skin-default ug-button-disabled" style="width: 100px; position: absolute; margin: 0px; left: 10px; top: 0px;">
<div class="ug-strip-arrow-tip" style="position: absolute; margin: 0px; left: 0px; top: 0px;"></div>
</div>
<div class="ug-strip-arrow ug-strip-arrow-down ug-skin-default ug-button-disabled" style="width: 100px; position: absolute; margin: 0px; left: 10px; top: 660px;">
<div class="ug-strip-arrow-tip" style="position: absolute; margin: 0px; left: 0px; top: 0px;"></div>
</div>
<div class="ug-thumbs-strip" style="width: 100px; height: 650px; position: absolute; margin: 0px; left: 10px; top: 5px;">
<div class="ug-thumbs-strip-inner" style="width: 100px; height: 344px; position: absolute; margin: 0px; left: 0px; top: 0px;">
<div class="ug-thumb-wrapper ug-thumb-generated ug-thumb-selected" style="width: 100px; height: 100px; position: absolute; margin: 0px; left: 0px; top: 0px;">
<div class="ug-thumb-loader ug-thumb-loader-dark" style="width: 100px; height: 100px; display: none;"></div>
<div class="ug-thumb-error" style="display: none; width: 100px; height: 100px;"></div><img src="https://www.printonline.ae/media/catalog/product/cache/1/thumbnail/100x100/9df78eab33525d08d6e5fb8d27136e95/n/f/nfc_newaa_copy.jpg"
alt="<div style="background-color:black;color:white;padding:10px;display: block;font-size:135%;"><a href="https://bit.ly/businesscards_templates" target="_blank">Click here for more ideas & templates</a></div>"
itemprop="image" class="ug-thumb-image" style="opacity: 1; width: 100px; height: 100px; left: 0px; top: 0px;">
</div>
<div class="ug-thumb-wrapper ug-thumb-generated" style="width: 100px; height: 100px; position: absolute; margin: 0px; left: 0px; top: 122px;">
<div class="ug-thumb-loader ug-thumb-loader-dark" style="width: 100px; height: 100px; display: none;"></div>
<div class="ug-thumb-error" style="display: none; width: 100px; height: 100px;"></div><img src="https://www.printonline.ae/media/catalog/product/cache/1/thumbnail/100x100/9df78eab33525d08d6e5fb8d27136e95/f/i/final_1.jpeg"
alt="<div style="background-color:black;color:white;padding:10px;display: block;font-size:135%;"><a href="https://bit.ly/businesscards_templates" target="_blank">Click here for more ideas & templates</a></div>"
itemprop="image" class="ug-thumb-image" style="opacity: 1; width: 100px; height: 100px; left: 0px; top: 0px;">
</div>
<div class="ug-thumb-wrapper ug-thumb-generated" style="width: 100px; height: 100px; position: absolute; margin: 0px; left: 0px; top: 244px;">
<div class="ug-thumb-loader ug-thumb-loader-dark" style="width: 100px; height: 100px; display: none;"></div>
<div class="ug-thumb-error" style="display: none; width: 100px; height: 100px;"></div><img src="https://www.printonline.ae/media/catalog/product/cache/1/thumbnail/100x100/9df78eab33525d08d6e5fb8d27136e95/t/a/tapandsave_2.jpg"
alt="<div style="background-color:black;color:white;padding:10px;display: block;font-size:135%;"><a href="https://bit.ly/businesscards_templates" target="_blank">Click here for more ideas & templates</a></div>"
itemprop="image" class="ug-thumb-image" style="opacity: 1; width: 100px; height: 100px; left: 0px; top: 0px;">
</div>
</div>
</div>
</div>
<div class="ug-slider-wrapper" style="width: 650px; height: 660px; position: absolute; margin: 0px; left: 120px; top: 0px;">
<div class="ug-slider-inner" style="height: 660px; top: 0px; left: -650px; width: 1950px;">
<div class="ug-slide-wrapper ug-slide1" style="height: 660px; width: 650px; display: block; z-index: 2; position: absolute; margin: 0px; left: 0px; top: 0px; opacity: 1;">
<div class="ug-item-wrapper" style="width: 650px; height: 660px; top: 0px; left: 0px;"><img style="display: block; margin: 0px; height: 650px; opacity: 1; width: 650px; top: 5px; left: 0px; position: absolute;"
src="https://www.printonline.ae/media/catalog/product/cache/1/image/1800x/5ebd91fbb2977711334c8748990c7905/t/a/tapandsave_2.jpg"></div>
<div class="ug-slider-preloader ug-loader1" style="position: absolute; margin: 0px; left: 310px; top: 315px; display: none;"></div>
<div class="ug-button-videoplay ug-type-square" style="display: none; position: absolute; margin: 0px; left: 282px; top: 297px;"></div>
</div>
<div class="ug-slide-wrapper ug-slide2" style="height: 660px; width: 650px; z-index: 3; position: absolute; margin: 0px; left: 650px; top: 0px;">
<div class="ug-item-wrapper" style="width: 650px; height: 660px; top: 0px; left: 0px;"><img style="display: block; margin: 0px; height: 650px; opacity: 1; width: 650px; position: absolute; left: 0px; top: 5px;"
src="https://www.printonline.ae/media/catalog/product/cache/1/image/1800x/5ebd91fbb2977711334c8748990c7905/n/f/nfc_newaa_copy.jpg"></div>
<div class="ug-slider-preloader ug-loader1" style="position: absolute; margin: 0px; left: 310px; top: 315px; display: none;"></div>
<div class="ug-button-videoplay ug-type-square" style="display: none; position: absolute; margin: 0px; left: 282px; top: 297px;"></div>
</div>
<div class="ug-slide-wrapper ug-slide3" style="height: 660px; width: 650px; display: block; opacity: 1; position: absolute; margin: 0px; left: 1300px; top: 0px;">
<div class="ug-item-wrapper" style="width: 650px; height: 660px; top: 0px; left: 0px;"><img style="display: block; margin: 0px; height: 650px; opacity: 1; width: 650px; top: 5px; left: 0px; position: absolute;"
src="https://www.printonline.ae/media/catalog/product/cache/1/image/1800x/5ebd91fbb2977711334c8748990c7905/f/i/final_1.jpeg"></div>
<div class="ug-slider-preloader ug-loader1" style="position: absolute; margin: 0px; left: 310px; top: 315px; display: none;"></div>
<div class="ug-button-videoplay ug-type-square" style="display: none; position: absolute; margin: 0px; left: 282px; top: 297px;"></div>
</div>
<div class="ug-videoplayer" style="display: none; width: 650px; height: 660px;">
<div class="ug-videoplayer-wrapper ug-videoplayer-youtube" style="display:none">
<div id="gallery_youtube_inner"></div>
</div>
<div id="gallery_videoplayer_vimeo" class="ug-videoplayer-wrapper ug-videoplayer-vimeo" style="display:none"></div>
<div id="gallery_videoplayer_html5" class="ug-videoplayer-wrapper ug-videoplayer-html5"></div>
<div id="gallery_videoplayer_soundcloud" class="ug-videoplayer-wrapper ug-videoplayer-soundcloud"></div>
<div id="gallery_videoplayer_wistia" class="ug-videoplayer-wrapper ug-videoplayer-wistia"></div>
<div class="ug-videoplayer-button-close" style="position: absolute; margin: 0px; left: 586px; top: 0px;"></div>
</div>
</div>
<div class="ug-slider-control ug-arrow-left ug-skin-default" style="position: absolute; margin: 0px; left: 20px; top: 330px; opacity: 0; display: none;"></div>
<div class="ug-slider-control ug-arrow-right ug-skin-default" style="position: absolute; margin: 0px; left: -20px; top: 330px; opacity: 0; display: none;"></div><canvas class="ug-canvas-pie" width="30" height="30"
style="display: none; position: absolute; margin: 0px; left: 570px; top: 50px;"></canvas>
<div class="ug-textpanel" style="width: 650px; height: 64px; top: auto; bottom: 0px; opacity: 0;">
<div class="ug-textpanel-textwrapper" style="width: 628px; height: 64px; left: 11px; top: 0px; position: absolute; margin: 0px;">
<div class="ug-textpanel-title" style="width: 628px; position: absolute; margin: 0px; left: 0px; top: 10px;">
<div style="background-color:black;color:white;padding:10px;display: block;font-size:135%;"><a href="https://bit.ly/businesscards_templates" target="_blank">Click here for more ideas & templates</a></div>
</div>
</div>
</div>
<div class="ug-slider-control ug-zoompanel ug-skin-default" style="opacity: 0; display: none; position: absolute; margin: 0px; left: 639px; top: 40px;">
<div class="ug-zoompanel-button ug-zoompanel-plus"></div>
<div class="ug-zoompanel-button ug-zoompanel-minus"></div>
<div class="ug-zoompanel-button ug-zoompanel-return"></div>
</div>
</div>
</div>
<div class="wa_div"><a href="https://api.whatsapp.com/send?text=https%3A%2F%2Fwww.printonline.ae%2Fnfc-business-cards.html%3F___SID%3DU%0D%0A%0D%0AHey%2C Check out this product I liked on Printonline.ae%0D%0A%0D%0ASmart Business Cards %7C NFC technology%0D%0A%0D%0AAED 150%0D%0A%0D%0A" target="_blank" data-action="share/whatsapp/share">
<span class="largeWhatsapp"></span>
</a></div>
</div>
<div class="col-xs-12 col-lg-4 col-sm-6">
<div class="product-shop">
<!-- center mode -->
<!-- /center mode -->
<div class="additional-info">
<div class="product-sku">Product Code: <span class="sku-number">MGK_LBL_ELE#02</span></div>
<div class="clear"></div>
</div>
<div class="product-name secondary" itemprop="name">
<span class="h1">Smart Business Cards | NFC technology</span>
</div>
<div class="extra-info">
</div>
<div class="price-info" itemprop="price">
<div class="price-box">
<strong>Starting From:</strong><br>
<span class="regular-price" id="product-price-3775">
<span class="price">AED150.00</span> </span>
</div>
</div>
<div class="clear"></div>
<div class="product-options" id="product-options-wrapper">
<script type="text/javascript">
//<![CDATA[
var DateOption = Class.create({
getDaysInMonth: function(month, year) {
var curDate = new Date();
if (!month) {
month = curDate.getMonth();
}
if (2 == month && !year) { // leap year assumption for unknown year
return 29;
}
if (!year) {
year = curDate.getFullYear();
}
return 32 - new Date(year, month - 1, 32).getDate();
},
reloadMonth: function(event) {
var selectEl = event.findElement();
var idParts = selectEl.id.split("_");
if (idParts.length != 3) {
return false;
}
var optionIdPrefix = idParts[0] + "_" + idParts[1];
var month = parseInt($(optionIdPrefix + "_month").value);
var year = parseInt($(optionIdPrefix + "_year").value);
var dayEl = $(optionIdPrefix + "_day");
var days = this.getDaysInMonth(month, year);
//remove days
for (var i = dayEl.options.length - 1; i >= 0; i--) {
if (dayEl.options[i].value > days) {
dayEl.remove(dayEl.options[i].index);
}
}
// add days
var lastDay = parseInt(dayEl.options[dayEl.options.length - 1].value);
for (i = lastDay + 1; i <= days; i++) {
this.addOption(dayEl, i, i);
}
},
addOption: function(select, text, value) {
var option = document.createElement('OPTION');
option.value = value;
option.text = text;
if (select.options.add) {
select.options.add(option);
} else {
select.appendChild(option);
}
}
});
dateOption = new DateOption();
//]]>
</script>
<style type="text/css">
.option div.container-swatch-color {
display: inline-block;
width: 50px;
height: 50px;
}
</style>
<!--[if lte IE 7]>
<style type="text/css">
.option li.swatch {float:left;}
</style>
<![endif]-->
<script type="text/javascript">
//<![CDATA[
var optionFileUpload = {
productForm: $('product_addtocart_form'),
formAction: '',
formElements: {},
upload: function(element) {
this.formElements = this.productForm.getElementsBySelector('input', 'select', 'textarea', 'button');
this.removeRequire(element.readAttribute('id').sub('option_', ''));
template = '<iframe id="upload_target" name="upload_target" style="width:0; height:0; border:0;"><\/iframe>';
Element.insert($('option_' + element.readAttribute('id').sub('option_', '') + '_uploaded_file'), {
after: template
});
this.formAction = this.productForm.action;
this.productForm.action = 'https://www.printonline.ae/catalog/product/upload/option_id/' + element.readAttribute('id').sub('option_', '');
this.productForm.target = 'upload_target';
this.productForm.submit();
this.productForm.target = '';
this.productForm.action = this.formAction;
},
removeRequire: function(skipElementId) {
for (var i = 0; i < this.formElements.length; i++) {
if (this.formElements[i].readAttribute('id') != 'option_' + skipElementId + '_file' && this.formElements[i].type != 'button') {
this.formElements[i].disabled = 'disabled';
}
}
},
addRequire: function(skipElementId) {
for (var i = 0; i < this.formElements.length; i++) {
if (this.formElements[i].readAttribute('name') != 'options_' + skipElementId + '_file' && this.formElements[i].type != 'button') {
this.formElements[i].disabled = '';
}
}
},
uploadCallback: function(data) {
this.addRequire(data.optionId);
$('upload_target').remove();
if (data.error) {} else {
$('option_' + data.optionId + '_uploaded_file').value = data.fileName;
$('option_' + data.optionId + '_file').value = '';
$('option_' + data.optionId + '_file').hide();
$('option_' + data.optionId + '').hide();
template = '<div id="option_' + data.optionId + '_file_box"><a href="#"><img src="var/options/' + data.fileName + '"><\/a><a href="#" onclick="optionFileUpload.removeFile(' + data.optionId + ')">Remove file<\/a>';
Element.insert($('option_' + data.optionId + '_uploaded_file'), {
after: template
});
}
},
removeFile: function(optionId) {
$('option_' + optionId + '_uploaded_file').value = '';
$('option_' + optionId + '_file').show();
$('option_' + optionId + '').show();
$('option_' + optionId + '_file_box').remove();
}
};
var optionTextCounter = {
count: function(field, cntfield, maxlimit) {
if (field.value.length > maxlimit) {
field.value = field.value.substring(0, maxlimit);
} else {
cntfield.innerHTML = maxlimit - field.value.length;
}
}
};
Product.Options = Class.create();
Product.Options.prototype = {
initialize: function(config) {
this.config = config;
this.reloadPrice();
},
taxOptions: [],
productTax: false,
getProductQty: function() {
var qty = 1;
if ($('qty') && !isNaN(parseInt($('qty').getValue()))) {
var qty = parseInt($('qty').getValue());
if (qty <= 0) qty = 1;
}
return qty;
},
getProductPriceByQty: function() {
if (this.productTax === false) this.productTax = optionsPrice.currentTax;
var prQty = this.getProductQty();
var prPrice = 150;
return prPrice;
},
getOptionPriceByQty: function(opConfig, opQty, optionId, valueId, price) {
var opPrice = parseFloat(opConfig['price']);
var minQty = parseFloat(opConfig['min_qty']);
if (opConfig['price_type'] == 'percent' && opPrice != 0) {
opPrice = this.getProductPriceByQty() * (opPrice / 100);
} else if (opConfig['price_type'] == 'optperc' && opPrice != 0) {
opPrice = price * (opPrice / 100);
}
var prQty = this.getProductQty();
if (isNaN(opQty)) opQty = 1;
if (opQty < minQty) {
opQty = minQty;
}
opPrice = this.getOptionTierPrice(opConfig, prQty, opQty, optionId, opPrice);
/* if (typeof(opConfig['tier_prices']!='undefined')) {
for (var tierQty in opConfig['tier_prices']) {
if (!opConfig['tier_prices'].hasOwnProperty(tierQty)) continue;
if ((this.config[optionId]['is_onetime']==0 && prQty*opQty >= tierQty) || (opQty >= tierQty)) {
opPrice = parseFloat(opConfig['tier_prices'][tierQty]);
}
}
}
*/
var totalOpPrice = opPrice * opQty;
if (this.config[optionId]['is_onetime'] == 0) {
totalOpPrice = totalOpPrice * prQty;
} else {
totalOpPrice = opPrice;
}
if (totalOpPrice > 0 && typeof(opConfig['tax']) != 'undefined') {
this.taxOptions.push([opConfig['tax'], totalOpPrice]);
}
return totalOpPrice;
},
setOptionPrice: function() {
var optionCurrentPriceContainers = $$('.option_current_price');
for (i = 0; i < optionCurrentPriceContainers.length; i++) {
var currentOptionId = optionCurrentPriceContainers[i].id.substring(21);
optionCurrentPriceContainers[i].innerHTML = 'AED' + parseFloat($('value_option_' + currentOptionId).value).toFixed(2);
}
},
getOptionTierPrice: function(opConfig, prQty, opQty, optionId, oldPrice) {
var opPrice = oldPrice;
if (typeof(opConfig['tier_prices'] != 'undefined')) {
if (this.config[optionId]['is_onetime'] == 0) {
for (var tierQty in opConfig['tier_prices']) {
if (!opConfig['tier_prices'].hasOwnProperty(tierQty)) continue;
if ((this.config[optionId]['is_onetime'] == 0 && prQty * opQty >= tierQty) || (opQty >= tierQty)) {
opPrice = parseFloat(opConfig['tier_prices'][tierQty]);
}
}
} else if (this.config[optionId]['is_onetime'] == 1) {
for (var tierQty in opConfig['tier_prices']) {
if (!opConfig['tier_prices'].hasOwnProperty(tierQty)) continue;
if (prQty * opQty >= tierQty) {
opPrice = parseFloat(opConfig['tier_prices'][tierQty]);
}
}
}
}
return opPrice;
},
getOldOptionPriceByQty: function(opConfig, opQty, optionId) {
if (opConfig['old_price'] > 0) {
var opPrice = parseFloat(opConfig['old_price']);
} else {
var opPrice = parseFloat(opConfig['price']);
}
if (opConfig['price_type'] == 'percent' && opPrice != 0) {
opPrice = 150 * (opPrice / 100);
}
var prQty = this.getProductQty();
if (isNaN(opQty)) opQty = 1;
if (this.config[optionId]['is_onetime'] == 0) return opPrice * prQty * opQty;
return opPrice * opQty;
},
getOptionTierPriceHTML: function(el, opConfig) {
var opPrice = parseFloat(opConfig['price']);
var tierPrice = 0;
var tierSaved = 0;
var tierHTML = '<ul id="option_tier_prices_' + el.value + '" class="tier-prices product-pricing" style="width:250px;">';
for (var tierQty in opConfig['tier_prices']) {
if (!opConfig['tier_prices'].hasOwnProperty(tierQty)) continue;
tierPrice = Math.round(opConfig['tier_prices'][tierQty] * 100) / 100;
tierSaved = parseInt(100 - ((parseFloat(tierPrice) * 100) / opPrice));
tierHTML += '<li>Buy ' + tierQty + ' for <span class="price">AED' + tierPrice + '</span> each and <strong class="benefit">save ' + tierSaved + '%</strong></li>';
}
tierHTML += '</ul>';
return tierHTML;
},
reloadOptionTierPriceBlock: function(el) {
var optionId = 0;
el.name.sub(/[0-9]+/, function(match) {
optionId = match[0];
});
if (!optionId) return false;
if (el.type == 'radio' || el.type == 'checkbox') {
if (!el.value) return false;
if (el.checked) {
if (!$('option_tier_prices_' + el.value) && typeof(this.config[optionId][el.value]['tier_prices']) != 'undefined') {
Element.insert(el.up('li'), {
'bottom': this.getOptionTierPriceHTML(el, this.config[optionId][el.value])
});
}
} else {
if ($('option_tier_prices_' + el.value)) {
$('option_tier_prices_' + el.value).remove();
}
}
} else if (el.type == 'select-one' || el.type == 'select-multiple') {
$A(el.options).each(function(selOp) {
if (selOp.value) {
if (selOp.selected) {
if (!$('option_tier_prices_' + selOp.value) && typeof(this.config[optionId][selOp.value]['tier_prices']) != 'undefined') {
Element.insert(el.up('dd'), {
'bottom': this.getOptionTierPriceHTML(selOp, this.config[optionId][selOp.value])
});
}
} else {
if ($('option_tier_prices_' + selOp.value)) {
$('option_tier_prices_' + selOp.value).remove();
}
}
}
}.bind(this));
}
},
reloadOptionPriceToTierPrice: function(el) {
var optionId = 0;
el.name.sub(/[0-9]+/, function(match) {
optionId = match[0];
});
if (!optionId) return false;
var priceSymbol = "AED";
if (el.type == 'select-one') {
$A(el.options).each(function(selOp) {
if (selOp.value) {
if (selOp.selected) {
var configOptions = this.config[optionId];
var productQty = this.getProductQty();
if ($('options_' + optionId + '_qty')) optionQty = parseInt($('options_' + optionId + '_qty').value);
else optionQty = 1;
var originalOptionPrice = configOptions[el.getValue()]['price'];
var opPrice = this.getOptionTierPrice(configOptions[el.getValue()], productQty, optionQty, optionId, originalOptionPrice);
if ($$('span#span_swatch_' + optionId + ' span.price').first()) {
$$('span#span_swatch_' + optionId + ' span.price').first().update(priceSymbol + opPrice);
}
}
}
}.bind(this));
}
},
reloadTooltip: function(el) {
var optionId = 0;
el.name.sub(/[0-9]+/, function(match) {
optionId = match[0];
});
if (!optionId) return false;
var tooltip = $('select_description_' + optionId);
if (!tooltip) return false;
var description = '';
if (el.options) {
$A(el.options).each(function(selectOption) {
if (selectOption.selected && typeof(this.config[optionId][selectOption.value]) != 'undefined') {
description = this.config[optionId][selectOption.value].description;
}
}.bind(this));
}
if (description) {
if (tooltip.style.display == 'none') {
tooltip.show();
var elWidth = el.getWidth() - tooltip.getWidth() - 6;
if (elWidth > 10) el.style.width = elWidth + 'px';
}
new Tagtip('select_description_' + optionId, description, {
align: 'rightMiddle'
});
} else {
if (tooltip.style.display != 'none') {
var elWidth = el.getWidth();
if (elWidth > 10) {
elWidth = elWidth + tooltip.getWidth() + 6;
el.style.width = elWidth + 'px';
}
tooltip.hide();
}
}
},
reloadPrice: function() {
this.taxOptions = [];
var price = 0;
var oldPrice = 0;
var unitPrice = 0;
var config = this.config;
var skipIds = [];
$$('.product-custom-option').each(function(element) {
var optionId = 0;
element.name.sub(/[0-9]+/, function(match) {
optionId = match[0];
});
if (config[optionId] && !element.disabled) {
var configOptions = config[optionId];
if (element.type == 'radio') {
this.reloadOptionTierPriceBlock(element);
if (element.checked && typeof(configOptions[element.getValue()]) != 'undefined') {
var optionQty = 1;
if ($('options_' + optionId + '_qty')) optionQty = parseInt($('options_' + optionId + '_qty').value);
var optionPrice = this.getOptionPriceByQty(configOptions[element.getValue()], optionQty, optionId, element.value, unitPrice);
price += optionPrice;
optionPrice = this.getOptionCurrentPrice(optionPrice, optionId);
unitPrice += optionPrice;
oldPrice += this.getOldOptionPriceByQty(configOptions[element.getValue()], optionQty, optionId);
$('value_option_' + optionId).value = optionPrice;
}
this.setOptionPrice();
} else if (element.type == 'checkbox') {
this.reloadOptionTierPriceBlock(element);
if (element.checked && typeof(configOptions[element.getValue()]) != 'undefined') {
var optionQty = 1;
if ($('options_' + optionId + '_' + element.value + '_qty')) optionQty = parseInt($('options_' + optionId + '_' + element.value + '_qty').value);
var optionPrice = this.getOptionPriceByQty(configOptions[element.getValue()], optionQty, optionId, element.value, unitPrice);
price += optionPrice;
optionPrice = this.getOptionCurrentPrice(optionPrice, optionId);
unitPrice += optionPrice;
oldPrice += this.getOldOptionPriceByQty(configOptions[element.getValue()], optionQty, optionId);
$('value_option_' + optionId).value = optionPrice;
}
this.setOptionPrice();
} else if (element.hasClassName('datetime-picker') && !skipIds.include(optionId)) {
dateSelected = true;
$$('.product-custom-option[id^="options_' + optionId + '"]').each(function(dt) {
if (dt.getValue() == '') {
dateSelected = false;
}
});
if (dateSelected) {
if (typeof(configOptions['price']) != 'undefined') {
var optionPrice = this.getOptionPriceByQty(configOptions, 1, optionId, 0, unitPrice);
price += optionPrice;
optionPrice = this.getOptionCurrentPrice(optionPrice, optionId);
unitPrice += optionPrice;
oldPrice += this.getOldOptionPriceByQty(configOptions, 1, optionId);
$('value_option_' + optionId).value = optionPrice;
} else if (typeof(configOptions['price']) == 'undefined') {
$('value_option_' + optionId).value = 0;
}
this.setOptionPrice();
skipIds[optionId] = optionId;
}
} else if (element.type == 'select-one') {
this.reloadTooltip(element);
this.reloadOptionTierPriceBlock(element);
this.reloadOptionPriceToTierPrice(element);
if (element.options) {
var optionQty = 1;
if ($('options_' + optionId + '_qty')) optionQty = parseInt($('options_' + optionId + '_qty').value);
$A(element.options).each(function(selectOption) {
if (selectOption.selected && typeof(configOptions[selectOption.value]) != 'undefined') {
var optionPrice = this.getOptionPriceByQty(configOptions[selectOption.value], optionQty, optionId, selectOption.value, unitPrice);
price += optionPrice;
optionPrice = this.getOptionCurrentPrice(optionPrice, optionId);
unitPrice += optionPrice;
oldPrice += this.getOldOptionPriceByQty(configOptions[selectOption.value], optionQty, optionId);
$('value_option_' + optionId).value = optionPrice;
} else if (selectOption.selected && typeof(configOptions[selectOption.value]) == 'undefined') {
$('value_option_' + optionId).value = 0;
}
this.setOptionPrice();
}.bind(this));
}
} else if (element.type == 'select-multiple') {
this.reloadOptionTierPriceBlock(element);
if (element.options) {
var otherOptionsOldUnitPrice = unitPrice;
var countSelected = 0;
$A(element.options).each(function(selectOption) {
if (selectOption.selected && typeof(configOptions[selectOption.value]) != 'undefined') {
countSelected = 1;
var optionQty = 1;
if ($('options_' + optionId + '_' + selectOption.value + '_qty')) optionQty = parseInt($('options_' + optionId + '_' + selectOption.value + '_qty').value);
var optionPrice = 0;
var options = $('select_' + optionId).options;
for (var i = 0; i < options.length; i++) {
if (options[i].selected) {
if (configOptions[options[i].value]['price_type'] != 'optperc') {
optionPrice += this.getOptionPriceByQty(configOptions[options[i].value], optionQty, optionId, options[i].value, unitPrice);
} else {
optionPrice += this.getOptionPriceByQty(configOptions[options[i].value], optionQty, optionId, options[i].value, otherOptionsOldUnitPrice);
}
}
}
if (configOptions[selectOption.value]['price_type'] != 'optperc') {
var subOptionPrice = this.getOptionPriceByQty(configOptions[selectOption.value], optionQty, optionId, selectOption.value, unitPrice);
} else {
var subOptionPrice = this.getOptionPriceByQty(configOptions[selectOption.value], optionQty, optionId, selectOption.value, otherOptionsOldUnitPrice);
}
price += subOptionPrice;
subOptionPrice = this.getOptionCurrentPrice(subOptionPrice, optionId);
unitPrice += subOptionPrice;
oldPrice += this.getOldOptionPriceByQty(configOptions[selectOption.value], optionQty, optionId);
$('value_option_' + optionId).value = this.getOptionCurrentPrice(optionPrice, optionId);
}
if (!countSelected) {
$('value_option_' + optionId).value = 0;
}
this.setOptionPrice();
}.bind(this));
}
} else if (element.type == 'hidden') {
if (!element.disabled && typeof(configOptions[element.getValue()]) != 'undefined') {
var optionPrice = this.getOptionPriceByQty(configOptions[element.getValue()], 1, optionId, element.value, unitPrice);
price += optionPrice;
optionPrice = this.getOptionCurrentPrice(optionPrice, optionId);
unitPrice += optionPrice;
oldPrice += this.getOldOptionPriceByQty(configOptions[element.getValue()], 1, optionId);
$('value_option_' + optionId).value = optionPrice;
}
this.setOptionPrice();
} else {
if (element.getValue().strip() != '') {
if (typeof(configOptions['price']) != 'undefined') {
if (configOptions['price_type'] == 'fixchar' && (element.type == 'text' || element.type == 'textarea')) {
var textWithoutSpaces = element.value.replace(/\s+/g, '');
var optionPrice = this.getOptionPriceByQty(configOptions, textWithoutSpaces.length, optionId, 0, unitPrice);
} else {
var optionPrice = this.getOptionPriceByQty(configOptions, 1, optionId, 0, unitPrice);
}
price += optionPrice;
optionPrice = this.getOptionCurrentPrice(optionPrice, optionId);
unitPrice += optionPrice;
oldPrice += this.getOldOptionPriceByQty(configOptions, 1, optionId);
$('value_option_' + optionId).value = optionPrice;
if (configOptions['price_type'] == 'fixchar' && (element.type == 'text' || element.type == 'textarea')) {
$('total_characters_price_option_' + optionId).innerHTML = 'AED' + parseFloat($('value_option_' + optionId).value).toFixed(2);
}
}
} else {
$('value_option_' + optionId).value = 0;
if (configOptions['price_type'] == 'fixchar' && (element.type == 'text' || element.type == 'textarea')) {
$('total_characters_price_option_' + optionId).innerHTML = 'AED' + parseFloat($('value_option_' + optionId).value).toFixed(2);
}
}
this.setOptionPrice();
}
}
}.bind(this));
try {
optionsPrice.productPrice = this.getProductPriceByQty() * this.getProductQty();
optionsPrice.productOldPrice = (150 * this.getProductQty()) + oldPrice - price;
if (price > 0) {
optionsPrice.productPrice = 0;
optionsPrice.productOldPrice = oldPrice - price;
}
optionsPrice.changePrice('options', price);
// tax correction
var totalOpTaxCorr = 0;
this.taxOptions.each(function(taxData) {
var opTaxCorr = taxData[0] - this.productTax;
opTaxCorr = (taxData[1] / (optionsPrice.productPrice + price)) * opTaxCorr;
totalOpTaxCorr += opTaxCorr;
}.bind(this));
optionsPrice.currentTax = this.productTax + totalOpTaxCorr;
// magento bug fixed
optionsPrice.tierPrices = [];
optionsPrice.reload();
} catch (e) {}
},
getOptionCurrentPrice: function(optionPrice, optionId) {
if (this.config[optionId]['is_onetime'] == 0) {
optionPrice = optionPrice / this.getProductQty();
}
return optionPrice;
}
};
function validateOptionsCallback(elmId, result) {
var container = $(elmId).up('ul.options-list');
if (result == 'failed') {
$(container).removeClassName('validation-passed');
$(container).addClassName('validation-failed');
} else {
$(container).removeClassName('validation-failed');
$(container).addClassName('validation-passed');
}
}
var opConfig = new Product.Options({
"13636": {
"523925": {
"description": null,
"price": 0,
"price_type": "fixed",
"min_qty": "1",
"title": "NFC Smart Business Card (Plastic)"
},
"528088": {
"description": null,
"price": 0,
"price_type": "fixed",
"min_qty": "1",
"title": "NFC Smart Wooden Business Card (Premium)"
},
"is_onetime": "0",
"image_mode": "1",
"exclude_first_image": "0"
},
"15469": {
"528089": {
"description": null,
"price": 0,
"price_type": "fixed",
"min_qty": "1",
"title": "Both Side Printing"
},
"528090": {
"description": null,
"price": 0,
"price_type": "fixed",
"min_qty": "1",
"title": "Both Side Engraving"
},
"is_onetime": "0",
"image_mode": "1",
"exclude_first_image": "0"
},
"11123": {
"528091": {
"description": null,
"price": 250,
"price_type": "fixed",
"min_qty": "1",
"title": "1"
},
"528092": {
"description": null,
"price": 450,
"price_type": "fixed",
"min_qty": "1",
"title": "2"
},
"528093": {
"description": null,
"price": 660,
"price_type": "fixed",
"min_qty": "1",
"title": "3"
},
"523926": {
"description": "NFC card",
"price": 150,
"price_type": "fixed",
"min_qty": "1",
"title": "1"
},
"523927": {
"description": "NFC card",
"price": 300,
"price_type": "fixed",
"min_qty": "1",
"title": "2"
},
"524052": {
"description": "NFC card",
"price": 430,
"price_type": "fixed",
"min_qty": "1",
"title": "3"
},
"524053": {
"description": "NFC card",
"price": 550,
"price_type": "fixed",
"min_qty": "1",
"title": "4"
},
"523928": {
"description": "NFC card",
"price": 675,
"price_type": "fixed",
"min_qty": "1",
"title": "5"
},
"525334": {
"description": "NFC card",
"price": 810,
"price_type": "fixed",
"min_qty": "1",
"title": "6"
},
"524061": {
"description": "NFC card",
"price": 945,
"price_type": "fixed",
"min_qty": "1",
"title": "7"
},
"524062": {
"description": "NFC card",
"price": 1300,
"price_type": "fixed",
"min_qty": "1",
"title": "10"
},
"524126": {
"description": "NFC card",
"price": 1900,
"price_type": "fixed",
"min_qty": "1",
"title": "15"
},
"524127": {
"description": "NFC card",
"price": 2500,
"price_type": "fixed",
"min_qty": "1",
"title": "20"
},
"524128": {
"description": "NFC card",
"price": 2950,
"price_type": "fixed",
"min_qty": "1",
"title": "25"
},
"524129": {
"description": "NFC card",
"price": 3300,
"price_type": "fixed",
"min_qty": "1",
"title": "30"
},
"524130": {
"description": "NFC card",
"price": 4200,
"price_type": "fixed",
"min_qty": "1",
"title": "40"
},
"524131": {
"description": "NFC card",
"price": 4680,
"price_type": "fixed",
"min_qty": "1",
"title": "45"
},
"524132": {
"description": "NFC card",
"price": 5100,
"price_type": "fixed",
"min_qty": "1",
"title": "50"
},
"524133": {
"description": "NFC card",
"price": 5550,
"price_type": "fixed",
"min_qty": "1",
"title": "55"
},
"524134": {
"description": "NFC card",
"price": 6000,
"price_type": "fixed",
"min_qty": "1",
"title": "60"
},
"524135": {
"description": "NFC card",
"price": 6900,
"price_type": "fixed",
"min_qty": "1",
"title": "70"
},
"524136": {
"description": "NFC card",
"price": 7700,
"price_type": "fixed",
"min_qty": "1",
"title": "80"
},
"524137": {
"description": "NFC card",
"price": 8550,
"price_type": "fixed",
"min_qty": "1",
"title": "90"
},
"524138": {
"description": "NFC card",
"price": 9300,
"price_type": "fixed",
"min_qty": "1",
"title": "100"
},
"528094": {
"description": null,
"price": 250,
"price_type": "fixed",
"min_qty": "1",
"title": "1"
},
"528095": {
"description": null,
"price": 450,
"price_type": "fixed",
"min_qty": "1",
"title": "2"
},
"528096": {
"description": null,
"price": 660,
"price_type": "fixed",
"min_qty": "1",
"title": "3"
},
"528097": {
"description": null,
"price": 880,
"price_type": "fixed",
"min_qty": "1",
"title": "4"
},
"528098": {
"description": null,
"price": 1050,
"price_type": "fixed",
"min_qty": "1",
"title": "5"
},
"is_onetime": "0",
"image_mode": "1",
"exclude_first_image": "0"
},
"11126": {
"524193": {
"description": null,
"price": 0,
"price_type": "fixed",
"min_qty": "1",
"title": "Standard: 3 Working Days"
},
"446241": {
"description": null,
"price": 0,
"price_type": "fixed",
"min_qty": "1",
"title": "Normal : 5 Working Days"
},
"446242": {
"description": null,
"price": 45,
"price_type": "fixed",
"min_qty": "1",
"title": "Urgent : 3 Working Days"
},
"446243": {
"description": null,
"price": 85,
"price_type": "fixed",
"min_qty": "1",
"title": "Urgent : 2 Working Days"
},
"446244": {
"description": null,
"price": 135,
"price_type": "fixed",
"min_qty": "1",
"title": "Urgent : 3 Working Days"
},
"446245": {
"description": null,
"price": 50,
"price_type": "fixed",
"min_qty": "1",
"title": "Urgent : 2 Working Days"
},
"524145": {
"description": null,
"price": 300,
"price_type": "fixed",
"min_qty": "1",
"title": "Urgent : 3 Working Days"
},
"524146": {
"description": null,
"price": 500,
"price_type": "fixed",
"min_qty": "1",
"title": "Urgent : 3 Working Days"
},
"524177": {
"description": null,
"price": 25,
"price_type": "fixed",
"min_qty": "1",
"title": "Urgent : 24 hour dispatch"
},
"528099": {
"description": null,
"price": 50,
"price_type": "fixed",
"min_qty": "1",
"title": "Urgent : 24 hour dispatch"
},
"is_onetime": "0",
"image_mode": "1",
"exclude_first_image": "0"
},
"11125": {
"446239": {
"description": null,
"price": 0,
"price_type": "fixed",
"min_qty": "1",
"title": "Dubai \/ Sharjah \/ Ajman (City Limits)"
},
"446240": {
"description": null,
"price": 0,
"price_type": "fixed",
"min_qty": "1",
"title": "Other Emirates (City Limits)"
},
"is_onetime": "0",
"image_mode": "1",
"exclude_first_image": "0"
},
"11124": {
"446236": {
"description": "AED 29 at checkout",
"price": 0,
"price_type": "fixed",
"min_qty": "1",
"title": "By Courier : 1 or 2 days after production"
},
"446237": {
"description": "AED 29 at checkout",
"price": 50,
"price_type": "fixed",
"min_qty": "1",
"title": "Special Driver : 6 Working Hours after production"
},
"446238": {
"description": "AED 29 at checkout",
"price": 150,
"price_type": "fixed",
"min_qty": "1",
"title": "Special Driver : 10 Working Hours after production"
},
"is_onetime": "0",
"image_mode": "1",
"exclude_first_image": "0"
}
});
var valueId, optionId;
var enableAll = false;
var inputs = new Array();
function nodeAnalysis(currentNode) {
var name = currentNode.nodeName.toLowerCase();
switch (name) {
case 'option':
inputs.push(currentNode);
break;
case 'input':
if (currentNode.type == 'checkbox' || currentNode.type == 'radio') {
inputs.push(currentNode);
}
break;
default:
break;
}
for (var i = 0; i < currentNode.childNodes.length; i++) {
if (currentNode.childNodes[i].nodeType == 1) {
nodeAnalysis(currentNode.childNodes[i]);
}
}
}
// set qty product from option
var optionSetQtyProduct = {
setQty: function() {
if (!$('qty')) {
setTimeout('optionSetQtyProduct.setQty()', 500);
return;
}
var totalQty = 0;
var elArr = $$("input[id^='options_']:checked", "select[id^='select_']");
if (elArr.length > 0) {
elArr.each(function(el) {
var elIdArr = el.id.split('_');
var optionId = 0;
if (elIdArr[1]) optionId = elIdArr[1];
var elValueArr = [];
if (el.multiple) {
for (i = 0; i < el.options.length; i++) {
if (el.options[i].selected) elValueArr.push(el.options[i].value);
}
} else {
elValueArr.push(el.value);
}
elValueArr.each(function(valueId) {
if (optionId && opConfig.config[optionId] && opConfig.config[optionId][valueId] && opConfig.config[optionId][valueId].x_qty) {
if ($('options_' + optionId + '_qty')) {
var optionQty = parseInt($('options_' + optionId + '_qty').value);
} else if ($('options_' + optionId + '_' + valueId + '_qty')) {
var optionQty = parseInt($('options_' + optionId + '_' + valueId + '_qty').value);
} else {
var optionQty = 1;
}
if (optionQty == 0) optionQty = 1;
totalQty += opConfig.config[optionId][valueId].x_qty * optionQty;
}
}.bind(this));
}.bind(this));
}
if (totalQty == 0) totalQty = 1;
if ($('qty').value != totalQty) this.setTotalQty(totalQty);
},
setTotalQty: function(qty) {
var minimalQty = 1;
if (minimalQty > 0 && minimalQty > qty) qty = minimalQty;
$('qty').value = qty;
opConfig.reloadPrice();
},
hideQty: function() {
if (!$('qty')) {
setTimeout('optionSetQtyProduct.hideQty()', 100);
return;
}
//$('qty').previous('label').style.visibility = 'hidden';
//$('qty').style.visibility = 'hidden';
$('qty').writeAttribute('readonly', 'readonly');
},
checkboxQty: function(el) {
var elIdArr = el.id.split('_');
var optionId = 0;
if (elIdArr[1]) optionId = elIdArr[1];
var elQty = $('options_' + optionId + '_' + el.value + '_qty');
if (!elQty) return;
elQty.disabled = !el.checked;
if (el.checked) {
if (elQty.value <= 0) elQty.value = 1;
$(elQty).addClassName('validate-greater-than-zero');
} else {
elQty.value = 0;
$(elQty).removeClassName('validate-greater-than-zero');
}
},
// limit qty functions:
limitQtyData: {},
setLimitQty: function(el) {
var elIdArr = el.id.split('_');
var optionId = 0;
if (elIdArr[1]) optionId = elIdArr[1];
var elValueArr = [];
if (el.multiple) {
for (i = 0; i < el.options.length; i++) {
if (el.options[i].selected) elValueArr.push(el.options[i].value);
}
} else {
elValueArr.push(el.value);
}
elValueArr.each(function(valueId) {
if (optionId && opConfig.config[optionId] && opConfig.config[optionId][valueId] && opConfig.config[optionId][valueId].l_qty) {
var limit = parseInt(opConfig.config[optionId][valueId].l_qty);
if (dependentOptions && dependentOptions.dependentData[valueId]) {
dependentOptions.dependentData[valueId].each(function(IGI) {
if (dependentOptions.inGroupIdData[IGI]) {
for (var dElementId in dependentOptions.inGroupIdData[IGI]) {
if (dElementId != 'dependency' && dElementId != 'out_of_stock' && dElementId != 'view_mode' && $(dElementId)) {
var elIdArr = dElementId.split('_');
var dOptionId = 0;
if (elIdArr[1]) dOptionId = elIdArr[1];
this.limitQtyData[dOptionId] = limit; // set limit
this.checkLimitQty(dOptionId);
}
}
}
}.bind(this));
}
}
}.bind(this));
},
checkLimitQty: function(optionId, changedEl) {
if (!optionId) return;
var limit = 0;
if (this.limitQtyData[optionId]) limit = this.limitQtyData[optionId];
if (opConfig.config[optionId] && opConfig.config[optionId].max_characters) {
if (limit == 0 || limit > opConfig.config[optionId].max_characters) limit = opConfig.config[optionId].max_characters;
}
if (limit == 0) return;
var totalQty = 0;
var elArr = $$("input[id^='options_" + optionId + "_']:checked", "select[id='select_" + optionId + "']", "textarea[id='options_" + optionId + "_text']", "input[id='options_" + optionId + "_text']");
if (elArr.length > 0) {
elArr.each(function(el) {
var elIdArr = el.id.split('_');
var optionId = 0;
if (elIdArr[1]) optionId = elIdArr[1];
var elValueArr = [];
if (el.multiple) {
for (i = 0; i < el.options.length; i++) {
if (el.options[i].selected) elValueArr.push(el.options[i].value);
}
} else {
if (el.value) elValueArr.push(el.value);
}
elValueArr.each(function(valueId) {
if ($('options_' + optionId + '_qty')) {
var optionQty = parseInt($('options_' + optionId + '_qty').value);
} else if ($('options_' + optionId + '_' + valueId + '_qty')) {
var optionQty = parseInt($('options_' + optionId + '_' + valueId + '_qty').value);
} else if ($('options_' + optionId + '_text')) {
var optionQty = $('options_' + optionId + '_text').value.length;
} else {
var optionQty = 1;
}
totalQty += optionQty;
}.bind(this));
}.bind(this));
}
var restQty = limit - totalQty;
if ($('total_limit_' + optionId)) $('total_limit_' + optionId).innerHTML = limit - totalQty;
if (restQty < 0 && changedEl) {
if (parseInt(changedEl) > 0) {
// swatch uncheck
optionSwatch.select(optionId, changedEl);
} else if ($(changedEl).hasClassName('qty')) {
var qty = parseInt(changedEl.value);
qty = qty + restQty;
if (qty < 1) qty = 1;
changedEl.value = qty;
$(changedEl).onchange();
} else if ($(changedEl).hasClassName('checkbox')) {
$(changedEl).click();
} else if ($(changedEl).hasClassName('input-text') || $(changedEl).hasClassName('text-area')) {
// text
changedEl.value = changedEl.value.substr(0, limit);
}
this.checkLimitQty(optionId, false);
}
}
};
// swatch class
var optionSwatch = {
select: function(optionId, optionValueId) {
var el = $('swatch_' + optionValueId);
if (el && $(el).hasClassName('swatch-disabled')) return false;
// change value
var el = $('select_' + optionId);
if (!el) return;
for (i = 0; i < el.options.length; i++) {
if (el.options[i].value && el.options[i].value == optionValueId) {
el.options[i].selected = !el.options[i].selected;
}
}
$(el).onchange();
},
change: function(el) {
if (!el || !el.id) return;
optionId = el.id.replace('select_', '');
//change border
var ul = $('ul_swatch_' + optionId);
if (!ul) return;
var span = $('span_swatch_' + optionId);
if (span) span.remove();
// dependent
var lis = ul.getElementsByTagName('li');
for (i = 0; i < lis.length; i++) {
lis[i].hide();
$(lis[i]).addClassName('swatch-disabled');
}
for (i = 0; i < el.options.length; i++) {
if (el.options[i].value) {
var li = $('swatch_' + el.options[i].value);
if (li) {
li.show();
if (el.disabled == false && el.options[i].disabled == false) $(li).removeClassName('swatch-disabled');
}
}
}
var noteText = [];
for (i = 0; i < el.options.length; i++) {
if (el.options[i].value) {
var li = $('swatch_' + el.options[i].value);
if (li) {
if (el.options[i].selected) {
var swatchEl = li.down('.swatch');
if (swatchEl) swatchEl.removeClassName('swatch').addClassName('swatch-selected');
// change title
if (el.options[i].text != '') {
noteText.push(el.options[i].text);
}
} else {
var swatchEl = li.down('.swatch-selected');
if (swatchEl) swatchEl.removeClassName('swatch-selected').addClassName('swatch');
}
//optionSetQtyProduct.multiSwatchQty(optionId, el.options[i].value, el.options[i].selected);
optionsInventory.changeMultiSelectQty(optionId, el.options[i].value, el.options[i].selected);
}
}
}
if (noteText.length > 0) {
var dtEl = ul.up('dl').down('dt');
var pNoteEl = dtEl.down('p.note');
var tagtipEl = dtEl.down('div.tagtip-question');
var spanSwatch = '<span id="span_swatch_' + optionId + '"> - ' + noteText.join(', ') + '</span>';
if (pNoteEl) {
Element.insert($(pNoteEl), {
'before': spanSwatch
});
} else if (tagtipEl) {
Element.insert($(tagtipEl), {
'after': spanSwatch
});
} else {
dtEl.innerHTML += spanSwatch;
}
}
opConfig.reloadPrice();
// x5, x10
if (el.readAttribute('onchange').indexOf('optionSetQtyProduct.setQty') > 0) optionSetQtyProduct.setQty();
}
};
// images class
var optionImages = {
ulId: ['div.product-img-box div.more-views ul', 'div.img-box div.more-images ul'],
mainImageUrl: '',
mainImageThumbnail: '',
mainImageTitle: '',
mainImageWidth: 240,
newMainImageUrl: '',
newMainImageThumbnail: '',
newMainImageTitle: '',
newMainImageIndex: 0,
prevMainImageUrl: '',
overlayZIndex: 80,
pageLoaded: false,
dataImageIndex: false,
showImage: function(el) {
if (!el || !el.id) return;
var elIdArr = el.id.split('_');
var optionId = 0;
if (elIdArr[1]) optionId = elIdArr[1];
var elValueArr = [];
if (el.multiple) {
for (i = 0; i < el.options.length; i++) {
if (el.options[i].selected) elValueArr.push(el.options[i].value);
}
} else {
elValueArr.push(el.value);
}
if (!opConfig.config[optionId]) return;
var imageHTML = '';
var mainImageHTML = '';
var imageMode = opConfig.config[optionId].image_mode;
var excludeFirstImage = opConfig.config[optionId].exclude_first_image;
if (imageMode == 1) {
// beside option variant
var imageBox = $('customoptions_images_' + optionId);
if (!imageBox) return;
imageBox.hide();
elValueArr.each(function(optionValueId) {
if (optionValueId != '' && opConfig.config[optionId][optionValueId] && opConfig.config[optionId][optionValueId].images) {
opConfig.config[optionId][optionValueId].images.each(function(image) {
if (image[1]) {
imageHTML += '<a href="' + image[1] + '" rel="mageworxLightbox[]" title="">' + '<img src="' + image[0] + '" title="" class="small-image-preview v-middle" />' + '</a>';
} else {
imageHTML += '<div class="container-swatch-color small-image-preview v-middle"">' + '<div class="swatch-color" style="background:' + image[0] + ';"> </div>' + '</div>';
}
}.bind(this));
}
}.bind(this));
imageBox.innerHTML = imageHTML;
imageBox.show();
} else if (imageMode == 4) {
// Overlay Main Image
var mainImage = this.getMainImage();
if (mainImage) {
if (!mainImage.src) {
mainImage = mainImage.down('img');
if (!mainImage) return;
}
// remove prev overlay_image
if (el.type == 'radio') {
var radios = el.up(2).getElementsByClassName('radio');
for (i = 0; i < radios.length; i++) {
if (!radios[i].checked) {
var overlayImage = $('overlay_image_' + radios[i].value);
if (overlayImage) overlayImage.remove();
}
}
} else if (el.type == 'checkbox') {
if (!el.checked) {
var overlayImage = $('overlay_image_' + el.value);
if (overlayImage) overlayImage.remove();
}
} else {
// drop-down, multiselect
for (i = 0; i < el.options.length; i++) {
if (!el.options[i].selected && el.options[i].value) {
var overlayImage = $('overlay_image_' + el.options[i].value);
if (overlayImage) overlayImage.remove();
}
}
}
if (((el.type == 'checkbox' || el.type == 'radio') && el.checked && !el.disabled) || ((el.type == 'select-one' || el.type == 'select-multiple') && el.value != '')) {
// overlay option image
elValueArr.each(function(optionValueId) {
if (optionValueId != '' && opConfig.config[optionId][optionValueId] && opConfig.config[optionId][optionValueId].images) {
opConfig.config[optionId][optionValueId].images.each(function(image, index) {
if (((excludeFirstImage == 0 && index == 0) || index > 0) && image[1]) {
var overlayImageId = 'overlay_image_' + optionValueId;
var overlayImage = $(overlayImageId);
if (!overlayImage) {
mainImage.up(1).style.position = 'relative';
var overlayImage = new Image();
overlayImage.width = mainImage.width;
overlayImage.height = mainImage.height;
overlayImage.style.display = 'none';
overlayImage.style.position = 'absolute';
overlayImage.style.top = 0;
overlayImage.style.left = 0;
overlayImage.style.zIndex = this.overlayZIndex;
this.overlayZIndex++;
overlayImage.id = overlayImageId;
overlayImage.src = image[1];
Element.insert(mainImage, {
'after': overlayImage
});
overlayImage.show();
}
}
}.bind(this));
}
}.bind(this));
}
}
} else {
// replace and append variant
var ul = $$(this.ulId.join(', ')).first();
var optionClass = 'option-image-' + optionId;
if (el.type == 'checkbox') optionClass += '-' + el.value;
var productImageLis = $$(this.ulId.join(' li.li-product-image, ') + ' li.li-product-image');
// hide product gallery
if (imageMode == 2 && productImageLis) {
productImageLis.each(function(li) {
li.hide();
});
}
// remove option images
$$('li.' + optionClass).each(function(li) {
li.remove();
});
if (typeof(ProductMediaManager) == 'undefined') {
$$('img.' + optionClass).each(function(img) {
img.remove();
});
}
// set default main image
this.newMainImageUrl = this.mainImageUrl;
this.newMainImageTitle = this.mainImageTitle;
this.newMainImageThumbnail = this.mainImageThumbnail;
this.newMainImageIndex = 0;
if (((el.type == 'checkbox' || el.type == 'radio') && el.checked && !el.disabled) || ((el.type == 'select-one' || el.type == 'select-multiple') && el.value != '')) {
var liHtml = '';
if (ul) {
// var li = ul.down('li');
var li = productImageLis.last();
if (this.dataImageIndex === false) this.dataImageIndex = $$(this.ulId.join(' li, ') + ' li').length;
if (li) {
liHtml = ul.down('li').innerHTML;
liHtml = liHtml.replace(/(data\-image\-index\=[\'\"])[0-9]+?([\'\"])/, "$1{{data_image_index}}$2");
if (typeof(ProductMediaManager) == 'undefined') liHtml = liHtml.replace(/https?\:\/\/.+?([\'\"])/, "{{big_image_url}}$1");
liHtml = liHtml.replace(/https?\:\/\/.+?([\'\"])/g, "{{small_image_url}}$1");
liHtml = liHtml.replace(/(\s(?:title|alt)\=[\'\"]).*?([\'\"])/g, "$1{{title}}$2");
liHtml = '<li class="' + optionClass + '">' + liHtml + '</li>';
}
}
var imageBox = $('customoptions_images_' + optionId);
if (imageBox) imageBox.hide();
// append option images
elValueArr.each(function(optionValueId) {
if (optionValueId != '' && opConfig.config[optionId][optionValueId] && opConfig.config[optionId][optionValueId].images) {
opConfig.config[optionId][optionValueId].images.each(function(image, index) {
if ((excludeFirstImage == 0 && index == 0) || index > 0) {
if (liHtml) {
if (image[1]) {
imageHTML += liHtml.replace(new RegExp("{{data_image_index}}", 'g'), this.dataImageIndex).replace(new RegExp("{{big_image_url}}", 'g'), image[1]).replace(new RegExp("{{small_image_url}}", 'g'), image[0])
.replace(new RegExp("{{title}}", 'g'), opConfig.config[optionId][optionValueId].title);
if (typeof(ProductMediaManager) != 'undefined') mainImageHTML += '<img id="image-' + this.dataImageIndex + '" class="gallery-image ' + optionClass + '" data-zoom-image="' + image[1] + '" src="' + image[1] +
'">';
this.dataImageIndex++;
}
} else {
if (index == 0 || (excludeFirstImage == 1 && index == 1)) {
this.newMainImageUrl = image[1];
this.newMainImageThumbnail = image[1];
this.newMainImageTitle = opConfig.config[optionId][optionValueId].title;
}
}
} else if (el.type == 'select-one' || el.type == 'select-multiple') {
if (imageBox) {
imageBox.hide();
imageBox.innerHTML = '<a href="' + image[1] + '" rel="mageworxLightbox[]" title="">' + '<img src="' + image[0] + '" title="" class="small-image-preview v-middle" />' + '</a>';;
imageBox.show();
}
}
}.bind(this));
}
}.bind(this));
if (imageHTML) ul.innerHTML += imageHTML;
// for ProductMediaManager
if (mainImageHTML) {
var mainImageDiv = this.getMainImage().up('div');
if (mainImageDiv) mainImageDiv.innerHTML += mainImageHTML;
}
}
// show product gallery
if (!this.hasOptionImages() && productImageLis) {
productImageLis.each(function(li) {
li.show();
});
}
$$('.cloud-zoom-gallery').each(function(a) {
if (a.up('li').style.display == '') a.up('li').style.display = 'list-item';
a.addClassName('cboxElement');
jQuery(a).CloudZoom();
});
if (typeof(ProductMediaManager) != 'undefined') ProductMediaManager.init();
// change main image
if (imageMode == 2) {
if (typeof(ProductMediaManager) == 'undefined') this.changeMainImage();
else setTimeout('optionImages.changeMainImage()', 100);
}
}
},
markProduct: function() {
$$(this.ulId.join(' li, ') + ' li').each(function(li) {
li.addClassName('li-product-image');
});
if (this.mainImageUrl == '') {
var mainImage = this.getMainImage();
if (mainImage) {
if (mainImage.hasClassName('MagicToolboxContainer')) {
var elA = mainImage.down('a');
if (elA) {
this.mainImageUrl = elA.href;
var elImg = elA.down('img');
if (elImg.width) this.mainImageWidth = elImg.width;
this.mainImageThumbnail = elImg.src;
this.mainImageTitle = elImg.alt;
}
} else if (mainImage.hasClassName('zoom-image') || (mainImage.up('a') && mainImage.up('a').hasClassName('cloud-zoom'))) {
// Easy Zoom 1.0 - jQuery plugin
// Cloud Zoom V1.0.2
var elA = mainImage.up('a');
if (elA) {
this.mainImageUrl = elA.href;
} else {
this.mainImageUrl = mainImage.src;
}
this.mainImageTitle = mainImage.alt;
this.mainImageThumbnail = mainImage.src
} else {
this.mainImageUrl = mainImage.src;
this.mainImageTitle = mainImage.alt;
}
}
}
this.prevMainImageUrl = this.mainImageUrl;
},
getMainImage: function() {
return $$('div.product-img-box div.MagicToolboxContainer', 'div.product-img-box div.main-image img', 'div.product-img-box .product-image img', '#image', '#image-main', 'div.img-box .product-image img').first();
},
changeMainImage: function() {
if (!this.newMainImageUrl || this.newMainImageUrl == this.prevMainImageUrl) return;
var mainImage = this.getMainImage();
if (!mainImage) return;
if (!this.pageLoaded) {
mainImage.hide();
setTimeout('optionImages.changeMainImage()', 100);
return;
}
if (mainImage.hasClassName('MagicToolboxContainer')) {
var elA = mainImage.down('a');
if (elA) {
elA.down('img').width = this.mainImageWidth;
MagicZoomPlus.update(elA.id, this.newMainImageUrl, this.newMainImageThumbnail, 'show-title: false; drag-mode: false');
}
} else if (typeof(ProductMediaManager) != 'undefined') {
$$(this.ulId.join(' li, ') + ' li').each(function(li) {
var elA = li.down('a');
if (elA && elA.readAttribute('data-image-index') == this.newMainImageIndex) {
elA.click();
}
}.bind(this));
} else if (mainImage.hasClassName('zoom-image')) {
// Easy Zoom 1.0 - jQuery plugin
var elA = mainImage.up('a');
if (elA) elA.href = this.newMainImageUrl;
mainImage.src = this.newMainImageUrl;
mainImage.alt = this.newMainImageTitle;
mainImage.title = this.newMainImageTitle;
jQuery('#zoom').easyZoom({
parent: 'div.zoom-container',
preload: '',
lightboxBtn: '.lightbox-btn .lightbox'
}).data('easyZoom').gallery('a.zoom-thumbnail');
} else if (mainImage.up('a') && mainImage.up('a').hasClassName('cloud-zoom')) {
// ultimo + Cloud Zoom V1.0.2
var elA = mainImage.up('a');
if (elA) elA.href = this.newMainImageUrl;
mainImage.src = this.newMainImageUrl;
mainImage.alt = this.newMainImageTitle;
mainImage.title = this.newMainImageTitle;
if ($("zoom-btn")) {
$("zoom-btn").href = this.newMainImageUrl;
$("zoom-btn").title = this.newMainImageTitle;
}
jQuery("#" + elA.id).CloudZoom();
} else {
mainImage.src = this.newMainImageUrl;
mainImage.alt = this.newMainImageTitle;
mainImage.title = this.newMainImageTitle;
}
this.prevMainImageUrl = this.newMainImageUrl;
mainImage.show();
},
hasOptionImages: function() {
var result = false;
var firstImageUrl = '';
$$(this.ulId.join(' li, ') + ' li').each(function(li) {
if (li.hasClassName('li-product-image') == false) {
// change main image
if (!firstImageUrl) {
var firstImageMatch = li.innerHTML.match(/(https?\:\/\/.+?)[\'\"]/);
if (firstImageMatch) firstImageUrl = firstImageMatch[1];
this.newMainImageUrl = firstImageUrl;
this.newMainImageThumbnail = firstImageUrl;
this.newMainImageTitle = li.down('img').alt;
if (typeof(ProductMediaManager) != 'undefined') this.newMainImageIndex = li.down('a').readAttribute('data-image-index');
}
result = true;
}
}.bind(this));
return result;
}
};
Event.observe(window, 'load', function() {
opConfig.reloadPrice();
});
var dependentOptions = {
dependentData: {
"523925": [69, 67, 34, 35, 36, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55],
"528088": [69, 70, 71, 72, 73, 74, 75, 76, 77, 78],
"528091": [66, 65],
"528092": [66, 65],
"528093": [66, 65],
"523926": [66, 65],
"523927": [8, 12],
"524052": [8, 12],
"524053": [8, 11],
"523928": [8, 11],
"525334": [8, 11],
"524061": [8, 11],
"524062": [8, 11],
"524126": [8, 11],
"524127": [8, 62],
"524128": [8, 62],
"524129": [8, 62],
"524130": [8, 62],
"524131": [8, 64],
"524132": [8, 64],
"524133": [8, 64],
"524134": [8, 64],
"524135": [8, 64],
"524136": [8, 64],
"524137": [8, 64],
"524138": [8, 64],
"528094": [66, 65],
"528095": [66, 65],
"528096": [66, 65],
"528097": [66, 79],
"528098": [66, 79],
"446239": [15, 16],
"446240": [15, 17]
},
inGroupIdData: {
"69": {
"dependency": 1,
"select_15469": "528089"
},
"70": {
"dependency": 1,
"select_15469": "528090"
},
"71": {
"dependency": 1,
"select_11123": "528091"
},
"72": {
"dependency": 1,
"select_11123": "528092"
},
"73": {
"dependency": 1,
"select_11123": "528093"
},
"34": {
"dependency": 1,
"select_11123": "523926"
},
"35": {
"dependency": 1,
"select_11123": "523927"
},
"38": {
"dependency": 1,
"select_11123": "524052"
},
"39": {
"dependency": 1,
"select_11123": "524053"
},
"36": {
"dependency": 1,
"select_11123": "523928"
},
"67": {
"dependency": 1,
"select_11123": "525334"
},
"40": {
"dependency": 1,
"select_11123": "524061"
},
"41": {
"dependency": 1,
"select_11123": "524062"
},
"42": {
"dependency": 1,
"select_11123": "524126"
},
"43": {
"dependency": 1,
"select_11123": "524127"
},
"44": {
"dependency": 1,
"select_11123": "524128"
},
"45": {
"dependency": 1,
"select_11123": "524129"
},
"47": {
"dependency": 1,
"select_11123": "524130"
},
"48": {
"dependency": 1,
"select_11123": "524131"
},
"49": {
"dependency": 1,
"select_11123": "524132"
},
"50": {
"dependency": 1,
"select_11123": "524133"
},
"51": {
"dependency": 1,
"select_11123": "524134"
},
"52": {
"dependency": 1,
"select_11123": "524135"
},
"53": {
"dependency": 1,
"select_11123": "524136"
},
"54": {
"dependency": 1,
"select_11123": "524137"
},
"55": {
"dependency": 1,
"select_11123": "524138"
},
"74": {
"dependency": 1,
"select_11123": "528094"
},
"75": {
"dependency": 1,
"select_11123": "528095"
},
"76": {
"dependency": 1,
"select_11123": "528096"
},
"77": {
"dependency": 1,
"select_11123": "528097"
},
"78": {
"dependency": 1,
"select_11123": "528098"
},
"66": {
"dependency": 1,
"select_11126": "524193"
},
"8": {
"dependency": 1,
"select_11126": "446241"
},
"11": {
"dependency": 1,
"select_11126": "446244"
},
"12": {
"dependency": 1,
"select_11126": "446245"
},
"62": {
"dependency": 1,
"select_11126": "524145"
},
"64": {
"dependency": 1,
"select_11126": "524146"
},
"65": {
"dependency": 1,
"select_11126": "524177"
},
"79": {
"dependency": 1,
"select_11126": "528099"
},
"15": {
"dependency": 1,
"select_11124": "446236"
},
"16": {
"dependency": 1,
"select_11124": "446237"
},
"17": {
"dependency": 1,
"select_11124": "446238"
}
},
defaultData: [],
dependentChanges: {
"m": [],
"d": []
},
dependentHide: false,
select: function(el) {
var i, ii = 0;
if (el.type == 'radio') {
var radios = this.upDiv(el).getElementsByClassName('radio');
for (i = 0; i < radios.length; i++) {
this.returnSelect(radios[i]);
}
} else {
this.returnSelect(el);
}
if (el.type && el.type == 'checkbox' && !el.checked) {
this.decorateIsLast();
return false;
}
if (el.disabled) return false;
if (el.value > 0) {
// prepare value
var elValueArr = [];
if (el.multiple) {
for (i = 0; i < el.options.length; i++) {
if (el.options[i].selected) elValueArr.push(el.options[i].value);
}
} else {
elValueArr.push(el.value);
}
var mElementId = el.id;
var dSelects = [];
var isRequire = false;
for (i = 0; i < elValueArr.length; i++) {
if (!this.dependentData[elValueArr[i]]) continue;
this.dependentData[elValueArr[i]].each(function(IGI) {
if (this.inGroupIdData[IGI]) {
for (var dElementId in this.inGroupIdData[IGI]) {
if (dElementId != 'dependency' && dElementId != 'out_of_stock' && dElementId != 'view_mode' && $(dElementId)) {
if (this.inGroupIdData[IGI][dElementId]) {
var dElement = $(dElementId);
if (!this.dependentChanges['m'][mElementId]) this.dependentChanges['m'][mElementId] = [];
if (!this.dependentChanges['m'][mElementId][dElementId]) this.dependentChanges['m'][mElementId][dElementId] = [];
this.dependentChanges['m'][mElementId][dElementId]['disabled'] = true;
if (this.dependentChanges['m'][mElementId][dElementId]['is_require']) {
isRequire = true;
} else {
isRequire = $(dElement).hasClassName('required-dependent');
}
this.dependentChanges['m'][mElementId][dElementId]['is_require'] = isRequire;
if (!this.dependentChanges['d'][dElementId]) this.dependentChanges['d'][dElementId] = [];
if ((dElement.type == 'select-one' || dElement.type == 'select-multiple') && !$(dElement).hasClassName('datetime-picker')) {
// if [multi]select
var selectValue = 's' + this.inGroupIdData[IGI][dElementId];
// if el not modified -> backup default options and clear
if (!this.dependentChanges['d'][dElementId]['options']) {
this.dependentChanges['d'][dElementId]['options'] = [];
var opSelected = false;
for (ii = 0; ii < dElement.options.length; ii++) {
if (this.defaultData[dElementId] && (this.defaultData[dElementId] == dElement.options[ii].value || this.defaultData[dElementId][dElement.options[ii].value])) opSelected = true;
else opSelected = false;
if (dElement.options[ii].value) this.dependentChanges['d'][dElementId]['options']['s' + dElement.options[ii].value] = {
'text': dElement.options[ii].text,
'selected': opSelected,
'sel-def': opSelected,
'disabled': dElement.options[ii].disabled
};
}
if (dElement.multiple) dElement.length = 0;
else dElement.length = 1; // clear select
}
if (this.dependentChanges['d'][dElementId]['options'][selectValue]) {
// set [multi]select flag use
if (!this.dependentChanges['d'][dElementId]['options'][selectValue]['use']) this.dependentChanges['d'][dElementId]['options'][selectValue]['use'] = [];
this.dependentChanges['d'][dElementId]['options'][selectValue]['use'].push(mElementId);
this.dependentChanges['d'][dElementId]['options'][selectValue]['dependency'] = this.inGroupIdData[IGI].dependency;
// commit changes
if (!this.dependentChanges['m'][mElementId][dElementId]['options']) this.dependentChanges['m'][mElementId][dElementId]['options'] = [];
this.dependentChanges['m'][mElementId][dElementId]['options'].push(selectValue);
}
} else {
// if radio, checkbox, text, etc.
if (!this.dependentChanges['d'][dElementId]['use']) this.dependentChanges['d'][dElementId]['use'] = [];
this.dependentChanges['d'][dElementId]['use'].push(mElementId);
this.dependentChanges['d'][dElementId]['dependency'] = this.inGroupIdData[IGI].dependency;
}
if ((this.dependentChanges['d'][dElementId]['use'] && this.dependentChanges['d'][dElementId]['use'].length >= this.inGroupIdData[IGI].dependency) || ((dElement.type == 'select-one' || dElement.type ==
'select-multiple') && this.dependentChanges['d'][dElementId]['options'][selectValue] && this.dependentChanges['d'][dElementId]['options'][selectValue]['use'].length >= this.inGroupIdData[IGI].dependency)) {
// set visibility
if (!this.inGroupIdData[IGI].out_of_stock) dElement.disabled = false;
if (this.dependentHide && this.inGroupIdData[IGI].view_mode != 2) {
if (dElement.type == 'checkbox' || dElement.type == 'radio') {
$(dElement).up('li').style.display = 'block';
}
dependentOptions.upDiv(dElement).style.display = 'block';
}
// set class required-entry
if (isRequire) {
$(dElement).removeClassName('required-dependent');
if (dElement.type == 'checkbox' || dElement.type == 'radio') {
$(dElement).addClassName('validate-one-required-by-name');
} else {
$(dElement).addClassName('required-entry');
}
}
// add or init dependent element
if ((dElement.type == 'select-one' || dElement.type == 'select-multiple') && !$(dElement).hasClassName('datetime-picker')) {
// if [multi]select
var selectValue = 's' + this.inGroupIdData[IGI][dElementId];
if (this.dependentChanges['d'][dElementId]['options'][selectValue]) {
dSelects.push(dElement); // after add data to this [multi]select
}
} else {
// if radio, checkbox, text, etc.
if (this.defaultData[dElementId] && ($(dElementId).type == 'checkbox' || $(dElementId).type == 'radio') && this.inGroupIdData[IGI].dependency == this.dependentChanges['d'][dElementId]['use'].length) $(
dElementId).click();
}
}
}
}
}
}
}.bind(this));
}
if (dSelects.length > 0) {
dSelects = this.removeArrayDuplicates(dSelects);
for (i = 0; i < dSelects.length; i++) {
var dElement = dSelects[i];
var dElementId = dElement.id;
// add data to [multi]select
this.rememberNewSelected(dElement, dElementId);
if (dElement.multiple) dElement.length = 0;
else dElement.length = 1; // clear select
for (var opValue in this.dependentChanges['d'][dElementId]['options']) {
if (!this.dependentChanges['d'][dElementId]['options'].hasOwnProperty(opValue) || !this.dependentChanges['d'][dElementId]['options'][opValue] || !this.dependentChanges['d'][dElementId]['options'][opValue]['use'] || this
.dependentChanges['d'][dElementId]['options'][opValue]['use'].length < this.dependentChanges['d'][dElementId]['options'][opValue]['dependency']) continue;
var newOpt = new Option(this.dependentChanges['d'][dElementId]['options'][opValue]['text'], opValue.substr(1));
newOpt.disabled = this.dependentChanges['d'][dElementId]['options'][opValue]['disabled'];
if (this.dependentChanges['d'][dElementId]['options'][opValue]['selected']) {
newOpt.selected = true;
//if (!newOpt.disabled) setTimeout('dependentOptions.select($("'+dElementId+'"));', '100');
}
dElement.options.add(newOpt);
}
dElement.onchange();
}
}
this.decorateIsLast();
}
},
removeArrayDuplicates: function(a) {
var seen = {};
var out = [];
var len = a.length;
var j = 0;
for (var i = 0; i < len; i++) {
var itemId = a[i].id;
var item = a[i];
if (seen[itemId] !== 1) {
seen[itemId] = 1;
out[j++] = item;
}
}
return out;
},
// cancel changes and return default options params
returnSelect: function(el) {
var mElementId = el.id;
var i = 0;
// reset main image to parent image option if dependent option has no image
if (this.dependentChanges['d'][mElementId] && this.dependentChanges['d'][mElementId]['use']) {
var dmElement = $(mElementId);
if (dmElement.checked) {
optionImages.showImage(dmElement);
this.dependentChanges['d'][mElementId]['use'].each(function(el) {
optionImages.showImage($(el));
});
}
}
if (this.dependentChanges['m'][mElementId] && !this.dependentChanges['m'][mElementId]['is_used']) {
this.dependentChanges['m'][mElementId]['is_used'] = true;
for (var dElementId in this.dependentChanges['m'][mElementId]) {
if (!this.dependentChanges['m'][mElementId].hasOwnProperty(dElementId) || dElementId == 'is_used' || !$(dElementId)) continue;
var dElement = $(dElementId);
var disableElFlag = true;
// disable dependent el
if (this.dependentChanges['m'][mElementId][dElementId]['disabled']) {
if (this.dependentChanges['m'][mElementId][dElementId]['options'] && this.dependentChanges['d'][dElementId]['options']) {
// to [multi]select
this.rememberNewSelected(dElement, dElementId);
// remove options if not use main el
for (i = 0; i < this.dependentChanges['m'][mElementId][dElementId]['options'].length; i++) {
opValue = this.dependentChanges['m'][mElementId][dElementId]['options'][i];
if (this.dependentChanges['d'][dElementId]['options'][opValue] && this.dependentChanges['d'][dElementId]['options'][opValue]['use'] && this.dependentChanges['d'][dElementId]['options'][opValue]['use'].length > 0) {
this.dependentChanges['d'][dElementId]['options'][opValue]['use'] = this.dependentChanges['d'][dElementId]['options'][opValue]['use'].without(mElementId);
if (this.dependentChanges['d'][dElementId]['options'][opValue]['use'].length < this.dependentChanges['d'][dElementId]['options'][opValue]['dependency']) {
$$("#" + dElementId + " option[value='" + opValue.substr(1) + "']").each(function(elOp) {
if (elOp.value && $('option_tier_prices_' + elOp.value)) {
$('option_tier_prices_' + elOp.value).remove();
}
elOp.remove();
});
} else {
disableElFlag = false;
}
}
}
if (disableElFlag && (dElement.length > 1 || (dElement.multiple && dElement.length > 0))) disableElFlag = false;
dElement.onchange();
} else {
// to radio, checkbox, text, etc.
if (this.dependentChanges['d'][dElementId]['use'] && this.dependentChanges['d'][dElementId]['use'].length > 0) {
this.dependentChanges['d'][dElementId]['use'] = this.dependentChanges['d'][dElementId]['use'].without(mElementId);
if (this.dependentChanges['d'][dElementId]['use'].length >= this.dependentChanges['d'][dElementId]['dependency']) disableElFlag = false;
}
}
if (disableElFlag) {
dElement.disabled = true;
// restore default if [multi]select
if ((dElement.type == 'select-one' || dElement.type == 'select-multiple') && !$(dElement).hasClassName('datetime-picker')) {
for (var opValue in this.dependentChanges['d'][dElementId]['options']) {
if (!this.dependentChanges['d'][dElementId]['options'].hasOwnProperty(opValue) || !this.dependentChanges['d'][dElementId]['options'][opValue]) continue;
var newOpt = new Option(this.dependentChanges['d'][dElementId]['options'][opValue]['text'], opValue.substr(1));
newOpt.disabled = this.dependentChanges['d'][dElementId]['options'][opValue]['disabled'];
newOpt.selected = this.dependentChanges['d'][dElementId]['options'][opValue]['sel-def'];
dElement.options.add(newOpt);
}
dElement.onchange();
}
// hide
if (this.dependentHide) {
var hideDivFlag = true;
if (dElement.type == 'checkbox' || dElement.type == 'radio') {
$(dElement).up('li').style.display = 'none';
ulEl = $(dElement).up('li').up('ul');
if (ulEl) {
lis = ulEl.getElementsByTagName('li');
for (i = 0; i < lis.length; i++) {
if (lis[i].style.display == 'block') {
hideDivFlag = false;
break;
}
}
}
}
if (hideDivFlag) this.upDiv(dElement).style.display = 'none';
}
// require
if (this.dependentChanges['m'][mElementId][dElementId]['is_require']) {
if (dElement.type == 'checkbox' || dElement.type == 'radio') {
$(dElement).removeClassName('validate-one-required-by-name');
} else {
$(dElement).removeClassName('required-entry');
}
$(dElement).addClassName('required-dependent');
}
optionImages.showImage(dElement);
}
}
// return dependent->dependent etc..
if (disableElFlag && (dElement.type == 'checkbox' || dElement.type == 'radio') && dElement.checked) {
dElement.checked = false;
if (dElement.type == 'checkbox') optionSetQtyProduct.checkboxQty(dElement);
dependentOptions.returnSelect(dElement);
} else if ((dElement.type == 'select-one' || dElement.type == 'select-multiple') && !$(dElement).hasClassName('datetime-picker')) {
dependentOptions.select(dElement); // that's right!
} else if (disableElFlag && (dElement.type == 'text' || dElement.type == 'textarea' || dElement.type == 'file')) {
if (this.defaultData[dElementId]) dElement.value = this.defaultData[dElementId];
else dElement.value = '';
}
}
delete this.dependentChanges['m'][mElementId];
}
},
rememberNewSelected: function(dElement, dElementId) {
// remember new selected
if (this.dependentChanges['d'][dElementId] && this.dependentChanges['d'][dElementId]['options']) {
var opSelected = false;
for (i = 0; i < dElement.options.length; i++) {
if (this.dependentChanges['d'][dElementId]['options']['s' + dElement.options[i].value]) {
if (dElement.options[i].selected && dElement.options[i].value > 0) opSelected = true;
else opSelected = false;
this.dependentChanges['d'][dElementId]['options']['s' + dElement.options[i].value]['selected'] = opSelected;
}
}
}
},
// for ie to work
upDiv: function(el) {
if (el.type == 'checkbox' || el.type == 'radio') {
var div = el.up(4);
if (!$(div).hasClassName('option')) div = div.up(1);
return div;
} else {
return el.up('div.option');
}
},
decorateIsLast: function() {
var divs = $$('div.option');
if (divs) {
var dl = false;
var dd = false;
divs.each(function(div, index) {
if (div.style.display != 'none' && !$(div).hasClassName('hidden')) {
dl = div.down('dl');
if (dl) {
if ($(dl).hasClassName('last')) $(dl).removeClassName('last');
dd = dl.down('dd');
if (dd && $(dd).hasClassName('last')) $(dd).removeClassName('last');
}
}
}.bind(this));
if (dl) $(dl).addClassName('last');
if (dd) $(dd).addClassName('last');
}
},
applyDefaultValues: function(el) {
for (var elementId in this.defaultData) {
if (!this.defaultData.hasOwnProperty(elementId)) continue;
if ($(elementId) && this.upDiv($(elementId)) && this.upDiv($(elementId)).style.display != "none") {
this.returnSelect($(elementId));
if ($(elementId).type == 'select-one' || $(elementId).type == 'text' || $(elementId).type == 'textarea') {
$(elementId).value = this.defaultData[elementId];
} else if ($(elementId).type == 'select-multiple') {
el = $(elementId);
for (i = 0; i < el.options.length; i++) {
if (this.defaultData[elementId][el.options[i].value]) el.options[i].selected = true;
}
} else if ($(elementId).type == 'checkbox' || $(elementId).type == 'radio') {
if ($(elementId).checked != true) $(elementId).click();
}
this.select($(elementId));
}
}
}
};
// for correct decorating of options
if (typeof(decorateGeneric) != 'undefined') {
(function() {
var parentDecorateGeneric = decorateGeneric.bind(window);
decorateGeneric = function(elements, decorateParams) {
parentDecorateGeneric(elements, decorateParams);
dependentOptions.decorateIsLast();
};
})();
}
// Change Qty Input Invetory
var optionsInventory = {
changeInputQty: function(el) {
if (!el) {
return false;
}
var optionId = this._getOptionId(el);
var valueId = el.value;
if (el.type == 'radio') {
var optionQty = $('options_' + optionId + '_qty');
} else if (el.type == 'checkbox') {
var optionQty = $('options_' + optionId + '_' + valueId + '_qty');
}
if (!optionQty) {
return;
}
var minQty = 1;
if (valueId != '' && opConfig.config[optionId][valueId].min_qty) {
minQty = opConfig.config[optionId][valueId].min_qty;
}
$(optionQty).addClassName('validate-greater-than-zero');
if (!el.checked) {
minQty = 0;
$(optionQty).removeClassName('validate-greater-than-zero');
}
this._changeDisabledQty(el, optionQty);
optionQty.value = minQty;
},
changeSelectQty: function(el) {
if (!el) {
return false;
}
var optionId = this._getOptionId(el);
var valueIds = this._getValueIds(el);
var optionQty = $('options_' + optionId + '_qty');
if (!optionQty) {
return;
}
for (i = 0; i < valueIds.length; i++) {
var valueId = valueIds[i];
var minQty = 1;
if (opConfig.config[optionId][valueId].min_qty) {
minQty = opConfig.config[optionId][valueId].min_qty;
}
optionQty.value = minQty;
}
$(optionQty).addClassName('validate-greater-than-zero');
},
changeMultiSelectQty: function(optionId, valueId, selected) {
var optionQty = $('options_' + optionId + '_' + valueId + '_qty');
if (!optionQty) {
return;
}
optionQty.disabled = !selected;
if (selected) {
var minQty = 1;
if (opConfig.config[optionId][valueId].min_qty) {
minQty = opConfig.config[optionId][valueId].min_qty;
}
if (optionQty.value <= 0) {
optionQty.value = minQty;
}
$(optionQty).addClassName('validate-greater-than-zero');
} else {
$(optionQty).removeClassName('validate-greater-than-zero');
}
},
_getValueIds: function(el) {
var ids = [];
for (i = 0; i < el.options.length; i++) {
if (el.options[i].selected && el.options[i].value != '') {
ids.push(el.options[i].value);
}
}
return ids;
},
_getOptionId: function(el) {
var optionId = 0;
el.name.sub(/[0-9]+/, function(match) {
optionId = match[0];
});
return optionId;
},
_changeDisabledQty: function(el, qty) {
qty.disabled = !el.checked;
},
};
Event.observe(window, 'load', function() {
$$("input[type^='checkbox'].product-custom-option, input[type^='radio'].product-custom-option").each(function(element) {
Event.observe(element, 'change', function() {
optionsInventory.changeInputQty(element);
opConfig.reloadPrice();
});
});
$$("select[id^='select_'].product-custom-option").each(function(element) {
Event.observe(element, 'change', function() {
optionsInventory.changeSelectQty(element);
opConfig.reloadPrice();
});
});
});
// end Change Qty Input Invetory
//]]>
</script>
<div class="option">
<dl>
<dt>
<label>Card type<span class="required"> *</span></label>
</dt>
<dd>
<select name="options[13636]" id="select_13636" class="required-entry product-custom-option dropdown" title="" onchange="dependentOptions.select(this); opConfig.reloadPrice();">
<option value="">-- Please Select --</option>
<option value="523925">NFC Smart Business Card (Plastic) </option>
<option value="528088">NFC Smart Wooden Business Card (Premium) </option>
</select>
<div class="tagtip-question" id="select_description_13636" style="display:none;"></div> <input type="hidden" class="option_value" id="value_option_13636" value="0">
</dd>
</dl>
</div>
<div class="option">
<dl>
<dt>
<label>Customization:<span class="required"> *</span></label>
</dt>
<dd>
<select name="options[15469]" id="select_15469" class="required-dependent product-custom-option dropdown" title="" onchange="dependentOptions.select(this); opConfig.reloadPrice();" disabled="disabled">
<option value="">-- Please Select --</option>
<option value="528089">Both Side Printing </option>
<option value="528090">Both Side Engraving </option>
</select>
<div class="tagtip-question" id="select_description_15469" style="display:none;"></div> <input type="hidden" class="option_value" id="value_option_15469" value="0">
</dd>
</dl>
</div>
<div class="option">
<dl>
<dt>
<label>Quantity<span class="required"> *</span></label>
<p class="note">Price Includes Both Side Customization</p>
</dt>
<dd>
<select name="options[11123]" id="select_11123" class="required-dependent product-custom-option dropdown" title="" onchange="dependentOptions.select(this); opConfig.reloadPrice();" disabled="disabled">
<option value="">-- Please Select --</option>
<option value="528091">1 AED250.00</option>
<option value="528092">2 AED450.00</option>
<option value="528093">3 AED660.00</option>
<option value="523926">1 AED150.00</option>
<option value="523927">2 AED300.00</option>
<option value="524052">3 AED430.00</option>
<option value="524053">4 AED550.00</option>
<option value="523928">5 AED675.00</option>
<option value="525334">6 AED810.00</option>
<option value="524061">7 AED945.00</option>
<option value="524062">10 AED1,300.00</option>
<option value="524126">15 AED1,900.00</option>
<option value="524127">20 AED2,500.00</option>
<option value="524128">25 AED2,950.00</option>
<option value="524129">30 AED3,300.00</option>
<option value="524130">40 AED4,200.00</option>
<option value="524131">45 AED4,680.00</option>
<option value="524132">50 AED5,100.00</option>
<option value="524133">55 AED5,550.00</option>
<option value="524134">60 AED6,000.00</option>
<option value="524135">70 AED6,900.00</option>
<option value="524136">80 AED7,700.00</option>
<option value="524137">90 AED8,550.00</option>
<option value="524138">100 AED9,300.00</option>
<option value="528094">1 AED250.00</option>
<option value="528095">2 AED450.00</option>
<option value="528096">3 AED660.00</option>
<option value="528097">4 AED880.00</option>
<option value="528098">5 AED1,050.00</option>
</select>
<div class="tagtip-question" id="select_description_11123" style="display:none;"></div> <input type="hidden" class="option_value" id="value_option_11123" value="0">
</dd>
</dl>
</div>
<div class="option">
<dl>
<dt>
<label>Production Timeline<span class="required"> *</span></label>
</dt>
<dd>
<select name="options[11126]" id="select_11126" class="required-dependent product-custom-option dropdown" title="" onchange="dependentOptions.select(this); opConfig.reloadPrice();" disabled="disabled">
<option value="">-- Please Select --</option>
<option value="524193">Standard: 3 Working Days </option>
<option value="446241">Normal : 5 Working Days </option>
<option value="446242">Urgent : 3 Working Days AED45.00</option>
<option value="446243">Urgent : 2 Working Days AED85.00</option>
<option value="446244">Urgent : 3 Working Days AED135.00</option>
<option value="446245">Urgent : 2 Working Days AED50.00</option>
<option value="524145">Urgent : 3 Working Days AED300.00</option>
<option value="524146">Urgent : 3 Working Days AED500.00</option>
<option value="524177">Urgent : 24 hour dispatch AED25.00</option>
<option value="528099">Urgent : 24 hour dispatch AED50.00</option>
</select>
<div class="tagtip-question" id="select_description_11126" style="display:none;"></div> <input type="hidden" class="option_value" id="value_option_11126" value="0">
</dd>
</dl>
</div>
<div class="option">
<dl>
<dt>
<label>Delivery Location<span class="required"> *</span></label>
</dt>
<dd>
<select name="options[11125]" id="select_11125" class="required-entry product-custom-option dropdown" title="" onchange="dependentOptions.select(this); opConfig.reloadPrice();">
<option value="">-- Please Select --</option>
<option value="446239">Dubai / Sharjah / Ajman (City Limits) </option>
<option value="446240">Other Emirates (City Limits) </option>
</select>
<div class="tagtip-question" id="select_description_11125" style="display:none;"></div> <input type="hidden" class="option_value" id="value_option_11125" value="0">
</dd>
</dl>
</div>
<div class="option">
<dl class="">
<dt>
<label>Delivery Mode<span class="required"> *</span></label>
<p class="note">AED 29 at checkout</p>
</dt>
<dd class="">
<select name="options[11124]" id="select_11124" class="required-dependent product-custom-option dropdown" title="" onchange="dependentOptions.select(this); opConfig.reloadPrice();" disabled="disabled">
<option value="">-- Please Select --</option>
<option value="446236">By Courier : 1 or 2 days after production </option>
<option value="446237">Special Driver : 6 Working Hours after production AED50.00</option>
<option value="446238">Special Driver : 10 Working Hours after production AED150.00</option>
</select>
<div class="tagtip-question" id="select_description_11124" style="display:none;"></div> <input type="hidden" class="option_value" id="value_option_11124" value="0">
</dd>
</dl>
</div>
<script type="text/javascript">
// onchange -> product price update by qty
document.observe('dom:loaded', function() {
if ($('qty')) $('qty').writeAttribute('onchange', 'opConfig.reloadPrice()');
});
Event.observe(window, 'load', function() {
optionImages.markProduct();
optionImages.pageLoaded = true;
$$("select[id^='select_'].product-custom-option").each(function(element) {
element.onchange();
});
$$("input[id^='options_'].product-custom-option:checked").each(function(element) {
element.onclick();
});
// apply edit or options default
dependentOptions.applyDefaultValues();
dependentOptions.decorateIsLast();
// validate and scroll to element
var parentValidatorValidate = productAddToCartForm.validator.validate.bind(productAddToCartForm.validator);
productAddToCartForm.validator.validate = function() {
var result = parentValidatorValidate();
// fix focus
if (!result && this.options.focusOnError) {
try {
var element = Form.getElements(this.form).findAll(function(elm) {
if ($(elm).hasClassName('validation-failed') || ($(elm).up('ul') && $(elm).up('ul').hasClassName('validation-failed'))) {
return $(elm);
}
}).first();
element.up('dl').scrollTo();
} catch (e) {}
}
// for swatch validation
$$(".product-options ul.validation-failed[id^='ul_swatch_']").each(function(el) {
$(el).removeClassName('validation-failed');
});
$$('.product-options select.validation-failed').each(function(el) {
if ($(el).hasClassName('hidden')) {
$(el).removeClassName('validation-failed');
$(el).up('dd').down('ul').addClassName('validation-failed');
}
});
return result;
}.bind(productAddToCartForm.validator);
});
</script>
<script type="text/javascript">
//<![CDATA[
enUS = {
"m": {
"wide": ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
"abbr": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
}
}; // en_US locale reference
Calendar._DN = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]; // full day names
Calendar._SDN = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; // short day names
Calendar._FD = 6; // First day of the week. "0" means display Sunday first, "1" means display Monday first, etc.
Calendar._MN = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; // full month names
Calendar._SMN = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; // short month names
Calendar._am = "AM"; // am/pm
Calendar._pm = "PM";
// tooltips
Calendar._TT = {};
Calendar._TT["INFO"] = 'About the calendar';
Calendar._TT["ABOUT"] = 'DHTML Date/Time Selector\n' + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + 'For latest version visit: http://www.dynarch.com/projects/calendar/\n' +
'Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details.' + '\n\n' + 'Date selection:\n' + '- Use the \xab, \xbb buttons to select year\n' + '- Use the \u2039 buttons to select month\n' +
'- Hold mouse button on any of the above buttons for faster selection.';
Calendar._TT["ABOUT_TIME"] = '\n\n' + 'Time selection:\n' + '- Click on any of the time parts to increase it\n' + '- or Shift-click to decrease it\n' + '- or click and drag for faster selection.';
Calendar._TT["PREV_YEAR"] = 'Prev. year (hold for menu)';
Calendar._TT["PREV_MONTH"] = 'Prev. month (hold for menu)';
Calendar._TT["GO_TODAY"] = 'Go Today';
Calendar._TT["NEXT_MONTH"] = 'Next month (hold for menu)';
Calendar._TT["NEXT_YEAR"] = 'Next year (hold for menu)';
Calendar._TT["SEL_DATE"] = 'Select date';
Calendar._TT["DRAG_TO_MOVE"] = 'Drag to move';
Calendar._TT["PART_TODAY"] = ' (' + "today" + ')';
// the following is to inform that "%s" is to be the first day of week
Calendar._TT["DAY_FIRST"] = 'Display %s first';
// This may be locale-dependent. It specifies the week-end days, as an array
// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
// means Monday, etc.
Calendar._TT["WEEKEND"] = "5";
Calendar._TT["CLOSE"] = 'Close';
Calendar._TT["TODAY"] = "today";
Calendar._TT["TIME_PART"] = '(Shift-)Click or drag to change value';
// date formats
Calendar._TT["DEF_DATE_FORMAT"] = "%b %e, %Y";
Calendar._TT["TT_DATE_FORMAT"] = "%B %e, %Y";
Calendar._TT["WK"] = "Week";
Calendar._TT["TIME"] = 'Time:';
//]]>
</script>
<p class="required">* Required Fields</p>
</div>
<script type="text/javascript">
decorateGeneric($$('#product-options-wrapper dl'), ['last']);
</script>
<div class="product-options-bottom">
<div class="price-box">
<strong>Starting From:</strong><br>
<span class="regular-price" id="product-price-3775_clone">
<span class="price">AED150.00</span> </span>
</div>
<style>
#uploaded-files {
max-height: 200px;
overflow-x: hidden;
overflow-y: scroll;
}
button.btn-upload {
width: 370px;
margin-left: 0 !important;
}
</style>
<div>
<h5 style="border-bottom:1px solid #ccc"></h5>
<!--<span><b style="color:#00bbd3">Design It :</b> Click here if you wish to design on your own.</span><br/>-->
<!--<span><b style="color:#00bbd3">Upload & Checkout :</b> Click here to upload your print-ready file or to share your logo/images/text with us to avail our free design support.</span> -->
</div>
<br>
<div class="add-to-cart">
<!--<button type="button" title="Design It" class="button btn-cart" onclick="productdesignerAddToCartForm.submit(this)"><span><span>Design It</span></span></button>-->
<button type="button" title="Upload & Checkout" class="button btn-cart btn-upload" onclick="productdesignerAddToCartForm.showUploadFilePopup()"><span><span>Upload & Checkout</span></span></button>
</div>
<div id="upload-file-popup-overlay" style="display: none;" onclick="closeUploadFilePopup()"></div>
<div id="upload-file-popup" style="display: none;">
<a class="close material-design-cancel19" href="javascript:void(0)" onclick="closeUploadFilePopup()" title="Close"></a>
<div class="product-options">
<div class="option">
<dl>
<dt>
<label>Design File</label>
</dt>
<dd>
<input type="file" id="upload-file-input" name="design_file" data-url="https://www.printonline.ae/pd/upload/" multiple="">
<div id="upload-progress" class="progress">
<div class="progress-bar progress-bar-success"></div>
<div class="progress-percent"></div>
</div>
<div id="uploaded-files">
</div>
</dd>
</dl>
</div>
<div class="option">
<dl class="last">
<dt>
<label>Comment</label>
</dt>
<dd class="last">
<textarea name="design_comment"></textarea>
</dd>
</dl>
</div>
</div>
<div class="product-options-bottom">
<div class="add-to-cart">
<button type="button" title="Add to Cart" class="button btn-cart"
onclick="productdesignerAddToCartForm.submit(this, 'https://www.printonline.ae/pd/cart/add/uenc/aHR0cHM6Ly93d3cucHJpbnRvbmxpbmUuYWUvbmZjLWJ1c2luZXNzLWNhcmRzLmh0bWw_X19fU0lEPVU,/product/3775/form_key/krUXu5cA6y9aDV2p/')"><span><span>Add
to Cart</span></span></button>
<img style="display: none" id="upload-file-popup-loader" src="https://www.printonline.ae/skin/frontend/base/default/productdesigner/img/ajax-loader.gif">
</div>
</div>
</div>
<script type="text/javascript">
//<![CDATA[
function closeUploadFilePopup() {
$('upload-file-popup-overlay').hide();
$('upload-file-popup').hide();
$('upload-file-input').removeClassName('required-entry');
}
var productdesignerAddToCartForm = new VarienForm('product_addtocart_form');
productdesignerAddToCartForm.submit = function(button, url) {
if (this.validator.validate()) {
var form = this.form;
var oldUrl = form.action;
if (url) {
form.action = url;
}
var e = null;
try {
$('upload-file-popup-loader').show();
this.form.submit();
} catch (e) {
$('upload-file-popup-loader').hide();
}
this.form.action = oldUrl;
if (e) {
throw e;
}
if (button && button != 'undefined') {
button.disabled = true;
}
}
}.bind(productdesignerAddToCartForm);
productdesignerAddToCartForm.showUploadFilePopup = function(button, url) {
if (this.validator.validate()) {
$('upload-file-popup-overlay').show();
$('upload-file-popup').show();
//$('upload-file-input').addClassName('required-entry');
}
}.bind(productdesignerAddToCartForm);
jQuery(function() {
'use strict';
// Change this to the location of your server-side upload handler:
jQuery('#upload-file-input').fileupload({
dataType: 'json',
formData: {},
send: function(e) {
jQuery('#upload-progress .progress-bar').css('width', 0);
jQuery('#upload-progress').show();
},
done: function(e, data) {
jQuery.each(data.result.files, function(index, file) {
if (!file.error) {
jQuery('<p/>').appendTo('#uploaded-files').append('<a href="' + file.url + '" target="_blank">' + file.name + '</a>').append('<a href="javascript:void(0)" class="delete">Delete</a>').append(
'<input type="hidden" name="uploaded_files[]" value="' + file.path + '" />');
jQuery('#upload-file-input').removeClass('required-entry');
} else {
alert(file.error);
}
});
},
stop: function(e, data) {
jQuery('#upload-progress').hide();
},
progressall: function(e, data) {
var progress = parseInt(data.loaded / data.total * 100, 10);
jQuery('#upload-progress .progress-bar').css('width', progress + '%');
jQuery('#upload-progress .progress-percent').text(progress + '%');
}
}).prop('disabled', !jQuery.support.fileInput).parent().addClass(jQuery.support.fileInput ? undefined : 'disabled');
jQuery('#uploaded-files').on('click', 'a.delete', function(e) {
e.preventDefault();
var $link = jQuery(this);
if ($link.data('url') && !$link.hasClass('loading')) {
$link.addClass('loading');
var req = jQuery.ajax({
dataType: 'json',
url: $link.data('url')
});
req.success(function(data) {
if (!data.error) {
$link.closest('p').remove();
if (jQuery('#uploaded-files p').length === 0) {
$('upload-file-input').addClassName('required-entry');
}
} else {
$link.removeClass('loading');
alert(data.error);
}
});
} else if (!$link.hasClass('loading')) {
$link.closest('p').remove();
if (jQuery('#uploaded-files p').length === 0) {
$('upload-file-input').addClassName('required-entry');
}
}
});
});
//]]>
</script>
</div>
</div>
<div class="add-to-cart-wrapper">
</div>
<!-- Check whether the plugin is enabled -->
<style>
#at3win #at3winheader h3 {
text-align: left !important;
}
</style>
<div class="clear"></div>
</div>
</form>
POST https://www.printonline.ae/newsletter/subscriber/new/
<form action="https://www.printonline.ae/newsletter/subscriber/new/" method="post" id="newsletter-validate-detail">
<div class="block-content">
<div class="form-subscribe-header">
<label for="newsletter">Sign Up for Our Newsletter:</label>
</div>
<div class="input-box">
<input type="email" spellcheck="false" name="email" id="newsletter" title="Sign up for our newsletter" class="input-text required-entry validate-email" autocapitalize="off" autocorrect="off">
</div>
<div class="actions">
<button type="submit" title="Subscribe" class="button"><span><span>Go</span></span></button>
</div>
</div>
</form>
Text Content
Sales (10:00 - 20:00 Print Now & Pay Later | For purchases over AED 200 * Track your order * Our recent work * Checkout * Log In * Blogs Currency:AED * GBP British Pound SterlingGBP * Saudi RiyalSAR * United Arab Emirates DirhamAED Cart 0 Recently added item(s) You have no items in your shopping cart. Search: Search Menu Search Search: Search Account Currency:AED * GBP British Pound SterlingGBP * Saudi RiyalSAR * United Arab Emirates DirhamAED * Track your order * Our recent work * My Cart * Checkout * Register * Log In * Blogs Cart 0 Recently added item(s) You have no items in your shopping cart. * Next Day Delivery * Expo 2020 Dubai * Christmas-NYE Gifts * Branding * Give Aways * Apparels & Accessories * Electronic Items * Signages * Other Branding Ideas * Medals, Awards & Trophies * USB - Flash Drives * Pen and Portfolio Folders * Eco Freindly Products * Stationery * Business Cards * Letter Heads * Envelopes * Bill Books * Other Stationery Products * Self Ink Rubber Stamps * Home decor * Large Format Prints * Home Signages * Home Decor Ideas * Next Day Delivery * * Expo 2020 Dubai * * Christmas-NYE Gifts * * Branding * * Give Aways Apparels & Accessories Electronic Items Signages Other Branding Ideas Medals, Awards & Trophies USB - Flash Drives Pen and Portfolio Folders Eco Freindly Products * Stationery * * Business Cards Letter Heads Envelopes Bill Books Other Stationery Products Self Ink Rubber Stamps * Home decor * * Large Format Prints Home Signages Home Decor Ideas * * Home * Smart Business Cards | NFC technology SMART BUSINESS CARDS | NFC TECHNOLOGY Click here for more ideas & templates Product Code: MGK_LBL_ELE#02 Smart Business Cards | NFC technology Starting From: AED150.00 Card type * -- Please Select --NFC Smart Business Card (Plastic) NFC Smart Wooden Business Card (Premium) Customization: * -- Please Select --Both Side Printing Both Side Engraving Quantity * Price Includes Both Side Customization -- Please Select --1 AED250.002 AED450.003 AED660.001 AED150.002 AED300.003 AED430.004 AED550.005 AED675.006 AED810.007 AED945.0010 AED1,300.0015 AED1,900.0020 AED2,500.0025 AED2,950.0030 AED3,300.0040 AED4,200.0045 AED4,680.0050 AED5,100.0055 AED5,550.0060 AED6,000.0070 AED6,900.0080 AED7,700.0090 AED8,550.00100 AED9,300.001 AED250.002 AED450.003 AED660.004 AED880.005 AED1,050.00 Production Timeline * -- Please Select --Standard: 3 Working Days Normal : 5 Working Days Urgent : 3 Working Days AED45.00Urgent : 2 Working Days AED85.00Urgent : 3 Working Days AED135.00Urgent : 2 Working Days AED50.00Urgent : 3 Working Days AED300.00Urgent : 3 Working Days AED500.00Urgent : 24 hour dispatch AED25.00Urgent : 24 hour dispatch AED50.00 Delivery Location * -- Please Select --Dubai / Sharjah / Ajman (City Limits) Other Emirates (City Limits) Delivery Mode * AED 29 at checkout -- Please Select --By Courier : 1 or 2 days after production Special Driver : 6 Working Hours after production AED50.00Special Driver : 10 Working Hours after production AED150.00 * Required Fields Starting From: AED150.00 Upload & Checkout Design File Comment Add to Cart * description * Templates And Ideas * Delivery Date description DETAILS NFC SMART BUSINESS CARDS SMART CARDS. Technical Details : 1. These cards will not work Non-NFC reading phones like older iPhones or any older brand phone with no NFC capability. 2. The card or chip must not be in direct contact with sunlight or any other heat source 3. Each card comes with unlimited taps 4. The data on the card can be edited at any time by the owner of the card. Both Sides can be customized as per your design provided. Sample contact file that shows up after tapping the card in your phone, This is our licensed software (click the link to check it) Limitations: * Particular Color Matching according to the final design file is not possible in this product. * The print machine of this product is only able to print normal CMYK colors and can't print Pantone, Fluorescent, Mettalic or any special colors. * Avoid using borders in the artwork of these cards as can not be cut equally from all around. * Any object if placed within 3mm distance from the edge, might get cut (kindly place all important data/logo/numbers min 4 mm inside from the edges) * Light colors (like Grey) or any Gradients of colors will show screen pattern dots and might not print very smooth. * Scratching may result in damage to the design on the card which is irreplaceable to us * The images of the product page are just for illustration purposes only, the actual product and software look observe changes periodically. * This product comes under the No refund / No return policy. * The free version of our Licensed Software is included by default, this comes with our brand name and ads. However, special requests for white labeling will come at an extra cost. FAQs Q. What is the size and material of the physical card, are there any annual charges or any recurring fee? A. 85x55mm (apx) like a credit card size and the material is also similar (High-quality durable PVC). No, there are no recurring charges, it is just a one-time payment and it is available for a lifetime (under normal circumstances), however, the Terms & Conditions are available at this link. for your reference. Q. What if I want to edit the information in the future? A. You will be having your own password-protected online dashboard, where you are able to change your personal details any number of times. Q. Can I print a QR code that functions exactly the same way the NFC does? A. Yes, in fact, we too advise that you should print the QR code of the same NFC profile link, doing this you will allow even the NON-NFC Mobile users to take advantage of your card. Q. Can the card be printed with my own personal information? A. Yes, we print the card with your company logo or any details which you want (excluding any banned or sensitive images, logos, or data by the UAE govt.) Q. Are there any Print Limitations? A. The print technique used is UV printing. Kindly avoid using solid color background to achieve the best prints on PVC. UV printing may leave print gaps which maybe only noticeable only if you look at the card closely if a large solid background is there in design. For engraving, avoid using thin fonts for the best engraving results on the wooden cards. For limitations for Engraving or UV printing, feel free to check google on more details. Templates And Ideas Delivery Date Click this link if you want to avail priority services Click here to understand the table of delivery date calculation Click this link to see 1. No-Service Shipping Areas 2. Remote / Infrequent Service Shipping Areas RELATED PRODUCTS Check items to add to the cart or select all Starting From: AED25.00 Magical (Electronic) Feature for Business Cards - Wedding Cards (Only Labels), No App required. prev next INFORMATION * About Us * Terms and Conditions * FAQ * Site Map * Search Terms * Advanced Search * Orders and Returns * Contact Us MY ACCOUNT * Sign In * View Cart * My Wishlist CONTACTS * printonline.ae Business Bay, Dubai UAE * Call us now: +971 52 383 1019 * Email: info@printonline.ae NEWSLETTER Sign Up for Our Newsletter: Go ACCEPTED PAYMENT METHODS PRODUCT TAGS Foam board printing Dubai | Invoice Printing Dubai | Online Printing Dubai | Business Card Dubai | Photo Gifts Dubai | Auto Sun Shade Dubai | Magnet Printing Dubai | Large Format Printing Dubai | Vinyl Sticker Printing Dubai | Brochure Printing Dubai | Roll up banners Dubai | Poster Printing Dubai | Flyer Printing Dubai | Customized Diaries Dubai | Customized Gifts Dubai | Business card Dubai | Spot UV Business Card Dubai | Tshirt Printing Dubai | Sign Board Printing Dubai | Printing Company In Dubai | Id Card Printing Dubai | Mug Printing Dubai | Customized Calendar Dubai | Advertising Company Dubai | advertising printing company | Corporate Gift Ideas Dubai | Digital Printing Dubai | Printing Press Dubai | Foam board printing Abu Dhabi | Invoice Printing Abu Dhabi | Online Printing Abu Dhabi | Photo Gifts Abu Dhabi | Auto Sun Shade Abu Dhabi | Magnet Printing Abu Dhabi | Large Format Printing Abu Dhabi | Vinyl Sticker Printing Abu Dhabi | Brochure Printing Abu Dhabi | Roll up banners Abu Dhabi | Poster Printing Abu Dhabi | Flyer Printing Abu Dhabi | Customized Diaries Abu Dhabi | Customized Gifts Abu Dhabi | Business card Abu Dhabi | Spot UV Business Card Abu Dhabi | Tshirt Printing Abu Dhabi | Sign Board Printing Abu Dhabi | Printing Company In Abu Dhabi | Id Card Printing Abu Dhabi | Mug Printing Abu Dhabi | Customized Calendar Abu Dhabi | Advertising Company Abu Dhabi | advertising printing company | Corporate Gift Ideas Abu Dhabi | Digital Printing Abu Dhabi | Printing Press Abu Dhabi | Customized wine glass Dubai | Personalized wine glass Dubai | Wine glass Dhabi | Gifting products Dhabi | Gifting products Abu Dhabi | banner Abu Dhabi | Coaster printing | Personalized coasters | Custom coasters Dubai | Custom coasters Abu Dhabi | Urgent printing Dubai | Urgent printing Abu Dhabi | Printing for events | balloon printing dubai | Balooon printing Abu Dhabi | Print balloons | Name badge printing | USB printing | Hoodie printing Abu Dhabi | Hoodie printing Dubai © 2022 Print Online. All Rights Reserved. Select Store: KSA UAE