$product = {"id":7408561782883,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 星戰漫畫-貼紙系列","handle":"iphone-12-pro-max-mod-nx-printable-pb83","description":null,"published_at":"2024-06-11T16:40:46+08:00","created_at":"2024-05-03T15:51:03+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":41886890229859,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB83","requires_shipping":true,"taxable":true,"featured_image":{"id":31472596910179,"product_id":7408561782883,"position":8,"created_at":"2024-05-03T15:51:23+08:00","updated_at":"2024-05-03T15:51:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed79efc4bd72949bb91ca377aa07b1a123969272_b4f074a6-859f-405b-aeb5-347d46fd4757.webp?v=1714722683","variant_ids":[41886890229859]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0118724-PB83","featured_media":{"alt":null,"id":23877514428515,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed79efc4bd72949bb91ca377aa07b1a123969272_b4f074a6-859f-405b-aeb5-347d46fd4757.webp?v=1714722683"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69c5be78e9d95d8f0c58a2e6cf5aed378cffcb22_ba51ab54-aa3c-424a-86e8-e890a1ea7ff9.webp?v=1714722666","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e38672d1a14c5c58f67dbe6648319a40a6c2d198_40995323-0aa9-4856-ab42-e571b76b1fe1.webp?v=1714722668","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/761a10bfa2394b9208c4f8886be088625969dd80_87de28fb-5357-4a7b-bd7c-19fbb993b57f.webp?v=1714722671","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3aa28ee121cdd134766b889b5796b3c427232ddb_d4658be3-95be-42e8-85a9-434dbc0fe6b0.webp?v=1714722674","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b78145075c00d21d7b4ca21ed1ca0fa6b48bd89b_43827124-aec1-4bdb-93e2-6d7d66cf3471.webp?v=1714722676","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9287890571f9e8f70b23ebe0992c82be11a2e2fd_bb943d04-0cb7-404e-901c-9f12007eb834.webp?v=1714722678","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7cd891e5c1330ae51535686e68830cb10f1648a7_7c13cd76-ba48-46e6-a857-85f8c9a00006.webp?v=1714722681","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed79efc4bd72949bb91ca377aa07b1a123969272_b4f074a6-859f-405b-aeb5-347d46fd4757.webp?v=1714722683","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64742c6192236f4c9a082509b14c135162d9d411_ee0e0da7-bb91-4733-9464-c5e1144cfac2.webp?v=1714722686","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7885216bcd68535578efd75bdd9f8543b1f6a3e4_de8004f2-08df-4b92-9808-914617ffe813.webp?v=1714722689"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69c5be78e9d95d8f0c58a2e6cf5aed378cffcb22_ba51ab54-aa3c-424a-86e8-e890a1ea7ff9.webp?v=1714722666","options":["color"],"media":[{"alt":null,"id":23877510496355,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69c5be78e9d95d8f0c58a2e6cf5aed378cffcb22_ba51ab54-aa3c-424a-86e8-e890a1ea7ff9.webp?v=1714722666"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69c5be78e9d95d8f0c58a2e6cf5aed378cffcb22_ba51ab54-aa3c-424a-86e8-e890a1ea7ff9.webp?v=1714722666","width":2000},{"alt":null,"id":23877511020643,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e38672d1a14c5c58f67dbe6648319a40a6c2d198_40995323-0aa9-4856-ab42-e571b76b1fe1.webp?v=1714722668"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e38672d1a14c5c58f67dbe6648319a40a6c2d198_40995323-0aa9-4856-ab42-e571b76b1fe1.webp?v=1714722668","width":2000},{"alt":null,"id":23877511610467,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/761a10bfa2394b9208c4f8886be088625969dd80_87de28fb-5357-4a7b-bd7c-19fbb993b57f.webp?v=1714722671"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/761a10bfa2394b9208c4f8886be088625969dd80_87de28fb-5357-4a7b-bd7c-19fbb993b57f.webp?v=1714722671","width":2000},{"alt":null,"id":23877512167523,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3aa28ee121cdd134766b889b5796b3c427232ddb_d4658be3-95be-42e8-85a9-434dbc0fe6b0.webp?v=1714722674"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3aa28ee121cdd134766b889b5796b3c427232ddb_d4658be3-95be-42e8-85a9-434dbc0fe6b0.webp?v=1714722674","width":2000},{"alt":null,"id":23877512757347,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b78145075c00d21d7b4ca21ed1ca0fa6b48bd89b_43827124-aec1-4bdb-93e2-6d7d66cf3471.webp?v=1714722676"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b78145075c00d21d7b4ca21ed1ca0fa6b48bd89b_43827124-aec1-4bdb-93e2-6d7d66cf3471.webp?v=1714722676","width":2000},{"alt":null,"id":23877513150563,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9287890571f9e8f70b23ebe0992c82be11a2e2fd_bb943d04-0cb7-404e-901c-9f12007eb834.webp?v=1714722678"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9287890571f9e8f70b23ebe0992c82be11a2e2fd_bb943d04-0cb7-404e-901c-9f12007eb834.webp?v=1714722678","width":2000},{"alt":null,"id":23877513871459,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7cd891e5c1330ae51535686e68830cb10f1648a7_7c13cd76-ba48-46e6-a857-85f8c9a00006.webp?v=1714722681"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7cd891e5c1330ae51535686e68830cb10f1648a7_7c13cd76-ba48-46e6-a857-85f8c9a00006.webp?v=1714722681","width":2000},{"alt":null,"id":23877514428515,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed79efc4bd72949bb91ca377aa07b1a123969272_b4f074a6-859f-405b-aeb5-347d46fd4757.webp?v=1714722683"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed79efc4bd72949bb91ca377aa07b1a123969272_b4f074a6-859f-405b-aeb5-347d46fd4757.webp?v=1714722683","width":2000},{"alt":null,"id":23877515051107,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64742c6192236f4c9a082509b14c135162d9d411_ee0e0da7-bb91-4733-9464-c5e1144cfac2.webp?v=1714722686"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64742c6192236f4c9a082509b14c135162d9d411_ee0e0da7-bb91-4733-9464-c5e1144cfac2.webp?v=1714722686","width":2000},{"alt":null,"id":23877515509859,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7885216bcd68535578efd75bdd9f8543b1f6a3e4_de8004f2-08df-4b92-9808-914617ffe813.webp?v=1714722689"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7885216bcd68535578efd75bdd9f8543b1f6a3e4_de8004f2-08df-4b92-9808-914617ffe813.webp?v=1714722689","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41886890229859,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB83","requires_shipping":true,"taxable":true,"featured_image":{"id":31472596910179,"product_id":7408561782883,"position":8,"created_at":"2024-05-03T15:51:23+08:00","updated_at":"2024-05-03T15:51:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed79efc4bd72949bb91ca377aa07b1a123969272_b4f074a6-859f-405b-aeb5-347d46fd4757.webp?v=1714722683","variant_ids":[41886890229859]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0118724-PB83","featured_media":{"alt":null,"id":23877514428515,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed79efc4bd72949bb91ca377aa07b1a123969272_b4f074a6-859f-405b-aeb5-347d46fd4757.webp?v=1714722683"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41886890229859,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB83","requires_shipping":true,"taxable":true,"featured_image":{"id":31472596910179,"product_id":7408561782883,"position":8,"created_at":"2024-05-03T15:51:23+08:00","updated_at":"2024-05-03T15:51:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed79efc4bd72949bb91ca377aa07b1a123969272_b4f074a6-859f-405b-aeb5-347d46fd4757.webp?v=1714722683","variant_ids":[41886890229859]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0118724-PB83","featured_media":{"alt":null,"id":23877514428515,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed79efc4bd72949bb91ca377aa07b1a123969272_b4f074a6-859f-405b-aeb5-347d46fd4757.webp?v=1714722683"}},"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: "停產" }