$product = {"id":7408535863395,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - X翼戰機","handle":"iphone-12-pro-max-mod-nx-printable-pb74","description":null,"published_at":"2024-06-11T16:40:00+08:00","created_at":"2024-05-03T15:45:44+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 pro 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":41886599282787,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB74","requires_shipping":true,"taxable":true,"featured_image":{"id":31472529604707,"product_id":7408535863395,"position":10,"created_at":"2024-05-03T15:46:07+08:00","updated_at":"2024-05-03T15:46:07+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c8363b6633f67ef17b2402c13ace8caf7042c924_f99bbe80-f3bf-4c3e-8293-2d9c9eae969a.webp?v=1714722367","variant_ids":[41886599282787]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro 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":"NPB0118724-PB74","featured_media":{"alt":null,"id":23877446860899,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c8363b6633f67ef17b2402c13ace8caf7042c924_f99bbe80-f3bf-4c3e-8293-2d9c9eae969a.webp?v=1714722367"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d558582fc5ef08ac094f777d51a74f335519305e_119197da-1286-47af-85ec-baa8b10e7678.webp?v=1714722346","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f85e5bbf25fa11125ba9869995231b0bfbae166_70636634-6ec8-42cd-b54d-3378c1831d7a.webp?v=1714722349","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/47a1f0ee39df01c601a569b4fab372ea0654fa25_c88e36f3-b0d5-4f41-8d70-21e09e2e5221.webp?v=1714722351","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/53ed772927ec1c17524486c638ec853767ab5888_b7a09421-930e-44d5-ae77-9173e2a688f9.webp?v=1714722354","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/393dd3d3ede1b252fc89428c73b023f2380c91de_75658125-61c1-4894-80e6-ed9c124e875d.webp?v=1714722356","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2021f787d21199d3d4a75db69cf98fd0f6648c74_b31a1e58-d802-4a77-9391-8c697008fa44.webp?v=1714722358","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45c4e30182caadc8d3e07eb9b9c9a030f264ba23_acfd81ab-5340-47a8-9bba-91ef4975510d.webp?v=1714722360","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81984b86808e1a78df6f7a3744f76c1567bf2790_133a46bf-c663-4852-b9f6-4101c3329c75.webp?v=1714722363","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68d1e32c87ef2c9d119ce4ba7b75d9ba38bac2b2_7d89aa20-a769-4b8f-b43c-550773a6e108.webp?v=1714722365","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c8363b6633f67ef17b2402c13ace8caf7042c924_f99bbe80-f3bf-4c3e-8293-2d9c9eae969a.webp?v=1714722367"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d558582fc5ef08ac094f777d51a74f335519305e_119197da-1286-47af-85ec-baa8b10e7678.webp?v=1714722346","options":["color"],"media":[{"alt":null,"id":23877442011235,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d558582fc5ef08ac094f777d51a74f335519305e_119197da-1286-47af-85ec-baa8b10e7678.webp?v=1714722346"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d558582fc5ef08ac094f777d51a74f335519305e_119197da-1286-47af-85ec-baa8b10e7678.webp?v=1714722346","width":2000},{"alt":null,"id":23877442764899,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f85e5bbf25fa11125ba9869995231b0bfbae166_70636634-6ec8-42cd-b54d-3378c1831d7a.webp?v=1714722349"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f85e5bbf25fa11125ba9869995231b0bfbae166_70636634-6ec8-42cd-b54d-3378c1831d7a.webp?v=1714722349","width":2000},{"alt":null,"id":23877443256419,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/47a1f0ee39df01c601a569b4fab372ea0654fa25_c88e36f3-b0d5-4f41-8d70-21e09e2e5221.webp?v=1714722351"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/47a1f0ee39df01c601a569b4fab372ea0654fa25_c88e36f3-b0d5-4f41-8d70-21e09e2e5221.webp?v=1714722351","width":2000},{"alt":null,"id":23877443682403,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/53ed772927ec1c17524486c638ec853767ab5888_b7a09421-930e-44d5-ae77-9173e2a688f9.webp?v=1714722354"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/53ed772927ec1c17524486c638ec853767ab5888_b7a09421-930e-44d5-ae77-9173e2a688f9.webp?v=1714722354","width":2000},{"alt":null,"id":23877444206691,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/393dd3d3ede1b252fc89428c73b023f2380c91de_75658125-61c1-4894-80e6-ed9c124e875d.webp?v=1714722356"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/393dd3d3ede1b252fc89428c73b023f2380c91de_75658125-61c1-4894-80e6-ed9c124e875d.webp?v=1714722356","width":2000},{"alt":null,"id":23877444599907,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2021f787d21199d3d4a75db69cf98fd0f6648c74_b31a1e58-d802-4a77-9391-8c697008fa44.webp?v=1714722358"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2021f787d21199d3d4a75db69cf98fd0f6648c74_b31a1e58-d802-4a77-9391-8c697008fa44.webp?v=1714722358","width":2000},{"alt":null,"id":23877445451875,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45c4e30182caadc8d3e07eb9b9c9a030f264ba23_acfd81ab-5340-47a8-9bba-91ef4975510d.webp?v=1714722360"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45c4e30182caadc8d3e07eb9b9c9a030f264ba23_acfd81ab-5340-47a8-9bba-91ef4975510d.webp?v=1714722360","width":2000},{"alt":null,"id":23877445943395,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81984b86808e1a78df6f7a3744f76c1567bf2790_133a46bf-c663-4852-b9f6-4101c3329c75.webp?v=1714722363"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81984b86808e1a78df6f7a3744f76c1567bf2790_133a46bf-c663-4852-b9f6-4101c3329c75.webp?v=1714722363","width":2000},{"alt":null,"id":23877446369379,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68d1e32c87ef2c9d119ce4ba7b75d9ba38bac2b2_7d89aa20-a769-4b8f-b43c-550773a6e108.webp?v=1714722365"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68d1e32c87ef2c9d119ce4ba7b75d9ba38bac2b2_7d89aa20-a769-4b8f-b43c-550773a6e108.webp?v=1714722365","width":2000},{"alt":null,"id":23877446860899,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c8363b6633f67ef17b2402c13ace8caf7042c924_f99bbe80-f3bf-4c3e-8293-2d9c9eae969a.webp?v=1714722367"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c8363b6633f67ef17b2402c13ace8caf7042c924_f99bbe80-f3bf-4c3e-8293-2d9c9eae969a.webp?v=1714722367","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41886599282787,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB74","requires_shipping":true,"taxable":true,"featured_image":{"id":31472529604707,"product_id":7408535863395,"position":10,"created_at":"2024-05-03T15:46:07+08:00","updated_at":"2024-05-03T15:46:07+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c8363b6633f67ef17b2402c13ace8caf7042c924_f99bbe80-f3bf-4c3e-8293-2d9c9eae969a.webp?v=1714722367","variant_ids":[41886599282787]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro 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":"NPB0118724-PB74","featured_media":{"alt":null,"id":23877446860899,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c8363b6633f67ef17b2402c13ace8caf7042c924_f99bbe80-f3bf-4c3e-8293-2d9c9eae969a.webp?v=1714722367"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41886599282787,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB74","requires_shipping":true,"taxable":true,"featured_image":{"id":31472529604707,"product_id":7408535863395,"position":10,"created_at":"2024-05-03T15:46:07+08:00","updated_at":"2024-05-03T15:46:07+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c8363b6633f67ef17b2402c13ace8caf7042c924_f99bbe80-f3bf-4c3e-8293-2d9c9eae969a.webp?v=1714722367","variant_ids":[41886599282787]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro 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":"NPB0118724-PB74","featured_media":{"alt":null,"id":23877446860899,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c8363b6633f67ef17b2402c13ace8caf7042c924_f99bbe80-f3bf-4c3e-8293-2d9c9eae969a.webp?v=1714722367"}},"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: "停產" }