$product = {"id":7408413409379,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士\u0026風暴兵-剪紙系列","handle":"iphone-12-mini-mod-nx-printable-pb55","description":null,"published_at":"2024-06-11T16:36:33+08:00","created_at":"2024-05-03T15:21:40+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 12 mini","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-star-wars","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":41885196484707,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB55","requires_shipping":true,"taxable":true,"featured_image":{"id":31472210018403,"product_id":7408413409379,"position":10,"created_at":"2024-05-03T15:22:03+08:00","updated_at":"2024-05-03T15:22:03+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f923743e5d7c009354ddb039970747d044969bc_64c2795d-9a23-4aab-99f4-b34102a0b53f.webp?v=1714720923","variant_ids":[41885196484707]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士\u0026風暴兵-剪紙系列 - 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-PB55","featured_media":{"alt":null,"id":23877125800035,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f923743e5d7c009354ddb039970747d044969bc_64c2795d-9a23-4aab-99f4-b34102a0b53f.webp?v=1714720923"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/48c3130deb3066d8c0ffa9babccd36488ac8b5f6_c2f83d6a-2a7b-4754-96a8-d6fae76054c3.webp?v=1714720902","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdd6e91314cc4ec5714baebf78d4cb964a129451_38212364-a8f9-4ff7-a00a-af07948f6bd7.webp?v=1714720905","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17c637eb2b74ade9689d99e30b3ffadcfe909dec_17ea6c8b-8a38-463e-a653-3794a45993ee.webp?v=1714720907","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f95a6b1143fb323dab864c8e7db5f094ae89b63_dcd3386b-6c4f-429e-af3b-4ac47b041204.webp?v=1714720909","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eaa2f27bb2beaa46af77709b614e5b4fbb0a23ae_a9c64e60-0497-420f-a21f-a397e756756f.webp?v=1714720911","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ebc15dc95515dd904e68bf6e793b7712104c6fd_40aac8ab-e759-4950-a8a7-c1423ac4a515.webp?v=1714720914","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e481bd073c47d15f398dd5bb6ff7d1b15582aaf3_51c0a7a7-247a-4c10-8107-feb662b6febf.webp?v=1714720916","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d4d345024a821ccb133b33e019a4a6c3fbe2c94_ba4179a5-4ce3-4c68-bcc8-eee08a3ed541.webp?v=1714720918","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b7f7b78da418f3b8d89cebf95f49f5e0ab0c2e4_1d518c04-7fef-4a84-a0fb-89c84a1cee6b.webp?v=1714720921","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f923743e5d7c009354ddb039970747d044969bc_64c2795d-9a23-4aab-99f4-b34102a0b53f.webp?v=1714720923","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/867ee9e3407f2289f8255a2f53a1f30d3ce08237_cd753f3e-2dd2-4877-85dd-272a045929aa.webp?v=1714720925"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/48c3130deb3066d8c0ffa9babccd36488ac8b5f6_c2f83d6a-2a7b-4754-96a8-d6fae76054c3.webp?v=1714720902","options":["color"],"media":[{"alt":null,"id":23877119639651,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/48c3130deb3066d8c0ffa9babccd36488ac8b5f6_c2f83d6a-2a7b-4754-96a8-d6fae76054c3.webp?v=1714720902"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/48c3130deb3066d8c0ffa9babccd36488ac8b5f6_c2f83d6a-2a7b-4754-96a8-d6fae76054c3.webp?v=1714720902","width":2000},{"alt":null,"id":23877120360547,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdd6e91314cc4ec5714baebf78d4cb964a129451_38212364-a8f9-4ff7-a00a-af07948f6bd7.webp?v=1714720905"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdd6e91314cc4ec5714baebf78d4cb964a129451_38212364-a8f9-4ff7-a00a-af07948f6bd7.webp?v=1714720905","width":2000},{"alt":null,"id":23877120753763,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17c637eb2b74ade9689d99e30b3ffadcfe909dec_17ea6c8b-8a38-463e-a653-3794a45993ee.webp?v=1714720907"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17c637eb2b74ade9689d99e30b3ffadcfe909dec_17ea6c8b-8a38-463e-a653-3794a45993ee.webp?v=1714720907","width":2000},{"alt":null,"id":23877121409123,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f95a6b1143fb323dab864c8e7db5f094ae89b63_dcd3386b-6c4f-429e-af3b-4ac47b041204.webp?v=1714720909"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f95a6b1143fb323dab864c8e7db5f094ae89b63_dcd3386b-6c4f-429e-af3b-4ac47b041204.webp?v=1714720909","width":2000},{"alt":null,"id":23877121867875,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eaa2f27bb2beaa46af77709b614e5b4fbb0a23ae_a9c64e60-0497-420f-a21f-a397e756756f.webp?v=1714720911"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eaa2f27bb2beaa46af77709b614e5b4fbb0a23ae_a9c64e60-0497-420f-a21f-a397e756756f.webp?v=1714720911","width":2000},{"alt":null,"id":23877123047523,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ebc15dc95515dd904e68bf6e793b7712104c6fd_40aac8ab-e759-4950-a8a7-c1423ac4a515.webp?v=1714720914"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ebc15dc95515dd904e68bf6e793b7712104c6fd_40aac8ab-e759-4950-a8a7-c1423ac4a515.webp?v=1714720914","width":2000},{"alt":null,"id":23877124325475,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e481bd073c47d15f398dd5bb6ff7d1b15582aaf3_51c0a7a7-247a-4c10-8107-feb662b6febf.webp?v=1714720916"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e481bd073c47d15f398dd5bb6ff7d1b15582aaf3_51c0a7a7-247a-4c10-8107-feb662b6febf.webp?v=1714720916","width":2000},{"alt":null,"id":23877124816995,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d4d345024a821ccb133b33e019a4a6c3fbe2c94_ba4179a5-4ce3-4c68-bcc8-eee08a3ed541.webp?v=1714720918"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d4d345024a821ccb133b33e019a4a6c3fbe2c94_ba4179a5-4ce3-4c68-bcc8-eee08a3ed541.webp?v=1714720918","width":2000},{"alt":null,"id":23877125374051,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b7f7b78da418f3b8d89cebf95f49f5e0ab0c2e4_1d518c04-7fef-4a84-a0fb-89c84a1cee6b.webp?v=1714720921"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b7f7b78da418f3b8d89cebf95f49f5e0ab0c2e4_1d518c04-7fef-4a84-a0fb-89c84a1cee6b.webp?v=1714720921","width":2000},{"alt":null,"id":23877125800035,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f923743e5d7c009354ddb039970747d044969bc_64c2795d-9a23-4aab-99f4-b34102a0b53f.webp?v=1714720923"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f923743e5d7c009354ddb039970747d044969bc_64c2795d-9a23-4aab-99f4-b34102a0b53f.webp?v=1714720923","width":2000},{"alt":null,"id":23877126127715,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/867ee9e3407f2289f8255a2f53a1f30d3ce08237_cd753f3e-2dd2-4877-85dd-272a045929aa.webp?v=1714720925"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/867ee9e3407f2289f8255a2f53a1f30d3ce08237_cd753f3e-2dd2-4877-85dd-272a045929aa.webp?v=1714720925","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41885196484707,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB55","requires_shipping":true,"taxable":true,"featured_image":{"id":31472210018403,"product_id":7408413409379,"position":10,"created_at":"2024-05-03T15:22:03+08:00","updated_at":"2024-05-03T15:22:03+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f923743e5d7c009354ddb039970747d044969bc_64c2795d-9a23-4aab-99f4-b34102a0b53f.webp?v=1714720923","variant_ids":[41885196484707]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士\u0026風暴兵-剪紙系列 - 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-PB55","featured_media":{"alt":null,"id":23877125800035,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f923743e5d7c009354ddb039970747d044969bc_64c2795d-9a23-4aab-99f4-b34102a0b53f.webp?v=1714720923"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41885196484707,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB55","requires_shipping":true,"taxable":true,"featured_image":{"id":31472210018403,"product_id":7408413409379,"position":10,"created_at":"2024-05-03T15:22:03+08:00","updated_at":"2024-05-03T15:22:03+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f923743e5d7c009354ddb039970747d044969bc_64c2795d-9a23-4aab-99f4-b34102a0b53f.webp?v=1714720923","variant_ids":[41885196484707]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士\u0026風暴兵-剪紙系列 - 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-PB55","featured_media":{"alt":null,"id":23877125800035,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f923743e5d7c009354ddb039970747d044969bc_64c2795d-9a23-4aab-99f4-b34102a0b53f.webp?v=1714720923"}},"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: "停產" }