if (typeof cls_InovaDiamonds_Iframe === 'undefined') {
class InovaDiamonds_Iframe {
Get_Info_Product(Request_From) {
//
//
cls_InovaDiamonds_Iframe.User_Ring = '' + meta.product.id + '';
var ar = document.getElementsByClassName('variant__input--color-swatch');
var met = 'w';
for (var i = 0; i < ar.length; i++){
if (ar[i].checked == true){
if (ar[i].value.toLowerCase().indexOf('yellow') > 0){ met = 'y'}
else if (ar[i].value.toLowerCase().indexOf('rose') > 0){ met = 'r'}
}
}
cls_InovaDiamonds_Iframe.User_Ring += '^metall:' + met;
}
Print_Buttons(data, type_prod){
var _View = '';
//
_View = 'block'
if (cls_InovaDiamonds_Iframe.Mode == 'list') {
if (document.location.href.indexOf('mode=view') > 0) {
var SVG = ''
var ar_data = data.split(',');
var o_Grid = document.getElementsByClassName('ProductListWrapper')[0];
var ar = o_Grid.getElementsByClassName('Grid__Cell Grid__Cell--item');
var scr = document.createElement('STYLE')
var st_st = '.im_try{font-size:0px;position:absolute;z-index:19;cursor:pointer;}.im_try img{width:100%}'
if (cls_InovaDiamonds_Iframe.WA___Flag_Mobile == '1') {
st_st += '.im_try{width:22px;right:10px;top:8px;}'
}
else {
st_st += '.im_try{width:82.8px;right:11px;top:11px;} .vto_l{font-size: 11px;color:#707070;padding:2px 7px;font-weight:300;letter-spacing:.1em;font-family: var(--heading-font-family)}'
}
scr.innerHTML = st_st;
for (var i = 0; i < ar.length; i++) {
var aa = ar[i].getElementsByClassName('ProductItem__Wrapper')
if (aa.length > 0) {
var ar_A = ar[i].getElementsByClassName('wishlist-button')[0];
if (ar_A) {
var SKU = ar_A.getAttribute('data-product-id');
for (var j = 0; j < ar_data.length; j++) {
var ar_i = ar_data[j].split('-');
if (ar_i[0] == SKU) {
if (ar_i[2] == '1') {
var o = document.createElement('DIV')
o.setAttribute('onclick', 'cls_InovaDiamonds_Iframe.Show_Ring("' + SKU + '","","")');
o.setAttribute('class', 'im_try')
if (cls_InovaDiamonds_Iframe.WA___Flag_Mobile == '1') {
o.innerHTML = SVG.replace(/WWW/g, '22')
}
else {
o.innerHTML = '
TRY ON
' + SVG.replace(/WWW/g, '20') + '
';
}
aa[0].appendChild(o)
}
}
}
}
}
}
o_Grid.appendChild(scr)
}
}
else {
var icon = '';
if (cls_InovaDiamonds_Iframe.WA___Flag_Mobile == 1) {
var ar = document.getElementsByClassName('Product__SlideshowNavScroller')
if (ar.length > 0) {
var A = document.createElement('DIV')
var st_1 = 'left:20px;bottom:26px;';
//if (ar[0].style.display == 'none') {
// st_1 = 'left:0px;width:100%;bottom:-14px;'
//}
A.setAttribute('style', 'z-index:333;position:absolute;' + st_1 + '')
//A.innerHTML = ''
// + '
' + icon.replace(/HHH/g, '27') + '
TRY ON
'
A.innerHTML = ''
+ '
' + icon.replace(/HHH/g, '27') + '
TRY ON
'
var o = document.getElementsByClassName('Product__Gallery--withThumbnails')[0]
o.appendChild(A)
}
else {
var A = document.createElement('DIV')
A.setAttribute('style', 'z-index:333;position:absolute;left:25px;bottom:9px;')
A.innerHTML = ''
+ '
' + icon.replace(/HHH/g, '27') + '
TRY ON
'
document.getElementsByClassName('flickity-viewport')[0].appendChild(A)
}
}
else {
var o = document.getElementsByClassName('product__thumbs--scroller')[0]
var A = document.createElement('DIV')
A.setAttribute('class', 'product__thumb-item')
A.setAttribute('onclick', 'cls_InovaDiamonds_Iframe.Inova__OpenFrame()')
A.innerHTML = '