$product = {"id":7408456990819,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Batman - Logo貼紙款","handle":"iphone-12-mini-mod-nx-printable-sb04","description":null,"published_at":"2024-06-11T16:37:45+08:00","created_at":"2024-05-03T15:30:19+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 12 mini","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":41885690396771,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-SB04","requires_shipping":true,"taxable":true,"featured_image":{"id":31472326738019,"product_id":7408456990819,"position":1,"created_at":"2024-05-03T15:30:21+08:00","updated_at":"2024-05-03T15:30:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee2bc4ff89d85ca7aa17bb9efb34b959666f33d4_0e887a20-051c-4b82-a3d6-6519b27cf999.webp?v=1714721421","variant_ids":[41885690396771]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Batman - Logo貼紙款 - 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-SB04","featured_media":{"alt":null,"id":23877243142243,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee2bc4ff89d85ca7aa17bb9efb34b959666f33d4_0e887a20-051c-4b82-a3d6-6519b27cf999.webp?v=1714721421"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee2bc4ff89d85ca7aa17bb9efb34b959666f33d4_0e887a20-051c-4b82-a3d6-6519b27cf999.webp?v=1714721421","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00f4cbd45fc10026df0f68c3a25c3fcf4ede5d60_4199a110-0f00-48ed-b26c-fba52e7937e8.webp?v=1714721424","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e8a0d33ea632c60688a55bfa997182079223751_d3630520-f630-425d-ad21-c3138d084557.webp?v=1714721426","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a641dc12920a00e4aa5a622b26dd03d34af72e6_58321eea-7c44-421f-8d4d-cbdeb16c8811.webp?v=1714721429","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fa2c13215d7df91c4c08dc7bf2d9d2e867d1cf7_2349aede-6e93-4ad1-87dd-452fb2d4f6b8.webp?v=1714721431","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a336f4513864a90c4dfa7e36bc34b05d3f3a25b6_a6032dfa-baf8-4b73-a591-3daef717249e.webp?v=1714721434","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e7729dec3d657cb4dd5aadc28fbc36dba93d6e1_3f9383af-67b3-4c42-aab8-9e47e5018601.webp?v=1714721437","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b291f845563dc8fa5ca00739afdede5f3aeac4b_49585a25-67df-4c00-87de-56297f83c01d.webp?v=1714721439","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d73b14a53a25c87717ad787fb46974327e15f0c_722dad4b-fba6-4e54-a5d5-c7559c579966.webp?v=1714721442","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f18836d7763db2744c0751340d11a15945aac763_c4b05100-e051-4eb7-982f-6d492ccc814a.webp?v=1714721444","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1f56b975dfced80a529207a8e69f48dec869bd5_b02aec86-1d1c-42f5-ba24-56a4fb5357e7.webp?v=1714721447"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee2bc4ff89d85ca7aa17bb9efb34b959666f33d4_0e887a20-051c-4b82-a3d6-6519b27cf999.webp?v=1714721421","options":["color"],"media":[{"alt":null,"id":23877243142243,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee2bc4ff89d85ca7aa17bb9efb34b959666f33d4_0e887a20-051c-4b82-a3d6-6519b27cf999.webp?v=1714721421"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee2bc4ff89d85ca7aa17bb9efb34b959666f33d4_0e887a20-051c-4b82-a3d6-6519b27cf999.webp?v=1714721421","width":2000},{"alt":null,"id":23877243633763,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00f4cbd45fc10026df0f68c3a25c3fcf4ede5d60_4199a110-0f00-48ed-b26c-fba52e7937e8.webp?v=1714721424"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00f4cbd45fc10026df0f68c3a25c3fcf4ede5d60_4199a110-0f00-48ed-b26c-fba52e7937e8.webp?v=1714721424","width":2000},{"alt":null,"id":23877244125283,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e8a0d33ea632c60688a55bfa997182079223751_d3630520-f630-425d-ad21-c3138d084557.webp?v=1714721426"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e8a0d33ea632c60688a55bfa997182079223751_d3630520-f630-425d-ad21-c3138d084557.webp?v=1714721426","width":2000},{"alt":null,"id":23877244715107,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a641dc12920a00e4aa5a622b26dd03d34af72e6_58321eea-7c44-421f-8d4d-cbdeb16c8811.webp?v=1714721429"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a641dc12920a00e4aa5a622b26dd03d34af72e6_58321eea-7c44-421f-8d4d-cbdeb16c8811.webp?v=1714721429","width":2000},{"alt":null,"id":23877245370467,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fa2c13215d7df91c4c08dc7bf2d9d2e867d1cf7_2349aede-6e93-4ad1-87dd-452fb2d4f6b8.webp?v=1714721431"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fa2c13215d7df91c4c08dc7bf2d9d2e867d1cf7_2349aede-6e93-4ad1-87dd-452fb2d4f6b8.webp?v=1714721431","width":2000},{"alt":null,"id":23877245894755,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a336f4513864a90c4dfa7e36bc34b05d3f3a25b6_a6032dfa-baf8-4b73-a591-3daef717249e.webp?v=1714721434"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a336f4513864a90c4dfa7e36bc34b05d3f3a25b6_a6032dfa-baf8-4b73-a591-3daef717249e.webp?v=1714721434","width":2000},{"alt":null,"id":23877246451811,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e7729dec3d657cb4dd5aadc28fbc36dba93d6e1_3f9383af-67b3-4c42-aab8-9e47e5018601.webp?v=1714721437"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e7729dec3d657cb4dd5aadc28fbc36dba93d6e1_3f9383af-67b3-4c42-aab8-9e47e5018601.webp?v=1714721437","width":2000},{"alt":null,"id":23877246976099,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b291f845563dc8fa5ca00739afdede5f3aeac4b_49585a25-67df-4c00-87de-56297f83c01d.webp?v=1714721439"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b291f845563dc8fa5ca00739afdede5f3aeac4b_49585a25-67df-4c00-87de-56297f83c01d.webp?v=1714721439","width":2000},{"alt":null,"id":23877247533155,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d73b14a53a25c87717ad787fb46974327e15f0c_722dad4b-fba6-4e54-a5d5-c7559c579966.webp?v=1714721442"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d73b14a53a25c87717ad787fb46974327e15f0c_722dad4b-fba6-4e54-a5d5-c7559c579966.webp?v=1714721442","width":2000},{"alt":null,"id":23877247991907,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f18836d7763db2744c0751340d11a15945aac763_c4b05100-e051-4eb7-982f-6d492ccc814a.webp?v=1714721444"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f18836d7763db2744c0751340d11a15945aac763_c4b05100-e051-4eb7-982f-6d492ccc814a.webp?v=1714721444","width":2000},{"alt":null,"id":23877248647267,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1f56b975dfced80a529207a8e69f48dec869bd5_b02aec86-1d1c-42f5-ba24-56a4fb5357e7.webp?v=1714721447"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1f56b975dfced80a529207a8e69f48dec869bd5_b02aec86-1d1c-42f5-ba24-56a4fb5357e7.webp?v=1714721447","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41885690396771,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-SB04","requires_shipping":true,"taxable":true,"featured_image":{"id":31472326738019,"product_id":7408456990819,"position":1,"created_at":"2024-05-03T15:30:21+08:00","updated_at":"2024-05-03T15:30:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee2bc4ff89d85ca7aa17bb9efb34b959666f33d4_0e887a20-051c-4b82-a3d6-6519b27cf999.webp?v=1714721421","variant_ids":[41885690396771]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Batman - Logo貼紙款 - 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-SB04","featured_media":{"alt":null,"id":23877243142243,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee2bc4ff89d85ca7aa17bb9efb34b959666f33d4_0e887a20-051c-4b82-a3d6-6519b27cf999.webp?v=1714721421"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41885690396771,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-SB04","requires_shipping":true,"taxable":true,"featured_image":{"id":31472326738019,"product_id":7408456990819,"position":1,"created_at":"2024-05-03T15:30:21+08:00","updated_at":"2024-05-03T15:30:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee2bc4ff89d85ca7aa17bb9efb34b959666f33d4_0e887a20-051c-4b82-a3d6-6519b27cf999.webp?v=1714721421","variant_ids":[41885690396771]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Batman - Logo貼紙款 - 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-SB04","featured_media":{"alt":null,"id":23877243142243,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee2bc4ff89d85ca7aa17bb9efb34b959666f33d4_0e887a20-051c-4b82-a3d6-6519b27cf999.webp?v=1714721421"}},"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: "停產" }