$product = {"id":7408553459811,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 史迪奇 - 經典系列-Aloha!","handle":"iphone-12-mini-mod-nx-printable-yf08","description":null,"published_at":"2024-06-11T16:40:31+08:00","created_at":"2024-05-03T15:49:25+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 12 mini","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":41886799691875,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-YF08","requires_shipping":true,"taxable":true,"featured_image":{"id":31472576888931,"product_id":7408553459811,"position":9,"created_at":"2024-05-03T15:49:46+08:00","updated_at":"2024-05-03T15:49:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a02ec4a5148f2fde0aef083b4c503524cc20eece_f51e11c1-240e-48f8-bb06-b02e7a2242c5.webp?v=1714722586","variant_ids":[41886799691875]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 史迪奇 - 經典系列-Aloha! - 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":"NPB0118424-YF08","featured_media":{"alt":null,"id":23877494243427,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a02ec4a5148f2fde0aef083b4c503524cc20eece_f51e11c1-240e-48f8-bb06-b02e7a2242c5.webp?v=1714722586"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/92b8ee1d97f47ea2fac6476ec351867c1ed3ae50_689b9a31-a8c4-47fe-a827-4a51832add84.webp?v=1714722568","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e22415ec346403e7e773b28f63dff63380176ed_d4b4660d-2c85-4323-a3ab-26d6ede56f0f.webp?v=1714722570","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb1d7d78e1c6c5063bcafb1c2b9811b0ee29d8ff_b95e2460-3900-4f3a-b520-f4b496e2d5fc.webp?v=1714722572","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c2d99448d235aeef72c7d7e3545e9caec347df3_b9b94839-bdb7-48c1-a7c4-8399e3d31e52.webp?v=1714722575","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81ea6b63a65d9bd7d671c2174e3e627bc215890c_d28f3962-be4e-4872-af12-5b591c70d3e6.webp?v=1714722577","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1267721c41c8df84e47f60a573c1bbc6c830c36_edb78a64-d968-4ae5-88c4-2d8a5b62a4ec.webp?v=1714722579","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c11696d4f526ed28f7032fe9b9039991173b0f9a_b80ce097-c28e-4573-a58d-a5874504f83f.webp?v=1714722582","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f79c5126cb098df34759685718d7b1772971367_2867fe88-2393-4b1f-b3d0-44b0862fb4ef.webp?v=1714722584","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a02ec4a5148f2fde0aef083b4c503524cc20eece_f51e11c1-240e-48f8-bb06-b02e7a2242c5.webp?v=1714722586","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2582e15db9f032932b7e47317e2e1b243074c5c_2e76e222-b197-453d-93e0-4c7b01bce38f.webp?v=1714722589","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f3fc74724c10a975f703171c9a02c83afd7de69_52f122eb-8dff-45cb-bc8e-33f47c058228.webp?v=1714722591"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/92b8ee1d97f47ea2fac6476ec351867c1ed3ae50_689b9a31-a8c4-47fe-a827-4a51832add84.webp?v=1714722568","options":["color"],"media":[{"alt":null,"id":23877490147427,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/92b8ee1d97f47ea2fac6476ec351867c1ed3ae50_689b9a31-a8c4-47fe-a827-4a51832add84.webp?v=1714722568"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/92b8ee1d97f47ea2fac6476ec351867c1ed3ae50_689b9a31-a8c4-47fe-a827-4a51832add84.webp?v=1714722568","width":2000},{"alt":null,"id":23877490770019,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e22415ec346403e7e773b28f63dff63380176ed_d4b4660d-2c85-4323-a3ab-26d6ede56f0f.webp?v=1714722570"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e22415ec346403e7e773b28f63dff63380176ed_d4b4660d-2c85-4323-a3ab-26d6ede56f0f.webp?v=1714722570","width":2000},{"alt":null,"id":23877491294307,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb1d7d78e1c6c5063bcafb1c2b9811b0ee29d8ff_b95e2460-3900-4f3a-b520-f4b496e2d5fc.webp?v=1714722572"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb1d7d78e1c6c5063bcafb1c2b9811b0ee29d8ff_b95e2460-3900-4f3a-b520-f4b496e2d5fc.webp?v=1714722572","width":2000},{"alt":null,"id":23877491851363,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c2d99448d235aeef72c7d7e3545e9caec347df3_b9b94839-bdb7-48c1-a7c4-8399e3d31e52.webp?v=1714722575"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c2d99448d235aeef72c7d7e3545e9caec347df3_b9b94839-bdb7-48c1-a7c4-8399e3d31e52.webp?v=1714722575","width":2000},{"alt":null,"id":23877492408419,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81ea6b63a65d9bd7d671c2174e3e627bc215890c_d28f3962-be4e-4872-af12-5b591c70d3e6.webp?v=1714722577"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81ea6b63a65d9bd7d671c2174e3e627bc215890c_d28f3962-be4e-4872-af12-5b591c70d3e6.webp?v=1714722577","width":2000},{"alt":null,"id":23877492768867,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1267721c41c8df84e47f60a573c1bbc6c830c36_edb78a64-d968-4ae5-88c4-2d8a5b62a4ec.webp?v=1714722579"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1267721c41c8df84e47f60a573c1bbc6c830c36_edb78a64-d968-4ae5-88c4-2d8a5b62a4ec.webp?v=1714722579","width":2000},{"alt":null,"id":23877493293155,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c11696d4f526ed28f7032fe9b9039991173b0f9a_b80ce097-c28e-4573-a58d-a5874504f83f.webp?v=1714722582"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c11696d4f526ed28f7032fe9b9039991173b0f9a_b80ce097-c28e-4573-a58d-a5874504f83f.webp?v=1714722582","width":2000},{"alt":null,"id":23877493719139,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f79c5126cb098df34759685718d7b1772971367_2867fe88-2393-4b1f-b3d0-44b0862fb4ef.webp?v=1714722584"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f79c5126cb098df34759685718d7b1772971367_2867fe88-2393-4b1f-b3d0-44b0862fb4ef.webp?v=1714722584","width":2000},{"alt":null,"id":23877494243427,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a02ec4a5148f2fde0aef083b4c503524cc20eece_f51e11c1-240e-48f8-bb06-b02e7a2242c5.webp?v=1714722586"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a02ec4a5148f2fde0aef083b4c503524cc20eece_f51e11c1-240e-48f8-bb06-b02e7a2242c5.webp?v=1714722586","width":2000},{"alt":null,"id":23877494898787,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2582e15db9f032932b7e47317e2e1b243074c5c_2e76e222-b197-453d-93e0-4c7b01bce38f.webp?v=1714722589"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2582e15db9f032932b7e47317e2e1b243074c5c_2e76e222-b197-453d-93e0-4c7b01bce38f.webp?v=1714722589","width":2000},{"alt":null,"id":23877495390307,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f3fc74724c10a975f703171c9a02c83afd7de69_52f122eb-8dff-45cb-bc8e-33f47c058228.webp?v=1714722591"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f3fc74724c10a975f703171c9a02c83afd7de69_52f122eb-8dff-45cb-bc8e-33f47c058228.webp?v=1714722591","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41886799691875,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-YF08","requires_shipping":true,"taxable":true,"featured_image":{"id":31472576888931,"product_id":7408553459811,"position":9,"created_at":"2024-05-03T15:49:46+08:00","updated_at":"2024-05-03T15:49:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a02ec4a5148f2fde0aef083b4c503524cc20eece_f51e11c1-240e-48f8-bb06-b02e7a2242c5.webp?v=1714722586","variant_ids":[41886799691875]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 史迪奇 - 經典系列-Aloha! - 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":"NPB0118424-YF08","featured_media":{"alt":null,"id":23877494243427,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a02ec4a5148f2fde0aef083b4c503524cc20eece_f51e11c1-240e-48f8-bb06-b02e7a2242c5.webp?v=1714722586"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41886799691875,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-YF08","requires_shipping":true,"taxable":true,"featured_image":{"id":31472576888931,"product_id":7408553459811,"position":9,"created_at":"2024-05-03T15:49:46+08:00","updated_at":"2024-05-03T15:49:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a02ec4a5148f2fde0aef083b4c503524cc20eece_f51e11c1-240e-48f8-bb06-b02e7a2242c5.webp?v=1714722586","variant_ids":[41886799691875]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 史迪奇 - 經典系列-Aloha! - 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":"NPB0118424-YF08","featured_media":{"alt":null,"id":23877494243427,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a02ec4a5148f2fde0aef083b4c503524cc20eece_f51e11c1-240e-48f8-bb06-b02e7a2242c5.webp?v=1714722586"}},"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: "停產" }