価格: |
¥540 (税込) |
|
[ポイント還元 5ポイント~]
|
在庫:在庫あり
var arrVari = [];
var variationImageList = [];
//Key => data
//0 => has stock
//1 => item prc with tax
//2 => tax layout of item prc
//3 => fixed prc with tax
//4 => tax layout of fixed prc
//5 => discount rate
//6 => regular prc first with tax
//7 => tax layout of regular prc first
//8 => css class of tax layout
//9 => announce_query
//10 => var 1 name
//11 => var 2 name
var countVar1 = 0;
var countVar2 = 0;;
var countVar3 = 0;;
var fixedPriceType = 'dispn';
var double_price_strikethrough = 0;
var isInSaleTime = 0;
var without_tax_layout = 0;
var regularPrcFirstFlag = 0;
var isUseVariationPrice = 0;
var stockInfo = '在庫あり';
var masterId = null;
masterId = '2816872';
var nontaxFlag = 0;
function showVariInfo(selectElement, pos) {
var tableSelectElement = null;
if(pos == '') {
// select
tableSelectElement = selectElement.parentElement.parentElement.parentElement.parentElement;
} else {
// radio
tableSelectElement = selectElement;
// Set value variation
tableSelectElement.querySelector('input[name="VAR1-1"]').value = tableSelectElement.querySelector('#'+pos).getAttribute('data-rel1');
}
var fixedPrcElement = tableSelectElement.parentElement.querySelector('#fixedPrc');
var itemPrcElement = tableSelectElement.parentElement.querySelector('#itemPrc');
var regularFirstPrcElement = tableSelectElement.parentElement.querySelector('#regularFirstPrc');
var hasStockElement = tableSelectElement.parentElement.querySelector('#hasStock');
var noStockElement = tableSelectElement.parentElement.querySelector('#noStock');
var stockElement = tableSelectElement.parentElement.querySelector('#stock');
var announceMailElement = tableSelectElement.parentElement.querySelector('#announceMail');
var itemCntElement = tableSelectElement.parentElement.querySelector('#item_cnt');
var show = 1;
if(pos == '') {
var var1SelectElement = tableSelectElement.querySelector("select[name='VAR1-1']");
var var2SelectElement = tableSelectElement.querySelector("select[name='VAR2-1']");
var var3SelectElement = tableSelectElement.querySelector("select[name='VAR3-1']");
if (countVar1 > 0) {
var x1 = var1SelectElement.selectedIndex;
var y1 = var1SelectElement.options;
}
if (countVar2 > 0) {
var x2 = var2SelectElement.selectedIndex;
var y2 = var2SelectElement.options;
}
if (countVar3 > 0) {
var x3 = var3SelectElement.selectedIndex;
var y3 = var3SelectElement.options;
}
show = 0;
if (countVar3 > 0) {
var pos = 'pos_' + y1[x1].index + '_' + y2[x2].index + '_' + y3[x3].index;
if (y1[x1].index != 0 && y2[x2].index != 0 && y3[x3].index != 0) {
show = 1;
}
} else if (countVar2 > 0) {
var pos = 'pos_' + y1[x1].index + '_' + y2[x2].index + '_';
if (y1[x1].index != 0 && y2[x2].index != 0 ) {
show = 1;
}
} else if (countVar1 > 0) {
var pos = 'pos_' + y1[x1].index + '_' + '_' ;
if (y1[x1].index != 0) {
show = 1;
}
}
}
var mainImageElement = tableSelectElement.parentElement.parentElement.querySelector('.mainImg');
if (mainImageElement != null && pos != '') {
setVariationImage(mainImageElement, pos, tableSelectElement);
}
var dateElement = tableSelectElement.parentElement.querySelector('.date');
var dateOriginalElement = tableSelectElement.parentElement.querySelector('#dateStringDisplayOriginal');
if (dateElement != null && pos != '' && arrVari[pos] && arrVari[pos][10] != '') {
if (dateElement.style.display === 'none') {
dateElement.style.display = 'table-row';
}
dateElement.querySelector('#dateString').innerHTML = arrVari[pos][10];
} else if (dateOriginalElement != null && dateOriginalElement.value != null) {
if (dateElement.style.display === 'none') {
dateElement.style.display = 'table-row';
}
dateElement.querySelector('#dateString').innerHTML = dateOriginalElement.value;
} else {
dateElement.style.display = 'none';
}
var cartButtonElement = tableSelectElement.parentElement.querySelector('#cartButton');
if (cartButtonElement != null && pos != '') {
if (arrVari[pos] && arrVari[pos][11] == 0) {
cartButtonElement.style.display = 'none';
} else {
cartButtonElement.style.display = '';
}
}
}
function showVariationDetail(selectElement) {
var tableSelectElement = selectElement.parentElement.parentElement.parentElement.parentElement;
var var1SelectElement = tableSelectElement.querySelector("select[name='VAR1-1']");
var var2SelectElement = tableSelectElement.querySelector("select[name='VAR2-1']");
var var3SelectElement = tableSelectElement.querySelector("select[name='VAR3-1']");
if (countVar1 > 0) {
var var1SelectedIndex = var1SelectElement.selectedIndex;
var var1Options = var1SelectElement.options;
}
if (countVar2 > 0) {
var var2SelectedIndex = var2SelectElement.selectedIndex;
var var2Options = var2SelectElement.options;
}
if (countVar3 > 0) {
var var3SelectedIndex = var3SelectElement.selectedIndex;
var var3Options = var3SelectElement.options;
}
var position = '';
if (countVar3 > 0) {
position = 'pos_' + var1Options[var1SelectedIndex].index + '_' + var2Options[var2SelectedIndex].index + '_' + var3Options[var3SelectedIndex].index;
} else if (countVar2 > 0) {
position = 'pos_' + var1Options[var1SelectedIndex].index + '_' + var2Options[var2SelectedIndex].index + '_';
} else if (countVar1 > 0) {
position = 'pos_' + var1Options[var1SelectedIndex].index + '_' + '_' ;
}
var mainImageElement = tableSelectElement.parentElement.parentElement.querySelector('.mainImg');
if (mainImageElement != null && position != '') {
setVariationImage(mainImageElement, position, tableSelectElement);
}
var dateElement = tableSelectElement.parentElement.querySelector('.date');
var dateOriginalElement = tableSelectElement.parentElement.querySelector('#dateStringDisplayOriginal');
if (dateElement != null && position != '' && arrVari[position] && arrVari[position][10] != '') {
if (dateElement.style.display === 'none') {
dateElement.style.display = 'table-row';
}
dateElement.querySelector('#dateString').innerHTML = arrVari[position][10];
} else if (dateOriginalElement != null && dateOriginalElement.value != null) {
if (dateElement.style.display === 'none') {
dateElement.style.display = 'table-row';
}
dateElement.querySelector('#dateString').innerHTML = dateOriginalElement.value;
} else {
dateElement.style.display = 'none';
}
var cartButtonElement = tableSelectElement.parentElement.querySelector('#cartButton');
if (cartButtonElement != null && position !== '') {
if (arrVari[position] && arrVari[position][11] == 0) {
cartButtonElement.style.display = 'none';
} else {
cartButtonElement.style.display = '';
}
}
}
function setVariationImage(mainImageElement, position, tableSelectElement) {
var variationList = position.split("_");
var positionImage = '';
if (variationImageList['selectVarImageNumber']) {
if (variationImageList['selectVarImageNumber'] == 1 && variationImageList['positionImageList'][variationList[1]]) {
positionImage = variationImageList['positionImageList'][variationList[1]];
} else if (variationImageList['selectVarImageNumber'] == 2 && variationImageList['positionImageList'][variationList[2]]) {
positionImage = variationImageList['positionImageList'][variationList[2]];
} else if (variationImageList['selectVarImageNumber'] == 3 && variationImageList['positionImageList'][variationList[3]]) {
positionImage = variationImageList['positionImageList'][variationList[3]];
}
}
var mainImageURL = '';
if (document.querySelector("input[name='mainImageURL']")) {
mainImageURL = document.querySelector("input[name='mainImageURL']").getAttribute("src");
}
var mainPositionId = '';
if (document.querySelector("input[name='mainPositionId']")) {
mainPositionId = document.querySelector("input[name='mainPositionId']").value;
}
if (positionImage !== '' && (typeof changeImg === 'function') && tableSelectElement.parentElement.parentElement.querySelector("#thumb" + positionImage)) {
changeImg(tableSelectElement.parentElement.parentElement.querySelector("#thumb" + positionImage));
} else if ((typeof changeImg === 'function') && tableSelectElement.parentElement.parentElement.querySelector("#thumb" + mainPositionId)) {
changeImg(tableSelectElement.parentElement.parentElement.querySelector("#thumb" + mainPositionId));
} else if (mainImageURL && mainPositionId) {
mainImageElement.setAttribute("src", mainImageURL);
mainImageElement.setAttribute("id", mainPositionId);
}
}
if(typeof loadBtnToCart === 'function') {
loadBtnToCart();
}
返品についての詳細はこちら