$product = {"id":7408382804067,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士-剪紙系列","handle":"iphone-12-mini-mod-nx-printable-pb79","description":null,"published_at":"2024-06-11T16:35:43+08:00","created_at":"2024-05-03T15:15:36+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":41884864970851,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB79","requires_shipping":true,"taxable":true,"featured_image":{"id":31472120954979,"product_id":7408382804067,"position":9,"created_at":"2024-05-03T15:15:57+08:00","updated_at":"2024-05-03T15:15:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7517eb1046c4f63d9386829371e0fe9e5c9388f8_d0ce0c90-bba6-4974-96ef-c5ccc9563738.webp?v=1714720557","variant_ids":[41884864970851]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士-剪紙系列 - 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-PB79","featured_media":{"alt":null,"id":23877036408931,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7517eb1046c4f63d9386829371e0fe9e5c9388f8_d0ce0c90-bba6-4974-96ef-c5ccc9563738.webp?v=1714720557"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/889a2d3273d0908ca94f141181a6e39b5e872370_d5ea2f2a-7c44-4f5f-96a6-212776511ddb.webp?v=1714720538","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7066ce98aa316b3db6cd14334b3f733383e1cb04_84bc8db7-2370-4fd9-ad39-6dc544552113.webp?v=1714720541","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f043324cd1db79ad1388f349daf3bdefb045f8c6_3d35c631-5c5b-4dd8-9a9e-2363643b8880.webp?v=1714720543","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac0de772c4f6b1bbe279fe762f1eb80dab37c262_341f8e77-98c8-4816-a699-a166acfa5f8e.webp?v=1714720545","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63f400ac6c484a5bf6f35bded91c48c67cc4dee0_1165940c-7026-4787-a364-33b69858fa10.webp?v=1714720548","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a9aa02aeb5ea1db1851c753ad84652997979fb4c_0abdf989-7f9e-4b80-ab4c-f2f7ce1e00a7.webp?v=1714720550","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5dc752685b8cd1047f9bac4eec299055aeb7634d_7fe39e6b-950e-4a3f-badc-213f0c399aa7.webp?v=1714720552","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35b72dbba01273cd901d8d4ce80c3f3b6588766b_33808cb3-48b3-45b9-a5a8-9ffdbfe08a0f.webp?v=1714720555","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7517eb1046c4f63d9386829371e0fe9e5c9388f8_d0ce0c90-bba6-4974-96ef-c5ccc9563738.webp?v=1714720557","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd456728618efa5a3c79313c1c4164ee6820988c_d147831d-e81e-4cc2-85f9-0803e7c8fc9b.webp?v=1714720559","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/767b250b0773090860baa0cfca078af67ff4671c_ee15a488-5b1f-4c7f-a9e0-8f72eb8f92b4.webp?v=1714720562"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/889a2d3273d0908ca94f141181a6e39b5e872370_d5ea2f2a-7c44-4f5f-96a6-212776511ddb.webp?v=1714720538","options":["color"],"media":[{"alt":null,"id":23877032181859,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/889a2d3273d0908ca94f141181a6e39b5e872370_d5ea2f2a-7c44-4f5f-96a6-212776511ddb.webp?v=1714720538"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/889a2d3273d0908ca94f141181a6e39b5e872370_d5ea2f2a-7c44-4f5f-96a6-212776511ddb.webp?v=1714720538","width":2000},{"alt":null,"id":23877032706147,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7066ce98aa316b3db6cd14334b3f733383e1cb04_84bc8db7-2370-4fd9-ad39-6dc544552113.webp?v=1714720541"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7066ce98aa316b3db6cd14334b3f733383e1cb04_84bc8db7-2370-4fd9-ad39-6dc544552113.webp?v=1714720541","width":2000},{"alt":null,"id":23877033164899,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f043324cd1db79ad1388f349daf3bdefb045f8c6_3d35c631-5c5b-4dd8-9a9e-2363643b8880.webp?v=1714720543"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f043324cd1db79ad1388f349daf3bdefb045f8c6_3d35c631-5c5b-4dd8-9a9e-2363643b8880.webp?v=1714720543","width":2000},{"alt":null,"id":23877033984099,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac0de772c4f6b1bbe279fe762f1eb80dab37c262_341f8e77-98c8-4816-a699-a166acfa5f8e.webp?v=1714720545"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac0de772c4f6b1bbe279fe762f1eb80dab37c262_341f8e77-98c8-4816-a699-a166acfa5f8e.webp?v=1714720545","width":2000},{"alt":null,"id":23877034442851,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63f400ac6c484a5bf6f35bded91c48c67cc4dee0_1165940c-7026-4787-a364-33b69858fa10.webp?v=1714720548"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63f400ac6c484a5bf6f35bded91c48c67cc4dee0_1165940c-7026-4787-a364-33b69858fa10.webp?v=1714720548","width":2000},{"alt":null,"id":23877034934371,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a9aa02aeb5ea1db1851c753ad84652997979fb4c_0abdf989-7f9e-4b80-ab4c-f2f7ce1e00a7.webp?v=1714720550"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a9aa02aeb5ea1db1851c753ad84652997979fb4c_0abdf989-7f9e-4b80-ab4c-f2f7ce1e00a7.webp?v=1714720550","width":2000},{"alt":null,"id":23877035360355,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5dc752685b8cd1047f9bac4eec299055aeb7634d_7fe39e6b-950e-4a3f-badc-213f0c399aa7.webp?v=1714720552"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5dc752685b8cd1047f9bac4eec299055aeb7634d_7fe39e6b-950e-4a3f-badc-213f0c399aa7.webp?v=1714720552","width":2000},{"alt":null,"id":23877035982947,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35b72dbba01273cd901d8d4ce80c3f3b6588766b_33808cb3-48b3-45b9-a5a8-9ffdbfe08a0f.webp?v=1714720555"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35b72dbba01273cd901d8d4ce80c3f3b6588766b_33808cb3-48b3-45b9-a5a8-9ffdbfe08a0f.webp?v=1714720555","width":2000},{"alt":null,"id":23877036408931,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7517eb1046c4f63d9386829371e0fe9e5c9388f8_d0ce0c90-bba6-4974-96ef-c5ccc9563738.webp?v=1714720557"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7517eb1046c4f63d9386829371e0fe9e5c9388f8_d0ce0c90-bba6-4974-96ef-c5ccc9563738.webp?v=1714720557","width":2000},{"alt":null,"id":23877036965987,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd456728618efa5a3c79313c1c4164ee6820988c_d147831d-e81e-4cc2-85f9-0803e7c8fc9b.webp?v=1714720559"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd456728618efa5a3c79313c1c4164ee6820988c_d147831d-e81e-4cc2-85f9-0803e7c8fc9b.webp?v=1714720559","width":2000},{"alt":null,"id":23877037588579,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/767b250b0773090860baa0cfca078af67ff4671c_ee15a488-5b1f-4c7f-a9e0-8f72eb8f92b4.webp?v=1714720562"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/767b250b0773090860baa0cfca078af67ff4671c_ee15a488-5b1f-4c7f-a9e0-8f72eb8f92b4.webp?v=1714720562","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41884864970851,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB79","requires_shipping":true,"taxable":true,"featured_image":{"id":31472120954979,"product_id":7408382804067,"position":9,"created_at":"2024-05-03T15:15:57+08:00","updated_at":"2024-05-03T15:15:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7517eb1046c4f63d9386829371e0fe9e5c9388f8_d0ce0c90-bba6-4974-96ef-c5ccc9563738.webp?v=1714720557","variant_ids":[41884864970851]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士-剪紙系列 - 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-PB79","featured_media":{"alt":null,"id":23877036408931,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7517eb1046c4f63d9386829371e0fe9e5c9388f8_d0ce0c90-bba6-4974-96ef-c5ccc9563738.webp?v=1714720557"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41884864970851,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB79","requires_shipping":true,"taxable":true,"featured_image":{"id":31472120954979,"product_id":7408382804067,"position":9,"created_at":"2024-05-03T15:15:57+08:00","updated_at":"2024-05-03T15:15:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7517eb1046c4f63d9386829371e0fe9e5c9388f8_d0ce0c90-bba6-4974-96ef-c5ccc9563738.webp?v=1714720557","variant_ids":[41884864970851]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士-剪紙系列 - 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-PB79","featured_media":{"alt":null,"id":23877036408931,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7517eb1046c4f63d9386829371e0fe9e5c9388f8_d0ce0c90-bba6-4974-96ef-c5ccc9563738.webp?v=1714720557"}},"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: "停產" }