" ); document.getElementById("test-change").style.display = "none"; } else { document.getElementById("test-change").style.display = "block"; } productInfo.variants?.map((variant) => { variant.price = variant.price.replace("~", ""); variant.delivery_profile.price = variant.delivery_profile?.price?.replace("~", "") || ""; }); let renderTagList = '
    '; productInfo.product_tags.map((item) => { renderTagList += `
  • ${item}
  • `; }); renderTagList += "
"; let renderSKU = '
'; productInfo.variants.map((item) => { renderSKU += `
${item.title}
${item.sku}
`; }); renderSKU += "
"; let renderCollections = '
    '; productInfo.collections.map((item) => { renderCollections += `
  • ${item.name}
  • `; }); renderCollections += "
"; document .getElementById("tag-list") .insertAdjacentHTML("beforeend", renderTagList); document .getElementById("collection") .insertAdjacentHTML("beforeend", renderCollections); const renderCopyButton = ''; const renderCopyTag = ''; const renderCopyDescription = ''; const renderCopyCollection = ''; const renderCopySKU = ''; document .getElementById("description") .insertAdjacentHTML("afterend", renderCopyTag); document .getElementById("description") .insertAdjacentHTML("beforeend", renderCopyDescription); document .getElementById("searchProduct") .insertAdjacentHTML("afterend", renderCopyCollection); document .getElementById("sku-list") .insertAdjacentHTML("beforeend", renderSKU); document .getElementById("sku-list") .insertAdjacentHTML("afterbegin", renderCopySKU); document .getElementById("sku-list") .insertAdjacentHTML("beforeend", renderCopyButton); let renderProductInformation = `
image

${productInfo.product_title}

${productInfo.variants[0].price} 税込

送料目安: ${productInfo.variants[0]?.delivery_profile?.price}

Type

`; let renderVariants = ""; productInfo.variants.map((item, index) => { renderVariants += `
`; }); renderProductInformation += renderVariants; const renderQuantity = `
`; renderProductInformation += renderQuantity; let renderDescription = `
`; if (productInfo.hinban) { renderDescription += `
品番
${productInfo.hinban}
`; } if (productInfo.size) { renderDescription += `
サイズ
${productInfo.size}
`; } if (productInfo.repeat) { renderDescription += `
リピート
${productInfo.repeat}
`; } if (productInfo.detail) { renderDescription += `
詳細
${productInfo.detail}
`; } if (productInfo.sozai) { renderDescription += `
素材
${productInfo.sozai}
`; } if (productInfo.tani) { renderDescription += `
注文単位
${productInfo.tani}
`; } if (productInfo.hassou) { renderDescription += `
発送目安
${productInfo.hassou}
`; } if (productInfo.nintei) { renderDescription += `
認定など
${productInfo.nintei}
`; } if (productInfo.catalog) { renderDescription += `
掲載カタログ
${productInfo.catalog}
`; } if (productInfo.brand) { renderDescription += `
ブランド
${productInfo.brand}
`; } renderDescription += `
`; renderProductInformation += renderDescription; document .getElementById("description") .insertAdjacentHTML("beforeend", renderDescription); document .getElementById("test-change") .insertAdjacentHTML("beforeend", renderProductInformation); document .getElementsByClassName("variant-list")[0] ?.classList.add("checked"); let resultBlockDetail = ``; // `; resultBlockDetail += document.getElementsByClassName("block-detail")[0].outerHTML; resultBlockDetail += "