$product = {"id":7416057987171,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Batman - 超級惡棍和蝙蝠俠Logo貼紙款","handle":"iphone-xs-max-mod-nx-printable-sb10","description":null,"published_at":"2024-06-11T16:51:37+08:00","created_at":"2024-05-06T12:50:19+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Batman","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-batman","device-iPhone XS Max","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-batman","Top50","type-Mod NX Printable"],"price":90000,"price_min":90000,"price_max":90000,"available":true,"price_varies":false,"compare_at_price":null,"compare_at_price_min":0,"compare_at_price_max":0,"compare_at_price_varies":false,"variants":[{"id":41916990586979,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-SB10","requires_shipping":true,"taxable":true,"featured_image":{"id":31491101196387,"product_id":7416057987171,"position":2,"created_at":"2024-05-06T12:50:24+08:00","updated_at":"2024-05-06T12:50:24+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d19a534966b3b7470901d54575678ef352bd1f3e_f93de336-1f0a-4174-9536-a93050aabffd.webp?v=1714971024","variant_ids":[41916990586979]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Batman - 超級惡棍和蝙蝠俠Logo貼紙款 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108624-SB10","featured_media":{"alt":null,"id":23896508563555,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d19a534966b3b7470901d54575678ef352bd1f3e_f93de336-1f0a-4174-9536-a93050aabffd.webp?v=1714971024"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a620ef0619473fa5b0fd4d6e58013d609d30599f_f2dd7b74-4143-428c-9ba9-4d8219dcad1c.webp?v=1714971022","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d19a534966b3b7470901d54575678ef352bd1f3e_f93de336-1f0a-4174-9536-a93050aabffd.webp?v=1714971024","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23bcd6fc4b780031f46213c583b0df930b1c5ff3_8aa27b5d-6db4-4cee-9f63-21f9fc65a015.webp?v=1714971026","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/808ef9450bb69570c82b4cbb958d84382dcd7d3a_2d6d416e-6c7a-413c-8d2b-f120cef01aad.webp?v=1714971029","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc1cab08650aec9acac801532f6c61ba675b00c7_39b0b94b-0dad-44c0-96fa-6b92b7ece4f2.webp?v=1714971031","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d65a41b075d8b38523e10c980787cee160445d3c_9beb8471-4e3e-4a6d-a681-771214d555b0.webp?v=1714971034","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/327da5aa5c7d54b0fa18b35346ef6c6da2c3b3da_360cc165-b391-4a50-8811-02e6a9737fc4.webp?v=1714971036","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c764811c10ebe6f1b1dcd741da0912d6e922207_4147ba85-c522-46e4-8fc2-e4790e7ab78c.webp?v=1714971039","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbe07ac0ac8b0bdf75540c6d3f9f13107806f158_e6e99134-56d7-4f45-8407-ff0f3d5f3e49.webp?v=1714971041","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6959c9e5d1504fc418f484fc661f0ea39acb4dab_3329765c-d194-4f03-9dca-3be36c0e7c6b.webp?v=1714971043"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a620ef0619473fa5b0fd4d6e58013d609d30599f_f2dd7b74-4143-428c-9ba9-4d8219dcad1c.webp?v=1714971022","options":["color"],"media":[{"alt":null,"id":23896508137571,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a620ef0619473fa5b0fd4d6e58013d609d30599f_f2dd7b74-4143-428c-9ba9-4d8219dcad1c.webp?v=1714971022"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a620ef0619473fa5b0fd4d6e58013d609d30599f_f2dd7b74-4143-428c-9ba9-4d8219dcad1c.webp?v=1714971022","width":2000},{"alt":null,"id":23896508563555,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d19a534966b3b7470901d54575678ef352bd1f3e_f93de336-1f0a-4174-9536-a93050aabffd.webp?v=1714971024"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d19a534966b3b7470901d54575678ef352bd1f3e_f93de336-1f0a-4174-9536-a93050aabffd.webp?v=1714971024","width":2000},{"alt":null,"id":23896509546595,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23bcd6fc4b780031f46213c583b0df930b1c5ff3_8aa27b5d-6db4-4cee-9f63-21f9fc65a015.webp?v=1714971026"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23bcd6fc4b780031f46213c583b0df930b1c5ff3_8aa27b5d-6db4-4cee-9f63-21f9fc65a015.webp?v=1714971026","width":2000},{"alt":null,"id":23896510005347,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/808ef9450bb69570c82b4cbb958d84382dcd7d3a_2d6d416e-6c7a-413c-8d2b-f120cef01aad.webp?v=1714971029"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/808ef9450bb69570c82b4cbb958d84382dcd7d3a_2d6d416e-6c7a-413c-8d2b-f120cef01aad.webp?v=1714971029","width":2000},{"alt":null,"id":23896510431331,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc1cab08650aec9acac801532f6c61ba675b00c7_39b0b94b-0dad-44c0-96fa-6b92b7ece4f2.webp?v=1714971031"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc1cab08650aec9acac801532f6c61ba675b00c7_39b0b94b-0dad-44c0-96fa-6b92b7ece4f2.webp?v=1714971031","width":2000},{"alt":null,"id":23896510988387,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d65a41b075d8b38523e10c980787cee160445d3c_9beb8471-4e3e-4a6d-a681-771214d555b0.webp?v=1714971034"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d65a41b075d8b38523e10c980787cee160445d3c_9beb8471-4e3e-4a6d-a681-771214d555b0.webp?v=1714971034","width":2000},{"alt":null,"id":23896511447139,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/327da5aa5c7d54b0fa18b35346ef6c6da2c3b3da_360cc165-b391-4a50-8811-02e6a9737fc4.webp?v=1714971036"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/327da5aa5c7d54b0fa18b35346ef6c6da2c3b3da_360cc165-b391-4a50-8811-02e6a9737fc4.webp?v=1714971036","width":2000},{"alt":null,"id":23896512004195,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c764811c10ebe6f1b1dcd741da0912d6e922207_4147ba85-c522-46e4-8fc2-e4790e7ab78c.webp?v=1714971039"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c764811c10ebe6f1b1dcd741da0912d6e922207_4147ba85-c522-46e4-8fc2-e4790e7ab78c.webp?v=1714971039","width":2000},{"alt":null,"id":23896512659555,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbe07ac0ac8b0bdf75540c6d3f9f13107806f158_e6e99134-56d7-4f45-8407-ff0f3d5f3e49.webp?v=1714971041"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbe07ac0ac8b0bdf75540c6d3f9f13107806f158_e6e99134-56d7-4f45-8407-ff0f3d5f3e49.webp?v=1714971041","width":2000},{"alt":null,"id":23896513511523,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6959c9e5d1504fc418f484fc661f0ea39acb4dab_3329765c-d194-4f03-9dca-3be36c0e7c6b.webp?v=1714971043"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6959c9e5d1504fc418f484fc661f0ea39acb4dab_3329765c-d194-4f03-9dca-3be36c0e7c6b.webp?v=1714971043","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41916990586979,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-SB10","requires_shipping":true,"taxable":true,"featured_image":{"id":31491101196387,"product_id":7416057987171,"position":2,"created_at":"2024-05-06T12:50:24+08:00","updated_at":"2024-05-06T12:50:24+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d19a534966b3b7470901d54575678ef352bd1f3e_f93de336-1f0a-4174-9536-a93050aabffd.webp?v=1714971024","variant_ids":[41916990586979]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Batman - 超級惡棍和蝙蝠俠Logo貼紙款 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108624-SB10","featured_media":{"alt":null,"id":23896508563555,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d19a534966b3b7470901d54575678ef352bd1f3e_f93de336-1f0a-4174-9536-a93050aabffd.webp?v=1714971024"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41916990586979,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-SB10","requires_shipping":true,"taxable":true,"featured_image":{"id":31491101196387,"product_id":7416057987171,"position":2,"created_at":"2024-05-06T12:50:24+08:00","updated_at":"2024-05-06T12:50:24+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d19a534966b3b7470901d54575678ef352bd1f3e_f93de336-1f0a-4174-9536-a93050aabffd.webp?v=1714971024","variant_ids":[41916990586979]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Batman - 超級惡棍和蝙蝠俠Logo貼紙款 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108624-SB10","featured_media":{"alt":null,"id":23896508563555,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d19a534966b3b7470901d54575678ef352bd1f3e_f93de336-1f0a-4174-9536-a93050aabffd.webp?v=1714971024"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null; $brand_handle = null; $type = ""; var sellingStatus // 只有設計款(SKU 含 '-')才需要合圖 if ($isMerge && $defaultVariant.sku.includes('-')) { $(document).ready(function() { var productImg = $product.images[0]; var bumperImg = window.getProductImageUrl($defaultVariant.sku.split('-')[0]); var layers = ($type === 'mod-nx-backplate' || $type === 'mod-backplate') ? [productImg, bumperImg] : [bumperImg, productImg]; window.mergeProductImages(layers).then(function (mergedImg) { $('.merged-img').attr('src', mergedImg); }); }); }; var sellingStatusData window.fetchSellingStatus().then(data => { try { sellingStatusData = data; } catch (error) { sellingStatusData = null console.error('Unable to parse selling status', error) } $(document).ready(function() { handleSellingStatus($defaultVariant.sku); }); }) function handleSellingStatus(currentSku) { if (!sellingStatusData) { console.error('No selling status available!') return } const sellingStatusElement = document.getElementById('selling-status') const addToCartButton = document.getElementById('AddToCart-product-template') const currentProductSku = currentSku.replace(/-(.*)$/, '-') if ($variants) { const flattenedSellingStatus = [...sellingStatusData.pending, ...sellingStatusData.preorder] const matchSellingStatusProduct = flattenedSellingStatus.filter(product => currentProductSku === product.sku) if (matchSellingStatusProduct.length > 0) { const isProductPending = matchSellingStatusProduct[0].status === 'pending' const matchDate = matchSellingStatusProduct[0].date sellingStatus = isProductPending ? "缺貨中" : "預購完成出貨日:" + matchDate sellingStatusElement.textContent = sellingStatus if (sellingStatus.includes("缺貨中")){ addToCartButton.disabled ='true'; addToCartButton.textContent = "缺貨中無法加入購物車" } else { addToCartButton.textContent = "加到購物車" } } else { sellingStatusElement.textContent = '' addToCartButton.textContent = "加到購物車" }; }; }; document.addEventListener('DOMContentLoaded', function () { var currentVariantSelect = document.getElementById('SingleOptionSelector-0') currentVariantSelect.addEventListener('change', function() { var currentSku = $('#current_sku').text() var skuElement = document.getElementById('current-sku') skuElement.textContent = currentSku handleSellingStatus(currentSku) }); });
// Override default values of shop.strings for each template. // Alternate product templates can change values of // add to cart button, sold out, and unavailable states here. theme.productStrings = { addToCart: "加到購物車", soldOut: "售完", unavailable: "停產" }