$product = {"id":7416369119331,"title":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - Batman - 蝙蝠車","handle":"iphone-8-mod-nx-printable-sb05","description":null,"published_at":"2024-06-11T16:57:10+08:00","created_at":"2024-05-06T14:43:37+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":41918988419171,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-SB05","requires_shipping":true,"taxable":true,"featured_image":{"id":31491958374499,"product_id":7416369119331,"position":3,"created_at":"2024-05-06T14:43:44+08:00","updated_at":"2024-05-06T14:43:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87cafb934f934d3c4e3bd7a82afc6983fbbf654f_a7a18236-fcfb-4040-8edc-117774af4873.webp?v=1714977824","variant_ids":[41918988419171]},"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-SB05","featured_media":{"alt":null,"id":23897371574371,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87cafb934f934d3c4e3bd7a82afc6983fbbf654f_a7a18236-fcfb-4040-8edc-117774af4873.webp?v=1714977824"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d0d15f124b79b526b941c4fcfdd924375a7857d_d5aa7b49-0a64-4476-bf8f-77e97b64327f.webp?v=1714977820","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5694ec004ee9eb71b9ae6bc3c773e64141557d4_508b1f6f-7ac0-456b-ae66-3895d5a3aa08.webp?v=1714977822","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87cafb934f934d3c4e3bd7a82afc6983fbbf654f_a7a18236-fcfb-4040-8edc-117774af4873.webp?v=1714977824","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b639cd890e8edbde73cbcc89e0231e5e4cb9358b_120b288f-872a-4417-8c70-5a7ce7049333.webp?v=1714977826","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37f2c916917931d99a3898153d5442c21dd04665_f2af8c1a-9d77-4f55-b54a-ca1a70057f88.webp?v=1714977828","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f57237fe6505c5e5cf88c26a0b125c8286f25483_2833357a-dd9c-43bd-a464-49cca3a2b5d3.webp?v=1714977831","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9593ed326a1479ae095bcc15efb63a343a495170_5984c669-f032-4fe9-9b80-20ec872bd0ec.webp?v=1714977833","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ddf7e050e42af1bb4ea70a731372f5e0f278143_72d01e1c-3910-49b0-a656-0d75b0c85065.webp?v=1714977835","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbec2e26d4d75c3b0d99c8d0bb314c06c29a7597_beae01a9-54c9-46e9-b00e-7c897577a061.webp?v=1714977838","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/082b274af312082dc1aab4bad1248b0fa7e3b714_993a2081-5c56-40ee-abb0-2a0f88b0324c.webp?v=1714977840"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d0d15f124b79b526b941c4fcfdd924375a7857d_d5aa7b49-0a64-4476-bf8f-77e97b64327f.webp?v=1714977820","options":["color"],"media":[{"alt":null,"id":23897370558563,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d0d15f124b79b526b941c4fcfdd924375a7857d_d5aa7b49-0a64-4476-bf8f-77e97b64327f.webp?v=1714977820"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d0d15f124b79b526b941c4fcfdd924375a7857d_d5aa7b49-0a64-4476-bf8f-77e97b64327f.webp?v=1714977820","width":2000},{"alt":null,"id":23897371050083,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5694ec004ee9eb71b9ae6bc3c773e64141557d4_508b1f6f-7ac0-456b-ae66-3895d5a3aa08.webp?v=1714977822"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5694ec004ee9eb71b9ae6bc3c773e64141557d4_508b1f6f-7ac0-456b-ae66-3895d5a3aa08.webp?v=1714977822","width":2000},{"alt":null,"id":23897371574371,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87cafb934f934d3c4e3bd7a82afc6983fbbf654f_a7a18236-fcfb-4040-8edc-117774af4873.webp?v=1714977824"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87cafb934f934d3c4e3bd7a82afc6983fbbf654f_a7a18236-fcfb-4040-8edc-117774af4873.webp?v=1714977824","width":2000},{"alt":null,"id":23897372033123,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b639cd890e8edbde73cbcc89e0231e5e4cb9358b_120b288f-872a-4417-8c70-5a7ce7049333.webp?v=1714977826"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b639cd890e8edbde73cbcc89e0231e5e4cb9358b_120b288f-872a-4417-8c70-5a7ce7049333.webp?v=1714977826","width":2000},{"alt":null,"id":23897372295267,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37f2c916917931d99a3898153d5442c21dd04665_f2af8c1a-9d77-4f55-b54a-ca1a70057f88.webp?v=1714977828"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37f2c916917931d99a3898153d5442c21dd04665_f2af8c1a-9d77-4f55-b54a-ca1a70057f88.webp?v=1714977828","width":2000},{"alt":null,"id":23897372852323,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f57237fe6505c5e5cf88c26a0b125c8286f25483_2833357a-dd9c-43bd-a464-49cca3a2b5d3.webp?v=1714977831"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f57237fe6505c5e5cf88c26a0b125c8286f25483_2833357a-dd9c-43bd-a464-49cca3a2b5d3.webp?v=1714977831","width":2000},{"alt":null,"id":23897373245539,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9593ed326a1479ae095bcc15efb63a343a495170_5984c669-f032-4fe9-9b80-20ec872bd0ec.webp?v=1714977833"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9593ed326a1479ae095bcc15efb63a343a495170_5984c669-f032-4fe9-9b80-20ec872bd0ec.webp?v=1714977833","width":2000},{"alt":null,"id":23897373868131,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ddf7e050e42af1bb4ea70a731372f5e0f278143_72d01e1c-3910-49b0-a656-0d75b0c85065.webp?v=1714977835"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ddf7e050e42af1bb4ea70a731372f5e0f278143_72d01e1c-3910-49b0-a656-0d75b0c85065.webp?v=1714977835","width":2000},{"alt":null,"id":23897374490723,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbec2e26d4d75c3b0d99c8d0bb314c06c29a7597_beae01a9-54c9-46e9-b00e-7c897577a061.webp?v=1714977838"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbec2e26d4d75c3b0d99c8d0bb314c06c29a7597_beae01a9-54c9-46e9-b00e-7c897577a061.webp?v=1714977838","width":2000},{"alt":null,"id":23897375047779,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/082b274af312082dc1aab4bad1248b0fa7e3b714_993a2081-5c56-40ee-abb0-2a0f88b0324c.webp?v=1714977840"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/082b274af312082dc1aab4bad1248b0fa7e3b714_993a2081-5c56-40ee-abb0-2a0f88b0324c.webp?v=1714977840","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41918988419171,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-SB05","requires_shipping":true,"taxable":true,"featured_image":{"id":31491958374499,"product_id":7416369119331,"position":3,"created_at":"2024-05-06T14:43:44+08:00","updated_at":"2024-05-06T14:43:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87cafb934f934d3c4e3bd7a82afc6983fbbf654f_a7a18236-fcfb-4040-8edc-117774af4873.webp?v=1714977824","variant_ids":[41918988419171]},"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-SB05","featured_media":{"alt":null,"id":23897371574371,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87cafb934f934d3c4e3bd7a82afc6983fbbf654f_a7a18236-fcfb-4040-8edc-117774af4873.webp?v=1714977824"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41918988419171,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-SB05","requires_shipping":true,"taxable":true,"featured_image":{"id":31491958374499,"product_id":7416369119331,"position":3,"created_at":"2024-05-06T14:43:44+08:00","updated_at":"2024-05-06T14:43:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87cafb934f934d3c4e3bd7a82afc6983fbbf654f_a7a18236-fcfb-4040-8edc-117774af4873.webp?v=1714977824","variant_ids":[41918988419171]},"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-SB05","featured_media":{"alt":null,"id":23897371574371,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87cafb934f934d3c4e3bd7a82afc6983fbbf654f_a7a18236-fcfb-4040-8edc-117774af4873.webp?v=1714977824"}},"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: "停產" }