$product = {"id":7408439296099,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - ATAT-俠盜一號","handle":"iphone-12-mini-mod-nx-printable-pb67","description":null,"published_at":"2024-06-11T16:37:15+08:00","created_at":"2024-05-03T15:26:46+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 12 mini","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-star-wars","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":41885492805731,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB67","requires_shipping":true,"taxable":true,"featured_image":{"id":31472282140771,"product_id":7408439296099,"position":1,"created_at":"2024-05-03T15:26:48+08:00","updated_at":"2024-05-03T15:26:48+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b193aead9ea6e260c68b93440869b2a90ca753f3_1dd899bc-8bd6-44c7-af89-c4a557964836.webp?v=1714721208","variant_ids":[41885492805731]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - ATAT-俠盜一號 - 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":"NPB0118424-PB67","featured_media":{"alt":null,"id":23877198479459,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b193aead9ea6e260c68b93440869b2a90ca753f3_1dd899bc-8bd6-44c7-af89-c4a557964836.webp?v=1714721208"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b193aead9ea6e260c68b93440869b2a90ca753f3_1dd899bc-8bd6-44c7-af89-c4a557964836.webp?v=1714721208","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b2b0cce825fbad40d3095616ba6232a864a6610_81cecb04-e994-4fab-8372-361cc544ed05.webp?v=1714721211","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/acfadad08402f475ede1dfb0996d8bcc058e802b_34ac12d5-dd81-4971-a00b-df8faede547c.webp?v=1714721213","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e8b9988bd2d172d319b1670dadf301f0b5f0aea_b0fd307b-1f9d-489e-b2cf-529dfd2ce612.webp?v=1714721215","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72e7ca73652cc799b96402b95fb276c9ed32cdfa_7aaa97a5-586b-4ede-87af-2da7e436c2a5.webp?v=1714721218","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c94f45b3d07df16261656b4b009abd93901fe2ab_e15b9787-b66e-4916-a82f-07b2c73d541e.webp?v=1714721220","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a9fb1e454d80b720a60a6f7933627e51cb06f67c_530e51bc-340c-491e-91c0-47875a9a8793.webp?v=1714721222","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86d3e647135038095455a80aa4f78cbe8ba1ebc7_c23cdcf0-8843-4cbf-9cf5-135b8bf79dba.webp?v=1714721224","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/04deac37f74e7342864ef53385b582755d1d347a_ab947101-1fa5-49d9-99f4-45441fafbc1c.webp?v=1714721227","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6546447b6fabb38d3f3e5d8b6981321ba67e7acf_322e5b54-47d0-42dc-9093-1408a0691b7c.webp?v=1714721229","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d05f503217ccc146238755696cacdf378bb2af5_38bf578c-5260-4a63-863b-ec8c74fb92df.webp?v=1714721231"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b193aead9ea6e260c68b93440869b2a90ca753f3_1dd899bc-8bd6-44c7-af89-c4a557964836.webp?v=1714721208","options":["color"],"media":[{"alt":null,"id":23877198479459,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b193aead9ea6e260c68b93440869b2a90ca753f3_1dd899bc-8bd6-44c7-af89-c4a557964836.webp?v=1714721208"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b193aead9ea6e260c68b93440869b2a90ca753f3_1dd899bc-8bd6-44c7-af89-c4a557964836.webp?v=1714721208","width":2000},{"alt":null,"id":23877199790179,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b2b0cce825fbad40d3095616ba6232a864a6610_81cecb04-e994-4fab-8372-361cc544ed05.webp?v=1714721211"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b2b0cce825fbad40d3095616ba6232a864a6610_81cecb04-e994-4fab-8372-361cc544ed05.webp?v=1714721211","width":2000},{"alt":null,"id":23877200674915,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/acfadad08402f475ede1dfb0996d8bcc058e802b_34ac12d5-dd81-4971-a00b-df8faede547c.webp?v=1714721213"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/acfadad08402f475ede1dfb0996d8bcc058e802b_34ac12d5-dd81-4971-a00b-df8faede547c.webp?v=1714721213","width":2000},{"alt":null,"id":23877201199203,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e8b9988bd2d172d319b1670dadf301f0b5f0aea_b0fd307b-1f9d-489e-b2cf-529dfd2ce612.webp?v=1714721215"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e8b9988bd2d172d319b1670dadf301f0b5f0aea_b0fd307b-1f9d-489e-b2cf-529dfd2ce612.webp?v=1714721215","width":2000},{"alt":null,"id":23877201625187,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72e7ca73652cc799b96402b95fb276c9ed32cdfa_7aaa97a5-586b-4ede-87af-2da7e436c2a5.webp?v=1714721218"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72e7ca73652cc799b96402b95fb276c9ed32cdfa_7aaa97a5-586b-4ede-87af-2da7e436c2a5.webp?v=1714721218","width":2000},{"alt":null,"id":23877202116707,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c94f45b3d07df16261656b4b009abd93901fe2ab_e15b9787-b66e-4916-a82f-07b2c73d541e.webp?v=1714721220"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c94f45b3d07df16261656b4b009abd93901fe2ab_e15b9787-b66e-4916-a82f-07b2c73d541e.webp?v=1714721220","width":2000},{"alt":null,"id":23877202411619,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a9fb1e454d80b720a60a6f7933627e51cb06f67c_530e51bc-340c-491e-91c0-47875a9a8793.webp?v=1714721222"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a9fb1e454d80b720a60a6f7933627e51cb06f67c_530e51bc-340c-491e-91c0-47875a9a8793.webp?v=1714721222","width":2000},{"alt":null,"id":23877203001443,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86d3e647135038095455a80aa4f78cbe8ba1ebc7_c23cdcf0-8843-4cbf-9cf5-135b8bf79dba.webp?v=1714721224"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86d3e647135038095455a80aa4f78cbe8ba1ebc7_c23cdcf0-8843-4cbf-9cf5-135b8bf79dba.webp?v=1714721224","width":2000},{"alt":null,"id":23877203427427,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/04deac37f74e7342864ef53385b582755d1d347a_ab947101-1fa5-49d9-99f4-45441fafbc1c.webp?v=1714721227"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/04deac37f74e7342864ef53385b582755d1d347a_ab947101-1fa5-49d9-99f4-45441fafbc1c.webp?v=1714721227","width":2000},{"alt":null,"id":23877203951715,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6546447b6fabb38d3f3e5d8b6981321ba67e7acf_322e5b54-47d0-42dc-9093-1408a0691b7c.webp?v=1714721229"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6546447b6fabb38d3f3e5d8b6981321ba67e7acf_322e5b54-47d0-42dc-9093-1408a0691b7c.webp?v=1714721229","width":2000},{"alt":null,"id":23877204410467,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d05f503217ccc146238755696cacdf378bb2af5_38bf578c-5260-4a63-863b-ec8c74fb92df.webp?v=1714721231"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d05f503217ccc146238755696cacdf378bb2af5_38bf578c-5260-4a63-863b-ec8c74fb92df.webp?v=1714721231","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41885492805731,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB67","requires_shipping":true,"taxable":true,"featured_image":{"id":31472282140771,"product_id":7408439296099,"position":1,"created_at":"2024-05-03T15:26:48+08:00","updated_at":"2024-05-03T15:26:48+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b193aead9ea6e260c68b93440869b2a90ca753f3_1dd899bc-8bd6-44c7-af89-c4a557964836.webp?v=1714721208","variant_ids":[41885492805731]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - ATAT-俠盜一號 - 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":"NPB0118424-PB67","featured_media":{"alt":null,"id":23877198479459,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b193aead9ea6e260c68b93440869b2a90ca753f3_1dd899bc-8bd6-44c7-af89-c4a557964836.webp?v=1714721208"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41885492805731,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB67","requires_shipping":true,"taxable":true,"featured_image":{"id":31472282140771,"product_id":7408439296099,"position":1,"created_at":"2024-05-03T15:26:48+08:00","updated_at":"2024-05-03T15:26:48+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b193aead9ea6e260c68b93440869b2a90ca753f3_1dd899bc-8bd6-44c7-af89-c4a557964836.webp?v=1714721208","variant_ids":[41885492805731]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - ATAT-俠盜一號 - 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":"NPB0118424-PB67","featured_media":{"alt":null,"id":23877198479459,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b193aead9ea6e260c68b93440869b2a90ca753f3_1dd899bc-8bd6-44c7-af89-c4a557964836.webp?v=1714721208"}},"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: "停產" }