$product = {"id":7414992765027,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 史迪奇 - 熱帶音樂系列-慶祝","handle":"iphone-12-mini-mod-nx-magsafe-printable-yf04","description":null,"published_at":"2024-06-11T17:55:04+08:00","created_at":"2024-05-05T20:02:24+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區史迪奇","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-stitch","device-iPhone 12 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-stitch","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":41910716760163,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-YF04","requires_shipping":true,"taxable":true,"featured_image":{"id":31487871975523,"product_id":7414992765027,"position":6,"created_at":"2024-05-05T20:02:39+08:00","updated_at":"2024-05-05T20:02:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/176cd2c3eca82e52ba5753f5a562b6b54ec60af7_bf62b6ad-16a1-4716-8337-ee7db8188c40.webp?v=1714910559","variant_ids":[41910716760163]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 史迪奇 - 熱帶音樂系列-慶祝 - 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":"MPB0118424-YF04","featured_media":{"alt":null,"id":23893216034915,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/176cd2c3eca82e52ba5753f5a562b6b54ec60af7_bf62b6ad-16a1-4716-8337-ee7db8188c40.webp?v=1714910559"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/27053f05629ddb0fe8b4bf020dfb3a9f3ac312e3_fbe6074f-e8d3-4a1b-bb3d-750f597e5525.webp?v=1714910547","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b48e4e3919ed8ebeafa2ce1efe3556068d3bc09_1b6c0fbd-d9b9-48d4-8085-93085dcde8a5.webp?v=1714910549","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0340ac5ed9c1b8fbd57606133fe3bcefc4cf661f_89482c07-6b33-4f7b-9ee6-9f65fdb30932.webp?v=1714910552","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/557080d25107494bd577bba2aca6a234cf891ecf_7c5f8f34-eb11-4f22-b246-f0968c5c74af.webp?v=1714910554","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d30a97ea5a33f549d48bd7a86a6d7cf0a9e7159d_0f6b0d2d-defd-486d-86bc-4d6a6944a093.webp?v=1714910556","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/176cd2c3eca82e52ba5753f5a562b6b54ec60af7_bf62b6ad-16a1-4716-8337-ee7db8188c40.webp?v=1714910559","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f450e073e9f9fecf2587c0bf9985cac37672ac45_025d183f-f843-40dc-bec7-65a81c45382e.webp?v=1714910561","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59a3de4f39acb45347153db1cc0d064dd61063cf_f862e02a-4815-49cb-8073-e657a105b454.webp?v=1714910564","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e58f38a3d31194f73a8ce23e6e3b4665f362944f_59079da8-6a5d-4249-bc2d-10149ab0ea5b.webp?v=1714910566","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dfc66821caa5b367907af2a4a72d2cf6fb6e580d_0d543a01-69e0-4ea4-8770-212bf4da4a46.webp?v=1714910569","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/932f26f592e8f465ff814ea06da0d60d66f0e5a1_1d77a796-5b48-4b8c-aff8-72c58bbec6bd.webp?v=1714910571"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/27053f05629ddb0fe8b4bf020dfb3a9f3ac312e3_fbe6074f-e8d3-4a1b-bb3d-750f597e5525.webp?v=1714910547","options":["color"],"media":[{"alt":null,"id":23893212987491,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/27053f05629ddb0fe8b4bf020dfb3a9f3ac312e3_fbe6074f-e8d3-4a1b-bb3d-750f597e5525.webp?v=1714910547"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/27053f05629ddb0fe8b4bf020dfb3a9f3ac312e3_fbe6074f-e8d3-4a1b-bb3d-750f597e5525.webp?v=1714910547","width":2000},{"alt":null,"id":23893213479011,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b48e4e3919ed8ebeafa2ce1efe3556068d3bc09_1b6c0fbd-d9b9-48d4-8085-93085dcde8a5.webp?v=1714910549"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b48e4e3919ed8ebeafa2ce1efe3556068d3bc09_1b6c0fbd-d9b9-48d4-8085-93085dcde8a5.webp?v=1714910549","width":2000},{"alt":null,"id":23893213970531,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0340ac5ed9c1b8fbd57606133fe3bcefc4cf661f_89482c07-6b33-4f7b-9ee6-9f65fdb30932.webp?v=1714910552"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0340ac5ed9c1b8fbd57606133fe3bcefc4cf661f_89482c07-6b33-4f7b-9ee6-9f65fdb30932.webp?v=1714910552","width":2000},{"alt":null,"id":23893214527587,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/557080d25107494bd577bba2aca6a234cf891ecf_7c5f8f34-eb11-4f22-b246-f0968c5c74af.webp?v=1714910554"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/557080d25107494bd577bba2aca6a234cf891ecf_7c5f8f34-eb11-4f22-b246-f0968c5c74af.webp?v=1714910554","width":2000},{"alt":null,"id":23893215182947,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d30a97ea5a33f549d48bd7a86a6d7cf0a9e7159d_0f6b0d2d-defd-486d-86bc-4d6a6944a093.webp?v=1714910556"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d30a97ea5a33f549d48bd7a86a6d7cf0a9e7159d_0f6b0d2d-defd-486d-86bc-4d6a6944a093.webp?v=1714910556","width":2000},{"alt":null,"id":23893216034915,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/176cd2c3eca82e52ba5753f5a562b6b54ec60af7_bf62b6ad-16a1-4716-8337-ee7db8188c40.webp?v=1714910559"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/176cd2c3eca82e52ba5753f5a562b6b54ec60af7_bf62b6ad-16a1-4716-8337-ee7db8188c40.webp?v=1714910559","width":2000},{"alt":null,"id":23893216395363,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f450e073e9f9fecf2587c0bf9985cac37672ac45_025d183f-f843-40dc-bec7-65a81c45382e.webp?v=1714910561"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f450e073e9f9fecf2587c0bf9985cac37672ac45_025d183f-f843-40dc-bec7-65a81c45382e.webp?v=1714910561","width":2000},{"alt":null,"id":23893217149027,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59a3de4f39acb45347153db1cc0d064dd61063cf_f862e02a-4815-49cb-8073-e657a105b454.webp?v=1714910564"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59a3de4f39acb45347153db1cc0d064dd61063cf_f862e02a-4815-49cb-8073-e657a105b454.webp?v=1714910564","width":2000},{"alt":null,"id":23893217673315,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e58f38a3d31194f73a8ce23e6e3b4665f362944f_59079da8-6a5d-4249-bc2d-10149ab0ea5b.webp?v=1714910566"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e58f38a3d31194f73a8ce23e6e3b4665f362944f_59079da8-6a5d-4249-bc2d-10149ab0ea5b.webp?v=1714910566","width":2000},{"alt":null,"id":23893218295907,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dfc66821caa5b367907af2a4a72d2cf6fb6e580d_0d543a01-69e0-4ea4-8770-212bf4da4a46.webp?v=1714910569"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dfc66821caa5b367907af2a4a72d2cf6fb6e580d_0d543a01-69e0-4ea4-8770-212bf4da4a46.webp?v=1714910569","width":2000},{"alt":null,"id":23893218820195,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/932f26f592e8f465ff814ea06da0d60d66f0e5a1_1d77a796-5b48-4b8c-aff8-72c58bbec6bd.webp?v=1714910571"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/932f26f592e8f465ff814ea06da0d60d66f0e5a1_1d77a796-5b48-4b8c-aff8-72c58bbec6bd.webp?v=1714910571","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910716760163,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-YF04","requires_shipping":true,"taxable":true,"featured_image":{"id":31487871975523,"product_id":7414992765027,"position":6,"created_at":"2024-05-05T20:02:39+08:00","updated_at":"2024-05-05T20:02:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/176cd2c3eca82e52ba5753f5a562b6b54ec60af7_bf62b6ad-16a1-4716-8337-ee7db8188c40.webp?v=1714910559","variant_ids":[41910716760163]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 史迪奇 - 熱帶音樂系列-慶祝 - 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":"MPB0118424-YF04","featured_media":{"alt":null,"id":23893216034915,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/176cd2c3eca82e52ba5753f5a562b6b54ec60af7_bf62b6ad-16a1-4716-8337-ee7db8188c40.webp?v=1714910559"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910716760163,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-YF04","requires_shipping":true,"taxable":true,"featured_image":{"id":31487871975523,"product_id":7414992765027,"position":6,"created_at":"2024-05-05T20:02:39+08:00","updated_at":"2024-05-05T20:02:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/176cd2c3eca82e52ba5753f5a562b6b54ec60af7_bf62b6ad-16a1-4716-8337-ee7db8188c40.webp?v=1714910559","variant_ids":[41910716760163]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 史迪奇 - 熱帶音樂系列-慶祝 - 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":"MPB0118424-YF04","featured_media":{"alt":null,"id":23893216034915,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/176cd2c3eca82e52ba5753f5a562b6b54ec60af7_bf62b6ad-16a1-4716-8337-ee7db8188c40.webp?v=1714910559"}},"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: "停產" }