$product = {"id":7416386551907,"title":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - Batman - 黑白畫風-蝙蝠俠","handle":"iphone-8-mod-nx-printable-sb12","description":null,"published_at":"2024-06-11T16:57:40+08:00","created_at":"2024-05-06T14:46:53+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Batman","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-batman","device-iPhone 8","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-batman","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":41919181291619,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-SB12","requires_shipping":true,"taxable":true,"featured_image":{"id":31492003922019,"product_id":7416386551907,"position":7,"created_at":"2024-05-06T14:47:12+08:00","updated_at":"2024-05-06T14:47:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4fde434b2860c19510686cb68fccb55bf0d4de2d_60166dfc-4a68-4354-a999-4f8cb64f70df.webp?v=1714978032","variant_ids":[41919181291619]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - Batman - 黑白畫風-蝙蝠俠 - 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":"NPB0105424-SB12","featured_media":{"alt":null,"id":23897417711715,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4fde434b2860c19510686cb68fccb55bf0d4de2d_60166dfc-4a68-4354-a999-4f8cb64f70df.webp?v=1714978032"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/add53aa83129c2ac5ddb876ef19f7e591f471048_77a4a265-5787-4d83-894a-8711a3d39cfb.webp?v=1714978015","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77a42b8a7266cacd2bba711bf9a8d2f204b4fd5c_85f008d8-e0a9-4d5c-9a03-815ae4ac23b5.webp?v=1714978017","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5542a5fef99664d53fec39b34b6fc336e184ff5_27017aee-b501-4ac4-a953-9140344df928.webp?v=1714978020","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c1218bebdfc862f5796883307d95c465fcc300b_485bfab4-0db5-4eb4-b8d6-3add4e2d51b5.webp?v=1714978025","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f7a47e08fc30cb9c7d633fcf4773559c0452e38_c1fc4584-d270-4177-a54b-fbd80d64f041.webp?v=1714978027","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f0d12a1ea1a83c48b80f513676c098529590649_00ae3260-9dbe-426c-b648-3776ee06dd68.webp?v=1714978029","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4fde434b2860c19510686cb68fccb55bf0d4de2d_60166dfc-4a68-4354-a999-4f8cb64f70df.webp?v=1714978032","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b040cde8e0c88cf944e72a7330cdda423091a25_dd4c6c6f-8dfc-47de-a0b7-92df47823ba5.webp?v=1714978034","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/19b45ec22625fc424063eeb896e5c44e93b249ff_56817877-80a1-4bfe-9485-459e75beb242.webp?v=1714978038"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/add53aa83129c2ac5ddb876ef19f7e591f471048_77a4a265-5787-4d83-894a-8711a3d39cfb.webp?v=1714978015","options":["color"],"media":[{"alt":null,"id":23897413615715,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/add53aa83129c2ac5ddb876ef19f7e591f471048_77a4a265-5787-4d83-894a-8711a3d39cfb.webp?v=1714978015"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/add53aa83129c2ac5ddb876ef19f7e591f471048_77a4a265-5787-4d83-894a-8711a3d39cfb.webp?v=1714978015","width":2000},{"alt":null,"id":23897414140003,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77a42b8a7266cacd2bba711bf9a8d2f204b4fd5c_85f008d8-e0a9-4d5c-9a03-815ae4ac23b5.webp?v=1714978017"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77a42b8a7266cacd2bba711bf9a8d2f204b4fd5c_85f008d8-e0a9-4d5c-9a03-815ae4ac23b5.webp?v=1714978017","width":2000},{"alt":null,"id":23897414664291,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5542a5fef99664d53fec39b34b6fc336e184ff5_27017aee-b501-4ac4-a953-9140344df928.webp?v=1714978020"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5542a5fef99664d53fec39b34b6fc336e184ff5_27017aee-b501-4ac4-a953-9140344df928.webp?v=1714978020","width":2000},{"alt":null,"id":23897415942243,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c1218bebdfc862f5796883307d95c465fcc300b_485bfab4-0db5-4eb4-b8d6-3add4e2d51b5.webp?v=1714978025"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c1218bebdfc862f5796883307d95c465fcc300b_485bfab4-0db5-4eb4-b8d6-3add4e2d51b5.webp?v=1714978025","width":2000},{"alt":null,"id":23897416597603,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f7a47e08fc30cb9c7d633fcf4773559c0452e38_c1fc4584-d270-4177-a54b-fbd80d64f041.webp?v=1714978027"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f7a47e08fc30cb9c7d633fcf4773559c0452e38_c1fc4584-d270-4177-a54b-fbd80d64f041.webp?v=1714978027","width":2000},{"alt":null,"id":23897417285731,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f0d12a1ea1a83c48b80f513676c098529590649_00ae3260-9dbe-426c-b648-3776ee06dd68.webp?v=1714978029"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f0d12a1ea1a83c48b80f513676c098529590649_00ae3260-9dbe-426c-b648-3776ee06dd68.webp?v=1714978029","width":2000},{"alt":null,"id":23897417711715,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4fde434b2860c19510686cb68fccb55bf0d4de2d_60166dfc-4a68-4354-a999-4f8cb64f70df.webp?v=1714978032"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4fde434b2860c19510686cb68fccb55bf0d4de2d_60166dfc-4a68-4354-a999-4f8cb64f70df.webp?v=1714978032","width":2000},{"alt":null,"id":23897418301539,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b040cde8e0c88cf944e72a7330cdda423091a25_dd4c6c6f-8dfc-47de-a0b7-92df47823ba5.webp?v=1714978034"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b040cde8e0c88cf944e72a7330cdda423091a25_dd4c6c6f-8dfc-47de-a0b7-92df47823ba5.webp?v=1714978034","width":2000},{"alt":null,"id":23897419350115,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/19b45ec22625fc424063eeb896e5c44e93b249ff_56817877-80a1-4bfe-9485-459e75beb242.webp?v=1714978038"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/19b45ec22625fc424063eeb896e5c44e93b249ff_56817877-80a1-4bfe-9485-459e75beb242.webp?v=1714978038","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41919181291619,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-SB12","requires_shipping":true,"taxable":true,"featured_image":{"id":31492003922019,"product_id":7416386551907,"position":7,"created_at":"2024-05-06T14:47:12+08:00","updated_at":"2024-05-06T14:47:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4fde434b2860c19510686cb68fccb55bf0d4de2d_60166dfc-4a68-4354-a999-4f8cb64f70df.webp?v=1714978032","variant_ids":[41919181291619]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - Batman - 黑白畫風-蝙蝠俠 - 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":"NPB0105424-SB12","featured_media":{"alt":null,"id":23897417711715,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4fde434b2860c19510686cb68fccb55bf0d4de2d_60166dfc-4a68-4354-a999-4f8cb64f70df.webp?v=1714978032"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41919181291619,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-SB12","requires_shipping":true,"taxable":true,"featured_image":{"id":31492003922019,"product_id":7416386551907,"position":7,"created_at":"2024-05-06T14:47:12+08:00","updated_at":"2024-05-06T14:47:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4fde434b2860c19510686cb68fccb55bf0d4de2d_60166dfc-4a68-4354-a999-4f8cb64f70df.webp?v=1714978032","variant_ids":[41919181291619]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - Batman - 黑白畫風-蝙蝠俠 - 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":"NPB0105424-SB12","featured_media":{"alt":null,"id":23897417711715,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4fde434b2860c19510686cb68fccb55bf0d4de2d_60166dfc-4a68-4354-a999-4f8cb64f70df.webp?v=1714978032"}},"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: "停產" }