$product = {"id":7408479699043,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 千年鷹-美式復古","handle":"iphone-12-mini-mod-nx-printable-pb99","description":null,"published_at":"2024-06-11T16:38:23+08:00","created_at":"2024-05-03T15:34:48+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":41885950509155,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB99","requires_shipping":true,"taxable":true,"featured_image":{"id":31472384376931,"product_id":7408479699043,"position":5,"created_at":"2024-05-03T15:35:00+08:00","updated_at":"2024-05-03T15:35:00+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0ad0feb572bc66a3952f05e42bea59854cad26a_d1a05e4a-182d-436c-8511-5da61fb06636.webp?v=1714721700","variant_ids":[41885950509155]},"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-PB99","featured_media":{"alt":null,"id":23877301305443,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0ad0feb572bc66a3952f05e42bea59854cad26a_d1a05e4a-182d-436c-8511-5da61fb06636.webp?v=1714721700"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/851a505b136731416d51ff6156845cb83c97fc30_784326ad-8cfe-4849-917b-9d2229c9d59a.webp?v=1714721691","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d45064e56009e3c862b711b648ece2d464090e93_986e32e1-ab93-45b2-9353-02fb109e122a.webp?v=1714721693","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d70170f8334460f85826dca1a6389bd41c14650_d2f0a663-fcfe-4cbe-a030-d591a7711764.webp?v=1714721695","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67d2105ac5436914e4f51870ea34d97684ffc4a1_31412d02-f621-409c-b3fc-e73e319076f7.webp?v=1714721698","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0ad0feb572bc66a3952f05e42bea59854cad26a_d1a05e4a-182d-436c-8511-5da61fb06636.webp?v=1714721700","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/706e4beb90cfa9b742cecaa27b9558e11e9e5cbb_27cad0cf-7ec7-4df1-a1fe-a7bf424e8f21.webp?v=1714721702","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/175a60dd900b1a747dcb3d012f694f94c800ef7a_113b1def-7770-4f23-bcaa-d9b864212b04.webp?v=1714721705","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c526dccea64c89a1999259a1b865d80d108907c_3e47764a-dcd9-4542-a989-bfa7819e6e28.webp?v=1714721707","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59eef2f8c6c5672dde6af5b32e47b679500878c0_861dddf3-043c-430a-88db-ba0a7bd920a5.webp?v=1714721710","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a2ea3de4d500c93f550dc3040909028ee071c5b_6b77e002-aa97-4140-a847-30422351f93b.webp?v=1714721712","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3c45da26b3b599f32209c09caef34f991ab777c_d78492d0-c49b-4f47-85c6-7f320210536a.webp?v=1714721714"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/851a505b136731416d51ff6156845cb83c97fc30_784326ad-8cfe-4849-917b-9d2229c9d59a.webp?v=1714721691","options":["color"],"media":[{"alt":null,"id":23877299437667,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/851a505b136731416d51ff6156845cb83c97fc30_784326ad-8cfe-4849-917b-9d2229c9d59a.webp?v=1714721691"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/851a505b136731416d51ff6156845cb83c97fc30_784326ad-8cfe-4849-917b-9d2229c9d59a.webp?v=1714721691","width":2000},{"alt":null,"id":23877299863651,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d45064e56009e3c862b711b648ece2d464090e93_986e32e1-ab93-45b2-9353-02fb109e122a.webp?v=1714721693"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d45064e56009e3c862b711b648ece2d464090e93_986e32e1-ab93-45b2-9353-02fb109e122a.webp?v=1714721693","width":2000},{"alt":null,"id":23877300322403,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d70170f8334460f85826dca1a6389bd41c14650_d2f0a663-fcfe-4cbe-a030-d591a7711764.webp?v=1714721695"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d70170f8334460f85826dca1a6389bd41c14650_d2f0a663-fcfe-4cbe-a030-d591a7711764.webp?v=1714721695","width":2000},{"alt":null,"id":23877300748387,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67d2105ac5436914e4f51870ea34d97684ffc4a1_31412d02-f621-409c-b3fc-e73e319076f7.webp?v=1714721698"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67d2105ac5436914e4f51870ea34d97684ffc4a1_31412d02-f621-409c-b3fc-e73e319076f7.webp?v=1714721698","width":2000},{"alt":null,"id":23877301305443,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0ad0feb572bc66a3952f05e42bea59854cad26a_d1a05e4a-182d-436c-8511-5da61fb06636.webp?v=1714721700"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0ad0feb572bc66a3952f05e42bea59854cad26a_d1a05e4a-182d-436c-8511-5da61fb06636.webp?v=1714721700","width":2000},{"alt":null,"id":23877301829731,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/706e4beb90cfa9b742cecaa27b9558e11e9e5cbb_27cad0cf-7ec7-4df1-a1fe-a7bf424e8f21.webp?v=1714721702"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/706e4beb90cfa9b742cecaa27b9558e11e9e5cbb_27cad0cf-7ec7-4df1-a1fe-a7bf424e8f21.webp?v=1714721702","width":2000},{"alt":null,"id":23877302255715,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/175a60dd900b1a747dcb3d012f694f94c800ef7a_113b1def-7770-4f23-bcaa-d9b864212b04.webp?v=1714721705"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/175a60dd900b1a747dcb3d012f694f94c800ef7a_113b1def-7770-4f23-bcaa-d9b864212b04.webp?v=1714721705","width":2000},{"alt":null,"id":23877302747235,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c526dccea64c89a1999259a1b865d80d108907c_3e47764a-dcd9-4542-a989-bfa7819e6e28.webp?v=1714721707"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c526dccea64c89a1999259a1b865d80d108907c_3e47764a-dcd9-4542-a989-bfa7819e6e28.webp?v=1714721707","width":2000},{"alt":null,"id":23877303205987,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59eef2f8c6c5672dde6af5b32e47b679500878c0_861dddf3-043c-430a-88db-ba0a7bd920a5.webp?v=1714721710"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59eef2f8c6c5672dde6af5b32e47b679500878c0_861dddf3-043c-430a-88db-ba0a7bd920a5.webp?v=1714721710","width":2000},{"alt":null,"id":23877303730275,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a2ea3de4d500c93f550dc3040909028ee071c5b_6b77e002-aa97-4140-a847-30422351f93b.webp?v=1714721712"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a2ea3de4d500c93f550dc3040909028ee071c5b_6b77e002-aa97-4140-a847-30422351f93b.webp?v=1714721712","width":2000},{"alt":null,"id":23877304254563,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3c45da26b3b599f32209c09caef34f991ab777c_d78492d0-c49b-4f47-85c6-7f320210536a.webp?v=1714721714"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3c45da26b3b599f32209c09caef34f991ab777c_d78492d0-c49b-4f47-85c6-7f320210536a.webp?v=1714721714","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41885950509155,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB99","requires_shipping":true,"taxable":true,"featured_image":{"id":31472384376931,"product_id":7408479699043,"position":5,"created_at":"2024-05-03T15:35:00+08:00","updated_at":"2024-05-03T15:35:00+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0ad0feb572bc66a3952f05e42bea59854cad26a_d1a05e4a-182d-436c-8511-5da61fb06636.webp?v=1714721700","variant_ids":[41885950509155]},"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-PB99","featured_media":{"alt":null,"id":23877301305443,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0ad0feb572bc66a3952f05e42bea59854cad26a_d1a05e4a-182d-436c-8511-5da61fb06636.webp?v=1714721700"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41885950509155,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB99","requires_shipping":true,"taxable":true,"featured_image":{"id":31472384376931,"product_id":7408479699043,"position":5,"created_at":"2024-05-03T15:35:00+08:00","updated_at":"2024-05-03T15:35:00+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0ad0feb572bc66a3952f05e42bea59854cad26a_d1a05e4a-182d-436c-8511-5da61fb06636.webp?v=1714721700","variant_ids":[41885950509155]},"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-PB99","featured_media":{"alt":null,"id":23877301305443,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0ad0feb572bc66a3952f05e42bea59854cad26a_d1a05e4a-182d-436c-8511-5da61fb06636.webp?v=1714721700"}},"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: "停產" }