$product = {"id":7408457973859,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2-噴漆黑","handle":"iphone-12-mini-mod-nx-printable-pb07","description":null,"published_at":"2024-06-11T16:37:46+08:00","created_at":"2024-05-03T15:30:32+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":41885703897187,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB07","requires_shipping":true,"taxable":true,"featured_image":{"id":31472332505187,"product_id":7408457973859,"position":7,"created_at":"2024-05-03T15:30:48+08:00","updated_at":"2024-05-03T15:30:48+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe4a3754e28487f521bbf220d51ff8166766f494_c9080580-d600-4cd2-aa7a-b131e84e870f.webp?v=1714721448","variant_ids":[41885703897187]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2-噴漆黑 - 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-PB07","featured_media":{"alt":null,"id":23877249007715,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe4a3754e28487f521bbf220d51ff8166766f494_c9080580-d600-4cd2-aa7a-b131e84e870f.webp?v=1714721448"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/931c1765a8ea5a8115689a3373059e3fbd1ecb18_c3783cbb-e488-4126-9ca3-810c14f9cac2.webp?v=1714721435","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc04bb13d05f7e15c541a1a2121e8fb44a988b8d_73025aa3-52cf-42a0-8a3c-b9ab7f36cb6b.webp?v=1714721437","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3654caabbcf1d77ed0164749c8dc48c89f2d672f_e7f73ef3-1cad-49b0-bf7b-724fbc75e8eb.webp?v=1714721439","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b87213e3de21726f3969dd765b2e9dffc960bd7_c8ba72cc-43a2-46bf-9e2b-5518c1319afa.webp?v=1714721441","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e5b2527388b538aaebf56e74a017ffcf2e69110b_c4a8368e-7002-4959-98b6-3bdc4524e5b2.webp?v=1714721444","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6508f57f8974eb4f94d89e3afc447ee9c09f0b5b_ebd2ed34-80c1-4b38-8553-8d11cac09cdc.webp?v=1714721446","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe4a3754e28487f521bbf220d51ff8166766f494_c9080580-d600-4cd2-aa7a-b131e84e870f.webp?v=1714721448","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/909bf620d45da42c8850f8e67f033098ac987ee0_05e24066-2246-4f91-80c9-098215521530.webp?v=1714721451","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb7c560a3f6c604d762eb5e1db69e71778132cdf_8a118f16-a048-4bb2-8aa0-6a85f4077987.webp?v=1714721453","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b114ab4ab8b0d6ed0f5090caedaefda4d08940e1_e006e7c9-1f02-4ea7-b7c1-c08b75ce1ba7.webp?v=1714721455","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78924b5db58d5a3bc8c5ad43e7576eb2be37f5b5_28a27ffb-9da9-4fb7-aa18-7cdb946a10fc.webp?v=1714721458"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/931c1765a8ea5a8115689a3373059e3fbd1ecb18_c3783cbb-e488-4126-9ca3-810c14f9cac2.webp?v=1714721435","options":["color"],"media":[{"alt":null,"id":23877246025827,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/931c1765a8ea5a8115689a3373059e3fbd1ecb18_c3783cbb-e488-4126-9ca3-810c14f9cac2.webp?v=1714721435"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/931c1765a8ea5a8115689a3373059e3fbd1ecb18_c3783cbb-e488-4126-9ca3-810c14f9cac2.webp?v=1714721435","width":2000},{"alt":null,"id":23877246550115,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc04bb13d05f7e15c541a1a2121e8fb44a988b8d_73025aa3-52cf-42a0-8a3c-b9ab7f36cb6b.webp?v=1714721437"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc04bb13d05f7e15c541a1a2121e8fb44a988b8d_73025aa3-52cf-42a0-8a3c-b9ab7f36cb6b.webp?v=1714721437","width":2000},{"alt":null,"id":23877247008867,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3654caabbcf1d77ed0164749c8dc48c89f2d672f_e7f73ef3-1cad-49b0-bf7b-724fbc75e8eb.webp?v=1714721439"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3654caabbcf1d77ed0164749c8dc48c89f2d672f_e7f73ef3-1cad-49b0-bf7b-724fbc75e8eb.webp?v=1714721439","width":2000},{"alt":null,"id":23877247500387,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b87213e3de21726f3969dd765b2e9dffc960bd7_c8ba72cc-43a2-46bf-9e2b-5518c1319afa.webp?v=1714721441"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b87213e3de21726f3969dd765b2e9dffc960bd7_c8ba72cc-43a2-46bf-9e2b-5518c1319afa.webp?v=1714721441","width":2000},{"alt":null,"id":23877247860835,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e5b2527388b538aaebf56e74a017ffcf2e69110b_c4a8368e-7002-4959-98b6-3bdc4524e5b2.webp?v=1714721444"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e5b2527388b538aaebf56e74a017ffcf2e69110b_c4a8368e-7002-4959-98b6-3bdc4524e5b2.webp?v=1714721444","width":2000},{"alt":null,"id":23877248483427,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6508f57f8974eb4f94d89e3afc447ee9c09f0b5b_ebd2ed34-80c1-4b38-8553-8d11cac09cdc.webp?v=1714721446"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6508f57f8974eb4f94d89e3afc447ee9c09f0b5b_ebd2ed34-80c1-4b38-8553-8d11cac09cdc.webp?v=1714721446","width":2000},{"alt":null,"id":23877249007715,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe4a3754e28487f521bbf220d51ff8166766f494_c9080580-d600-4cd2-aa7a-b131e84e870f.webp?v=1714721448"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe4a3754e28487f521bbf220d51ff8166766f494_c9080580-d600-4cd2-aa7a-b131e84e870f.webp?v=1714721448","width":2000},{"alt":null,"id":23877249335395,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/909bf620d45da42c8850f8e67f033098ac987ee0_05e24066-2246-4f91-80c9-098215521530.webp?v=1714721451"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/909bf620d45da42c8850f8e67f033098ac987ee0_05e24066-2246-4f91-80c9-098215521530.webp?v=1714721451","width":2000},{"alt":null,"id":23877249794147,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb7c560a3f6c604d762eb5e1db69e71778132cdf_8a118f16-a048-4bb2-8aa0-6a85f4077987.webp?v=1714721453"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb7c560a3f6c604d762eb5e1db69e71778132cdf_8a118f16-a048-4bb2-8aa0-6a85f4077987.webp?v=1714721453","width":2000},{"alt":null,"id":23877250089059,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b114ab4ab8b0d6ed0f5090caedaefda4d08940e1_e006e7c9-1f02-4ea7-b7c1-c08b75ce1ba7.webp?v=1714721455"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b114ab4ab8b0d6ed0f5090caedaefda4d08940e1_e006e7c9-1f02-4ea7-b7c1-c08b75ce1ba7.webp?v=1714721455","width":2000},{"alt":null,"id":23877250580579,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78924b5db58d5a3bc8c5ad43e7576eb2be37f5b5_28a27ffb-9da9-4fb7-aa18-7cdb946a10fc.webp?v=1714721458"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78924b5db58d5a3bc8c5ad43e7576eb2be37f5b5_28a27ffb-9da9-4fb7-aa18-7cdb946a10fc.webp?v=1714721458","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41885703897187,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB07","requires_shipping":true,"taxable":true,"featured_image":{"id":31472332505187,"product_id":7408457973859,"position":7,"created_at":"2024-05-03T15:30:48+08:00","updated_at":"2024-05-03T15:30:48+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe4a3754e28487f521bbf220d51ff8166766f494_c9080580-d600-4cd2-aa7a-b131e84e870f.webp?v=1714721448","variant_ids":[41885703897187]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2-噴漆黑 - 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-PB07","featured_media":{"alt":null,"id":23877249007715,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe4a3754e28487f521bbf220d51ff8166766f494_c9080580-d600-4cd2-aa7a-b131e84e870f.webp?v=1714721448"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41885703897187,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB07","requires_shipping":true,"taxable":true,"featured_image":{"id":31472332505187,"product_id":7408457973859,"position":7,"created_at":"2024-05-03T15:30:48+08:00","updated_at":"2024-05-03T15:30:48+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe4a3754e28487f521bbf220d51ff8166766f494_c9080580-d600-4cd2-aa7a-b131e84e870f.webp?v=1714721448","variant_ids":[41885703897187]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2-噴漆黑 - 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-PB07","featured_media":{"alt":null,"id":23877249007715,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe4a3754e28487f521bbf220d51ff8166766f494_c9080580-d600-4cd2-aa7a-b131e84e870f.webp?v=1714721448"}},"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: "停產" }