$product = {"id":7408511025251,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - X戰機-線條白","handle":"iphone-12-mini-mod-nx-printable-pb16","description":null,"published_at":"2024-06-11T16:39:17+08:00","created_at":"2024-05-03T15:40:55+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":41886315249763,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB16","requires_shipping":true,"taxable":true,"featured_image":{"id":31472463609955,"product_id":7408511025251,"position":3,"created_at":"2024-05-03T15:41:02+08:00","updated_at":"2024-05-03T15:41:02+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1b126f5c860814356924f4240e4ccc2057f6c9e_a571992b-e7bd-4e05-8041-c18651db7fc1.webp?v=1714722062","variant_ids":[41886315249763]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0118424-PB16","featured_media":{"alt":null,"id":23877380669539,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1b126f5c860814356924f4240e4ccc2057f6c9e_a571992b-e7bd-4e05-8041-c18651db7fc1.webp?v=1714722062"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c9159e42e7f29a9e81eec37f310443ab45862a1_adae1989-19fc-4077-9508-802a0f9e18e8.webp?v=1714722057","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3b44cdfdaa818a5d0ba77b89deb64667292c2f3_bbd006d7-1cf8-4593-8b89-2719d6671731.webp?v=1714722060","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1b126f5c860814356924f4240e4ccc2057f6c9e_a571992b-e7bd-4e05-8041-c18651db7fc1.webp?v=1714722062","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f610a09b3fa784225dbcc62ba641d1db48183cd_00bf4bda-0992-4238-bc0b-0e0111ad7fc3.webp?v=1714722064","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2e00e93083e4cdd4ff33486133749e59f217736_50f1ce91-611d-4f79-9240-90a4332a9d42.webp?v=1714722067","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/683a6b92b72faa22a42052a1105e3f13de55d2bb_8131f19f-c4ca-4010-807d-ddf6730ebe41.webp?v=1714722069","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23a4dc422d2886ee261056b92ccdf73544f42936_e09fe84b-c57b-4fc4-a448-23a7132653fb.webp?v=1714722071","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6455bb8efe4cba27fabb13e7d5b0b8a546515fa6_e2c16570-b189-40c5-9463-090d572905b9.webp?v=1714722073","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c4abf5394d4bb96d16d5773b72c1f0c9103cdf8_d82423e3-0f7d-4465-bf8c-bf215874f42d.webp?v=1714722076","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ed33365ce163af9a819ca07231978268f5ce41e_9fba3bba-6a32-4940-bee3-dac981b29b03.webp?v=1714722078","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0ea5bcd135e57bc7300a82059bd9e547fb48e72_1d5135a5-ce54-4ade-adea-c6c3c6611f60.webp?v=1714722080"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c9159e42e7f29a9e81eec37f310443ab45862a1_adae1989-19fc-4077-9508-802a0f9e18e8.webp?v=1714722057","options":["color"],"media":[{"alt":null,"id":23877379686499,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c9159e42e7f29a9e81eec37f310443ab45862a1_adae1989-19fc-4077-9508-802a0f9e18e8.webp?v=1714722057"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c9159e42e7f29a9e81eec37f310443ab45862a1_adae1989-19fc-4077-9508-802a0f9e18e8.webp?v=1714722057","width":2000},{"alt":null,"id":23877380210787,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3b44cdfdaa818a5d0ba77b89deb64667292c2f3_bbd006d7-1cf8-4593-8b89-2719d6671731.webp?v=1714722060"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3b44cdfdaa818a5d0ba77b89deb64667292c2f3_bbd006d7-1cf8-4593-8b89-2719d6671731.webp?v=1714722060","width":2000},{"alt":null,"id":23877380669539,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1b126f5c860814356924f4240e4ccc2057f6c9e_a571992b-e7bd-4e05-8041-c18651db7fc1.webp?v=1714722062"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1b126f5c860814356924f4240e4ccc2057f6c9e_a571992b-e7bd-4e05-8041-c18651db7fc1.webp?v=1714722062","width":2000},{"alt":null,"id":23877381062755,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f610a09b3fa784225dbcc62ba641d1db48183cd_00bf4bda-0992-4238-bc0b-0e0111ad7fc3.webp?v=1714722064"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f610a09b3fa784225dbcc62ba641d1db48183cd_00bf4bda-0992-4238-bc0b-0e0111ad7fc3.webp?v=1714722064","width":2000},{"alt":null,"id":23877381554275,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2e00e93083e4cdd4ff33486133749e59f217736_50f1ce91-611d-4f79-9240-90a4332a9d42.webp?v=1714722067"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2e00e93083e4cdd4ff33486133749e59f217736_50f1ce91-611d-4f79-9240-90a4332a9d42.webp?v=1714722067","width":2000},{"alt":null,"id":23877381980259,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/683a6b92b72faa22a42052a1105e3f13de55d2bb_8131f19f-c4ca-4010-807d-ddf6730ebe41.webp?v=1714722069"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/683a6b92b72faa22a42052a1105e3f13de55d2bb_8131f19f-c4ca-4010-807d-ddf6730ebe41.webp?v=1714722069","width":2000},{"alt":null,"id":23877382471779,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23a4dc422d2886ee261056b92ccdf73544f42936_e09fe84b-c57b-4fc4-a448-23a7132653fb.webp?v=1714722071"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23a4dc422d2886ee261056b92ccdf73544f42936_e09fe84b-c57b-4fc4-a448-23a7132653fb.webp?v=1714722071","width":2000},{"alt":null,"id":23877383094371,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6455bb8efe4cba27fabb13e7d5b0b8a546515fa6_e2c16570-b189-40c5-9463-090d572905b9.webp?v=1714722073"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6455bb8efe4cba27fabb13e7d5b0b8a546515fa6_e2c16570-b189-40c5-9463-090d572905b9.webp?v=1714722073","width":2000},{"alt":null,"id":23877383487587,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c4abf5394d4bb96d16d5773b72c1f0c9103cdf8_d82423e3-0f7d-4465-bf8c-bf215874f42d.webp?v=1714722076"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c4abf5394d4bb96d16d5773b72c1f0c9103cdf8_d82423e3-0f7d-4465-bf8c-bf215874f42d.webp?v=1714722076","width":2000},{"alt":null,"id":23877384077411,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ed33365ce163af9a819ca07231978268f5ce41e_9fba3bba-6a32-4940-bee3-dac981b29b03.webp?v=1714722078"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ed33365ce163af9a819ca07231978268f5ce41e_9fba3bba-6a32-4940-bee3-dac981b29b03.webp?v=1714722078","width":2000},{"alt":null,"id":23877384470627,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0ea5bcd135e57bc7300a82059bd9e547fb48e72_1d5135a5-ce54-4ade-adea-c6c3c6611f60.webp?v=1714722080"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0ea5bcd135e57bc7300a82059bd9e547fb48e72_1d5135a5-ce54-4ade-adea-c6c3c6611f60.webp?v=1714722080","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41886315249763,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB16","requires_shipping":true,"taxable":true,"featured_image":{"id":31472463609955,"product_id":7408511025251,"position":3,"created_at":"2024-05-03T15:41:02+08:00","updated_at":"2024-05-03T15:41:02+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1b126f5c860814356924f4240e4ccc2057f6c9e_a571992b-e7bd-4e05-8041-c18651db7fc1.webp?v=1714722062","variant_ids":[41886315249763]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0118424-PB16","featured_media":{"alt":null,"id":23877380669539,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1b126f5c860814356924f4240e4ccc2057f6c9e_a571992b-e7bd-4e05-8041-c18651db7fc1.webp?v=1714722062"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41886315249763,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB16","requires_shipping":true,"taxable":true,"featured_image":{"id":31472463609955,"product_id":7408511025251,"position":3,"created_at":"2024-05-03T15:41:02+08:00","updated_at":"2024-05-03T15:41:02+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1b126f5c860814356924f4240e4ccc2057f6c9e_a571992b-e7bd-4e05-8041-c18651db7fc1.webp?v=1714722062","variant_ids":[41886315249763]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0118424-PB16","featured_media":{"alt":null,"id":23877380669539,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1b126f5c860814356924f4240e4ccc2057f6c9e_a571992b-e7bd-4e05-8041-c18651db7fc1.webp?v=1714722062"}},"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: "停產" }