$product = {"id":7416371249251,"title":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 史迪奇 - 經典系列-Ohana是家人","handle":"iphone-8-mod-nx-printable-yf10","description":null,"published_at":"2024-06-11T16:57:14+08:00","created_at":"2024-05-06T14:44:01+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-史迪奇","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-stitch","device-iPhone 8","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-stitch","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":41919010078819,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-YF10","requires_shipping":true,"taxable":true,"featured_image":{"id":31491963093091,"product_id":7416371249251,"position":2,"created_at":"2024-05-06T14:44:06+08:00","updated_at":"2024-05-06T14:44:06+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff210349813d4bd57c1eba834852d873954dd82e_e32551ad-48bc-45b1-847f-430e842978e6.webp?v=1714977846","variant_ids":[41919010078819]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 史迪奇 - 經典系列-Ohana是家人 - 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-YF10","featured_media":{"alt":null,"id":23897376424035,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff210349813d4bd57c1eba834852d873954dd82e_e32551ad-48bc-45b1-847f-430e842978e6.webp?v=1714977846"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fc45f90a32e990cb382dfb33e41e0297be3c984_18e1cb47-1b98-4d9e-8b24-900833e3d666.webp?v=1714977844","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff210349813d4bd57c1eba834852d873954dd82e_e32551ad-48bc-45b1-847f-430e842978e6.webp?v=1714977846","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/156fd4c8019bbe303746c7134efe5cb64b9ce9f9_b0d3228d-ab2c-4f7c-9c12-e00bea737fc9.webp?v=1714977848","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f75657a6605b02693d258f57d34567d88dd4e260_2ef80e55-3a15-447e-8efc-1241871acbc8.webp?v=1714977850","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d4cb7ff1740726946085db63e685f9d0af5ec6c9_40c826c4-163f-468e-94a8-13596a46af73.webp?v=1714977853","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b6e81a881470868ab0490887f9ba7867e480c1c_adae01a6-eccc-4272-97b3-41c530735479.webp?v=1714977855","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8767d48282c241c7376924f279d753cc611140c6_04a3b2dd-bdf3-43d9-b57d-0587c3fbfe82.webp?v=1714977857","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf6918f008ff03876fea5e3742b2a0a629ef499f_5c3e6a1d-0800-4e44-95c1-2c2f1a7ffd5f.webp?v=1714977860","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b000a2f1c5a48588ed8173874c2755ec735e50e_eb73eb2d-6440-4daa-ad2b-b7d547a19e4a.webp?v=1714977864"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fc45f90a32e990cb382dfb33e41e0297be3c984_18e1cb47-1b98-4d9e-8b24-900833e3d666.webp?v=1714977844","options":["color"],"media":[{"alt":null,"id":23897375703139,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fc45f90a32e990cb382dfb33e41e0297be3c984_18e1cb47-1b98-4d9e-8b24-900833e3d666.webp?v=1714977844"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fc45f90a32e990cb382dfb33e41e0297be3c984_18e1cb47-1b98-4d9e-8b24-900833e3d666.webp?v=1714977844","width":2000},{"alt":null,"id":23897376424035,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff210349813d4bd57c1eba834852d873954dd82e_e32551ad-48bc-45b1-847f-430e842978e6.webp?v=1714977846"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff210349813d4bd57c1eba834852d873954dd82e_e32551ad-48bc-45b1-847f-430e842978e6.webp?v=1714977846","width":2000},{"alt":null,"id":23897376882787,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/156fd4c8019bbe303746c7134efe5cb64b9ce9f9_b0d3228d-ab2c-4f7c-9c12-e00bea737fc9.webp?v=1714977848"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/156fd4c8019bbe303746c7134efe5cb64b9ce9f9_b0d3228d-ab2c-4f7c-9c12-e00bea737fc9.webp?v=1714977848","width":2000},{"alt":null,"id":23897377276003,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f75657a6605b02693d258f57d34567d88dd4e260_2ef80e55-3a15-447e-8efc-1241871acbc8.webp?v=1714977850"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f75657a6605b02693d258f57d34567d88dd4e260_2ef80e55-3a15-447e-8efc-1241871acbc8.webp?v=1714977850","width":2000},{"alt":null,"id":23897377800291,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d4cb7ff1740726946085db63e685f9d0af5ec6c9_40c826c4-163f-468e-94a8-13596a46af73.webp?v=1714977853"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d4cb7ff1740726946085db63e685f9d0af5ec6c9_40c826c4-163f-468e-94a8-13596a46af73.webp?v=1714977853","width":2000},{"alt":null,"id":23897378226275,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b6e81a881470868ab0490887f9ba7867e480c1c_adae01a6-eccc-4272-97b3-41c530735479.webp?v=1714977855"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b6e81a881470868ab0490887f9ba7867e480c1c_adae01a6-eccc-4272-97b3-41c530735479.webp?v=1714977855","width":2000},{"alt":null,"id":23897378914403,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8767d48282c241c7376924f279d753cc611140c6_04a3b2dd-bdf3-43d9-b57d-0587c3fbfe82.webp?v=1714977857"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8767d48282c241c7376924f279d753cc611140c6_04a3b2dd-bdf3-43d9-b57d-0587c3fbfe82.webp?v=1714977857","width":2000},{"alt":null,"id":23897379307619,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf6918f008ff03876fea5e3742b2a0a629ef499f_5c3e6a1d-0800-4e44-95c1-2c2f1a7ffd5f.webp?v=1714977860"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf6918f008ff03876fea5e3742b2a0a629ef499f_5c3e6a1d-0800-4e44-95c1-2c2f1a7ffd5f.webp?v=1714977860","width":2000},{"alt":null,"id":23897379831907,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b000a2f1c5a48588ed8173874c2755ec735e50e_eb73eb2d-6440-4daa-ad2b-b7d547a19e4a.webp?v=1714977864"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b000a2f1c5a48588ed8173874c2755ec735e50e_eb73eb2d-6440-4daa-ad2b-b7d547a19e4a.webp?v=1714977864","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41919010078819,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-YF10","requires_shipping":true,"taxable":true,"featured_image":{"id":31491963093091,"product_id":7416371249251,"position":2,"created_at":"2024-05-06T14:44:06+08:00","updated_at":"2024-05-06T14:44:06+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff210349813d4bd57c1eba834852d873954dd82e_e32551ad-48bc-45b1-847f-430e842978e6.webp?v=1714977846","variant_ids":[41919010078819]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 史迪奇 - 經典系列-Ohana是家人 - 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-YF10","featured_media":{"alt":null,"id":23897376424035,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff210349813d4bd57c1eba834852d873954dd82e_e32551ad-48bc-45b1-847f-430e842978e6.webp?v=1714977846"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41919010078819,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-YF10","requires_shipping":true,"taxable":true,"featured_image":{"id":31491963093091,"product_id":7416371249251,"position":2,"created_at":"2024-05-06T14:44:06+08:00","updated_at":"2024-05-06T14:44:06+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff210349813d4bd57c1eba834852d873954dd82e_e32551ad-48bc-45b1-847f-430e842978e6.webp?v=1714977846","variant_ids":[41919010078819]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 史迪奇 - 經典系列-Ohana是家人 - 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-YF10","featured_media":{"alt":null,"id":23897376424035,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff210349813d4bd57c1eba834852d873954dd82e_e32551ad-48bc-45b1-847f-430e842978e6.webp?v=1714977846"}},"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: "停產" }