$product = {"id":7408486088803,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-全白設計","handle":"iphone-12-mini-mod-nx-printable-pb103","description":null,"published_at":"2024-06-11T16:38:34+08:00","created_at":"2024-05-03T15:36:02+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":41886027841635,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB103","requires_shipping":true,"taxable":true,"featured_image":{"id":31472402989155,"product_id":7408486088803,"position":11,"created_at":"2024-05-03T15:36:28+08:00","updated_at":"2024-05-03T15:36:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03b69f1e71440f99335cd17ddb196289785af1ab_b6fe6a3a-3353-40d5-8648-145a3a504ae2.webp?v=1714721788","variant_ids":[41886027841635]},"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-PB103","featured_media":{"alt":null,"id":23877319950435,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03b69f1e71440f99335cd17ddb196289785af1ab_b6fe6a3a-3353-40d5-8648-145a3a504ae2.webp?v=1714721788"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7823f6fa44c64cb7e3cc30f4007165a9cd41ce9a_813c2015-8fa6-44ab-82f6-50659688cc3d.webp?v=1714721765","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79c20abe172e1d4ce2c4c59d7afa8318cea58624_13392544-af5e-4554-ac35-f79d6de13be0.webp?v=1714721767","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a460ccb4c8ff1045779eb1df71e67a643d9f4b7_9e986e1a-2ec6-46ec-95a0-1cf755da94dc.webp?v=1714721770","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6290e96a4e9d1b8bc8c8d7f1a7cbe27a6bdc504d_3e10997a-2e96-49b1-9495-16b4ddf8f7cc.webp?v=1714721772","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df9d8deebf546608a79f473304b6e8e19efb8c01_d6ca8c78-6de9-4a50-a32d-62e1e3775496.webp?v=1714721774","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb8de2fdda36718855987452b5bd48aaa32970ff_f7e595b6-4380-4399-aae5-563634a6614a.webp?v=1714721776","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ca9b90d7d700d9d843232dffb1c0bba57b30c27_7717f580-7987-4ebc-b854-037b594721ad.webp?v=1714721778","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8151bf91403ee6de486110aacec7bba32ada99e6_fba8d738-8788-44ca-b157-f781c9750cf0.webp?v=1714721781","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab81112ed48085fadb51c03555f522d00bebf39c_2cd9000c-bebd-44ef-a61b-eb50af9e9443.webp?v=1714721783","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a09ac974ae7c7431db51a500fd397a40d2971c2_a9fb2f77-5adc-47f1-b95a-98287451af05.webp?v=1714721786","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03b69f1e71440f99335cd17ddb196289785af1ab_b6fe6a3a-3353-40d5-8648-145a3a504ae2.webp?v=1714721788"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7823f6fa44c64cb7e3cc30f4007165a9cd41ce9a_813c2015-8fa6-44ab-82f6-50659688cc3d.webp?v=1714721765","options":["color"],"media":[{"alt":null,"id":23877313921123,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7823f6fa44c64cb7e3cc30f4007165a9cd41ce9a_813c2015-8fa6-44ab-82f6-50659688cc3d.webp?v=1714721765"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7823f6fa44c64cb7e3cc30f4007165a9cd41ce9a_813c2015-8fa6-44ab-82f6-50659688cc3d.webp?v=1714721765","width":2000},{"alt":null,"id":23877314379875,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79c20abe172e1d4ce2c4c59d7afa8318cea58624_13392544-af5e-4554-ac35-f79d6de13be0.webp?v=1714721767"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79c20abe172e1d4ce2c4c59d7afa8318cea58624_13392544-af5e-4554-ac35-f79d6de13be0.webp?v=1714721767","width":2000},{"alt":null,"id":23877314838627,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a460ccb4c8ff1045779eb1df71e67a643d9f4b7_9e986e1a-2ec6-46ec-95a0-1cf755da94dc.webp?v=1714721770"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a460ccb4c8ff1045779eb1df71e67a643d9f4b7_9e986e1a-2ec6-46ec-95a0-1cf755da94dc.webp?v=1714721770","width":2000},{"alt":null,"id":23877315297379,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6290e96a4e9d1b8bc8c8d7f1a7cbe27a6bdc504d_3e10997a-2e96-49b1-9495-16b4ddf8f7cc.webp?v=1714721772"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6290e96a4e9d1b8bc8c8d7f1a7cbe27a6bdc504d_3e10997a-2e96-49b1-9495-16b4ddf8f7cc.webp?v=1714721772","width":2000},{"alt":null,"id":23877315690595,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df9d8deebf546608a79f473304b6e8e19efb8c01_d6ca8c78-6de9-4a50-a32d-62e1e3775496.webp?v=1714721774"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df9d8deebf546608a79f473304b6e8e19efb8c01_d6ca8c78-6de9-4a50-a32d-62e1e3775496.webp?v=1714721774","width":2000},{"alt":null,"id":23877316182115,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb8de2fdda36718855987452b5bd48aaa32970ff_f7e595b6-4380-4399-aae5-563634a6614a.webp?v=1714721776"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb8de2fdda36718855987452b5bd48aaa32970ff_f7e595b6-4380-4399-aae5-563634a6614a.webp?v=1714721776","width":2000},{"alt":null,"id":23877316739171,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ca9b90d7d700d9d843232dffb1c0bba57b30c27_7717f580-7987-4ebc-b854-037b594721ad.webp?v=1714721778"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ca9b90d7d700d9d843232dffb1c0bba57b30c27_7717f580-7987-4ebc-b854-037b594721ad.webp?v=1714721778","width":2000},{"alt":null,"id":23877317263459,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8151bf91403ee6de486110aacec7bba32ada99e6_fba8d738-8788-44ca-b157-f781c9750cf0.webp?v=1714721781"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8151bf91403ee6de486110aacec7bba32ada99e6_fba8d738-8788-44ca-b157-f781c9750cf0.webp?v=1714721781","width":2000},{"alt":null,"id":23877317918819,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab81112ed48085fadb51c03555f522d00bebf39c_2cd9000c-bebd-44ef-a61b-eb50af9e9443.webp?v=1714721783"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab81112ed48085fadb51c03555f522d00bebf39c_2cd9000c-bebd-44ef-a61b-eb50af9e9443.webp?v=1714721783","width":2000},{"alt":null,"id":23877319327843,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a09ac974ae7c7431db51a500fd397a40d2971c2_a9fb2f77-5adc-47f1-b95a-98287451af05.webp?v=1714721786"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a09ac974ae7c7431db51a500fd397a40d2971c2_a9fb2f77-5adc-47f1-b95a-98287451af05.webp?v=1714721786","width":2000},{"alt":null,"id":23877319950435,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03b69f1e71440f99335cd17ddb196289785af1ab_b6fe6a3a-3353-40d5-8648-145a3a504ae2.webp?v=1714721788"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03b69f1e71440f99335cd17ddb196289785af1ab_b6fe6a3a-3353-40d5-8648-145a3a504ae2.webp?v=1714721788","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41886027841635,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB103","requires_shipping":true,"taxable":true,"featured_image":{"id":31472402989155,"product_id":7408486088803,"position":11,"created_at":"2024-05-03T15:36:28+08:00","updated_at":"2024-05-03T15:36:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03b69f1e71440f99335cd17ddb196289785af1ab_b6fe6a3a-3353-40d5-8648-145a3a504ae2.webp?v=1714721788","variant_ids":[41886027841635]},"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-PB103","featured_media":{"alt":null,"id":23877319950435,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03b69f1e71440f99335cd17ddb196289785af1ab_b6fe6a3a-3353-40d5-8648-145a3a504ae2.webp?v=1714721788"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41886027841635,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB103","requires_shipping":true,"taxable":true,"featured_image":{"id":31472402989155,"product_id":7408486088803,"position":11,"created_at":"2024-05-03T15:36:28+08:00","updated_at":"2024-05-03T15:36:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03b69f1e71440f99335cd17ddb196289785af1ab_b6fe6a3a-3353-40d5-8648-145a3a504ae2.webp?v=1714721788","variant_ids":[41886027841635]},"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-PB103","featured_media":{"alt":null,"id":23877319950435,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03b69f1e71440f99335cd17ddb196289785af1ab_b6fe6a3a-3353-40d5-8648-145a3a504ae2.webp?v=1714721788"}},"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: "停產" }