$product = {"id":7411370295395,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 迪士尼-星際大戰 Star Wars - 絕地武士-光劍系列","handle":"iphone-14-plus-mod-nx-magsafe-printable-pb71","description":null,"published_at":"2024-06-11T17:43:07+08:00","created_at":"2024-05-05T00:16:31+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 14 Plus","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-star-wars","Top50","type-Mod NX Printable MagSafe Printable"],"price":110000,"price_min":110000,"price_max":110000,"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":41898030694499,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-PB71","requires_shipping":true,"taxable":true,"featured_image":{"id":31480256594019,"product_id":7411370295395,"position":10,"created_at":"2024-05-05T00:16:54+08:00","updated_at":"2024-05-05T00:16:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eba325aa185689348953bf8a19ded753d40940fb_26bb428c-3d1f-4a5d-99d2-95354b64b35e.webp?v=1714839414","variant_ids":[41898030694499]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 迪士尼-星際大戰 Star Wars - 絕地武士-光劍系列 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126124-PB71","featured_media":{"alt":null,"id":23885507821667,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eba325aa185689348953bf8a19ded753d40940fb_26bb428c-3d1f-4a5d-99d2-95354b64b35e.webp?v=1714839414"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/261a93f2a71e8b82a3400d33baf31dbdb8c1ef95_f14f945b-c36b-4df7-bbbd-26bbcb89c0df.webp?v=1714839394","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf1a143b7c83f2254affc1e0151e4b1624b52490_ab9cf9b1-4700-4a8c-b554-5f1f8fa37507.webp?v=1714839396","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40161180d75a93589c874da591f1f73f2fbeb210_ce0c2ee0-9f2c-4d19-be57-058a754fb19f.webp?v=1714839398","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fe6eae87b42eabdcc1c1b5c2b162cac86743a2e_e9f5fdc4-cd9c-4c65-9eb6-59a27ab0294d.webp?v=1714839401","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/704b927bd0ff508336b12f5e242a069bc8c1ff65_6f7cb0f7-077c-4b55-8d0d-f367c460a7de.webp?v=1714839403","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38e6dbb0ef791408994ba6a7fcb9f3a3f07c4688_019ba0cc-d8fb-4a53-ae15-8a14487d8ef3.webp?v=1714839406","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d82e1ef9b51ea696b2e5f84022bb08048cc5488_4dd4deb7-7870-4442-84a8-49371e42c218.webp?v=1714839408","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1e2d9bc40feebc3319a3fa112fe396d262f25c9_c705d55b-eda6-4253-bcda-7679b180df18.webp?v=1714839410","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd861387a5a12539b2e6ffaf26086cf3014ac8e9_f7cab0f5-1b8b-4729-bc72-52efa93ebbc7.webp?v=1714839412","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eba325aa185689348953bf8a19ded753d40940fb_26bb428c-3d1f-4a5d-99d2-95354b64b35e.webp?v=1714839414"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/261a93f2a71e8b82a3400d33baf31dbdb8c1ef95_f14f945b-c36b-4df7-bbbd-26bbcb89c0df.webp?v=1714839394","options":["color"],"media":[{"alt":null,"id":23885502414947,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/261a93f2a71e8b82a3400d33baf31dbdb8c1ef95_f14f945b-c36b-4df7-bbbd-26bbcb89c0df.webp?v=1714839394"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/261a93f2a71e8b82a3400d33baf31dbdb8c1ef95_f14f945b-c36b-4df7-bbbd-26bbcb89c0df.webp?v=1714839394","width":2000},{"alt":null,"id":23885503103075,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf1a143b7c83f2254affc1e0151e4b1624b52490_ab9cf9b1-4700-4a8c-b554-5f1f8fa37507.webp?v=1714839396"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf1a143b7c83f2254affc1e0151e4b1624b52490_ab9cf9b1-4700-4a8c-b554-5f1f8fa37507.webp?v=1714839396","width":2000},{"alt":null,"id":23885503594595,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40161180d75a93589c874da591f1f73f2fbeb210_ce0c2ee0-9f2c-4d19-be57-058a754fb19f.webp?v=1714839398"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40161180d75a93589c874da591f1f73f2fbeb210_ce0c2ee0-9f2c-4d19-be57-058a754fb19f.webp?v=1714839398","width":2000},{"alt":null,"id":23885504086115,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fe6eae87b42eabdcc1c1b5c2b162cac86743a2e_e9f5fdc4-cd9c-4c65-9eb6-59a27ab0294d.webp?v=1714839401"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fe6eae87b42eabdcc1c1b5c2b162cac86743a2e_e9f5fdc4-cd9c-4c65-9eb6-59a27ab0294d.webp?v=1714839401","width":2000},{"alt":null,"id":23885504708707,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/704b927bd0ff508336b12f5e242a069bc8c1ff65_6f7cb0f7-077c-4b55-8d0d-f367c460a7de.webp?v=1714839403"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/704b927bd0ff508336b12f5e242a069bc8c1ff65_6f7cb0f7-077c-4b55-8d0d-f367c460a7de.webp?v=1714839403","width":2000},{"alt":null,"id":23885505167459,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38e6dbb0ef791408994ba6a7fcb9f3a3f07c4688_019ba0cc-d8fb-4a53-ae15-8a14487d8ef3.webp?v=1714839406"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38e6dbb0ef791408994ba6a7fcb9f3a3f07c4688_019ba0cc-d8fb-4a53-ae15-8a14487d8ef3.webp?v=1714839406","width":2000},{"alt":null,"id":23885505790051,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d82e1ef9b51ea696b2e5f84022bb08048cc5488_4dd4deb7-7870-4442-84a8-49371e42c218.webp?v=1714839408"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d82e1ef9b51ea696b2e5f84022bb08048cc5488_4dd4deb7-7870-4442-84a8-49371e42c218.webp?v=1714839408","width":2000},{"alt":null,"id":23885506576483,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1e2d9bc40feebc3319a3fa112fe396d262f25c9_c705d55b-eda6-4253-bcda-7679b180df18.webp?v=1714839410"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1e2d9bc40feebc3319a3fa112fe396d262f25c9_c705d55b-eda6-4253-bcda-7679b180df18.webp?v=1714839410","width":2000},{"alt":null,"id":23885507166307,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd861387a5a12539b2e6ffaf26086cf3014ac8e9_f7cab0f5-1b8b-4729-bc72-52efa93ebbc7.webp?v=1714839412"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd861387a5a12539b2e6ffaf26086cf3014ac8e9_f7cab0f5-1b8b-4729-bc72-52efa93ebbc7.webp?v=1714839412","width":2000},{"alt":null,"id":23885507821667,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eba325aa185689348953bf8a19ded753d40940fb_26bb428c-3d1f-4a5d-99d2-95354b64b35e.webp?v=1714839414"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eba325aa185689348953bf8a19ded753d40940fb_26bb428c-3d1f-4a5d-99d2-95354b64b35e.webp?v=1714839414","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41898030694499,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-PB71","requires_shipping":true,"taxable":true,"featured_image":{"id":31480256594019,"product_id":7411370295395,"position":10,"created_at":"2024-05-05T00:16:54+08:00","updated_at":"2024-05-05T00:16:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eba325aa185689348953bf8a19ded753d40940fb_26bb428c-3d1f-4a5d-99d2-95354b64b35e.webp?v=1714839414","variant_ids":[41898030694499]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 迪士尼-星際大戰 Star Wars - 絕地武士-光劍系列 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126124-PB71","featured_media":{"alt":null,"id":23885507821667,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eba325aa185689348953bf8a19ded753d40940fb_26bb428c-3d1f-4a5d-99d2-95354b64b35e.webp?v=1714839414"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41898030694499,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-PB71","requires_shipping":true,"taxable":true,"featured_image":{"id":31480256594019,"product_id":7411370295395,"position":10,"created_at":"2024-05-05T00:16:54+08:00","updated_at":"2024-05-05T00:16:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eba325aa185689348953bf8a19ded753d40940fb_26bb428c-3d1f-4a5d-99d2-95354b64b35e.webp?v=1714839414","variant_ids":[41898030694499]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 迪士尼-星際大戰 Star Wars - 絕地武士-光劍系列 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126124-PB71","featured_media":{"alt":null,"id":23885507821667,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eba325aa185689348953bf8a19ded753d40940fb_26bb428c-3d1f-4a5d-99d2-95354b64b35e.webp?v=1714839414"}},"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: "停產" }