$product = {"id":7415999955043,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - X戰機-線條白","handle":"iphone-xs-max-mod-nx-printable-pb16","description":null,"published_at":"2024-06-11T16:50:03+08:00","created_at":"2024-05-06T12:39:52+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 XS Max","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":41916371828835,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB16","requires_shipping":true,"taxable":true,"featured_image":{"id":31490954985571,"product_id":7415999955043,"position":8,"created_at":"2024-05-06T12:40:11+08:00","updated_at":"2024-05-06T12:40:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2076da30b39bb2e993ebf29ddeb8612cd62e9f1c_69f63597-a3ab-4deb-917e-a357dc31dc02.webp?v=1714970411","variant_ids":[41916371828835]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - X戰機-線條白 - 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-PB16","featured_media":{"alt":null,"id":23896362090595,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2076da30b39bb2e993ebf29ddeb8612cd62e9f1c_69f63597-a3ab-4deb-917e-a357dc31dc02.webp?v=1714970411"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f82c790be83c29b9d13297d2012814d047aa631b_cc197e80-083a-4517-a7a2-0bffdcea89e9.webp?v=1714970394","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcbdc789b00a9bca3cb195f3812bb38aebcf75c3_ee0a7f08-ebb0-4084-95b0-2ab85278e00f.webp?v=1714970397","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be502eccb724dbaedeb1761c4464961ca54bcf40_bec2a72c-9717-46a1-9605-8f0f04a859be.webp?v=1714970399","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c6b9559986b26820ef9e506fe12e36254d25485_9e745a59-cfa7-492b-bae2-3411f066019f.webp?v=1714970402","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7556b290b196aae645ad4fb0a803b7efddefec0c_3652c449-f5d1-4683-a3e1-86a5c2ce6059.webp?v=1714970404","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2ba970b131c1cd16f2af55d1877bd6742beb34a_33c873a4-b741-453f-b78a-c6d926ccdfc6.webp?v=1714970406","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a1a99f5b55bbc4496bc160157a09a175237f660_960def25-0b03-4e20-801e-37aaf52f372e.webp?v=1714970409","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2076da30b39bb2e993ebf29ddeb8612cd62e9f1c_69f63597-a3ab-4deb-917e-a357dc31dc02.webp?v=1714970411","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f713c00382bcab8a3dc764599d1cd648702dd31_292d050e-6d71-4032-8f19-ac8ef372c51f.webp?v=1714970414","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c1db882bf72e60dd8d8d2c2fea6cd39a94a7a81_92185edc-63ed-431a-8125-b8069333c8db.webp?v=1714970416"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f82c790be83c29b9d13297d2012814d047aa631b_cc197e80-083a-4517-a7a2-0bffdcea89e9.webp?v=1714970394","options":["color"],"media":[{"alt":null,"id":23896357535843,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f82c790be83c29b9d13297d2012814d047aa631b_cc197e80-083a-4517-a7a2-0bffdcea89e9.webp?v=1714970394"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f82c790be83c29b9d13297d2012814d047aa631b_cc197e80-083a-4517-a7a2-0bffdcea89e9.webp?v=1714970394","width":2000},{"alt":null,"id":23896358125667,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcbdc789b00a9bca3cb195f3812bb38aebcf75c3_ee0a7f08-ebb0-4084-95b0-2ab85278e00f.webp?v=1714970397"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcbdc789b00a9bca3cb195f3812bb38aebcf75c3_ee0a7f08-ebb0-4084-95b0-2ab85278e00f.webp?v=1714970397","width":2000},{"alt":null,"id":23896358453347,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be502eccb724dbaedeb1761c4464961ca54bcf40_bec2a72c-9717-46a1-9605-8f0f04a859be.webp?v=1714970399"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be502eccb724dbaedeb1761c4464961ca54bcf40_bec2a72c-9717-46a1-9605-8f0f04a859be.webp?v=1714970399","width":2000},{"alt":null,"id":23896359534691,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c6b9559986b26820ef9e506fe12e36254d25485_9e745a59-cfa7-492b-bae2-3411f066019f.webp?v=1714970402"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c6b9559986b26820ef9e506fe12e36254d25485_9e745a59-cfa7-492b-bae2-3411f066019f.webp?v=1714970402","width":2000},{"alt":null,"id":23896360026211,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7556b290b196aae645ad4fb0a803b7efddefec0c_3652c449-f5d1-4683-a3e1-86a5c2ce6059.webp?v=1714970404"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7556b290b196aae645ad4fb0a803b7efddefec0c_3652c449-f5d1-4683-a3e1-86a5c2ce6059.webp?v=1714970404","width":2000},{"alt":null,"id":23896360845411,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2ba970b131c1cd16f2af55d1877bd6742beb34a_33c873a4-b741-453f-b78a-c6d926ccdfc6.webp?v=1714970406"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2ba970b131c1cd16f2af55d1877bd6742beb34a_33c873a4-b741-453f-b78a-c6d926ccdfc6.webp?v=1714970406","width":2000},{"alt":null,"id":23896361664611,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a1a99f5b55bbc4496bc160157a09a175237f660_960def25-0b03-4e20-801e-37aaf52f372e.webp?v=1714970409"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a1a99f5b55bbc4496bc160157a09a175237f660_960def25-0b03-4e20-801e-37aaf52f372e.webp?v=1714970409","width":2000},{"alt":null,"id":23896362090595,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2076da30b39bb2e993ebf29ddeb8612cd62e9f1c_69f63597-a3ab-4deb-917e-a357dc31dc02.webp?v=1714970411"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2076da30b39bb2e993ebf29ddeb8612cd62e9f1c_69f63597-a3ab-4deb-917e-a357dc31dc02.webp?v=1714970411","width":2000},{"alt":null,"id":23896362647651,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f713c00382bcab8a3dc764599d1cd648702dd31_292d050e-6d71-4032-8f19-ac8ef372c51f.webp?v=1714970414"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f713c00382bcab8a3dc764599d1cd648702dd31_292d050e-6d71-4032-8f19-ac8ef372c51f.webp?v=1714970414","width":2000},{"alt":null,"id":23896363171939,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c1db882bf72e60dd8d8d2c2fea6cd39a94a7a81_92185edc-63ed-431a-8125-b8069333c8db.webp?v=1714970416"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c1db882bf72e60dd8d8d2c2fea6cd39a94a7a81_92185edc-63ed-431a-8125-b8069333c8db.webp?v=1714970416","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41916371828835,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB16","requires_shipping":true,"taxable":true,"featured_image":{"id":31490954985571,"product_id":7415999955043,"position":8,"created_at":"2024-05-06T12:40:11+08:00","updated_at":"2024-05-06T12:40:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2076da30b39bb2e993ebf29ddeb8612cd62e9f1c_69f63597-a3ab-4deb-917e-a357dc31dc02.webp?v=1714970411","variant_ids":[41916371828835]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - X戰機-線條白 - 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-PB16","featured_media":{"alt":null,"id":23896362090595,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2076da30b39bb2e993ebf29ddeb8612cd62e9f1c_69f63597-a3ab-4deb-917e-a357dc31dc02.webp?v=1714970411"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41916371828835,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB16","requires_shipping":true,"taxable":true,"featured_image":{"id":31490954985571,"product_id":7415999955043,"position":8,"created_at":"2024-05-06T12:40:11+08:00","updated_at":"2024-05-06T12:40:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2076da30b39bb2e993ebf29ddeb8612cd62e9f1c_69f63597-a3ab-4deb-917e-a357dc31dc02.webp?v=1714970411","variant_ids":[41916371828835]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - X戰機-線條白 - 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-PB16","featured_media":{"alt":null,"id":23896362090595,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2076da30b39bb2e993ebf29ddeb8612cd62e9f1c_69f63597-a3ab-4deb-917e-a357dc31dc02.webp?v=1714970411"}},"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: "停產" }