$product = {"id":7414977495139,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 迪士尼-星際大戰 Star Wars - 風暴兵-全白設計","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-pb103","description":null,"published_at":"2024-06-11T17:54:39+08:00","created_at":"2024-05-05T19:59:26+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 12 pro max","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-star-wars","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":41910550855779,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-PB103","requires_shipping":true,"taxable":true,"featured_image":{"id":31487830949987,"product_id":7414977495139,"position":9,"created_at":"2024-05-05T19:59:47+08:00","updated_at":"2024-05-05T19:59:47+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77e05ded6db41922d3e1625b2d1549799b9a4e70_96a06dad-c271-4693-be20-41d8e4a0d78f.webp?v=1714910387","variant_ids":[41910550855779]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 迪士尼-星際大戰 Star Wars - 風暴兵-全白設計 - 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":"MPB0118724-PB103","featured_media":{"alt":null,"id":23893174911075,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77e05ded6db41922d3e1625b2d1549799b9a4e70_96a06dad-c271-4693-be20-41d8e4a0d78f.webp?v=1714910387"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/957f2fd661b5af723cde2c08a7e58d39245be177_7eab7846-30c6-47c4-ad57-631372a427b8.webp?v=1714910369","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/247d5cacb0c164559e571ce997fe2386d70cdc33_8ad4be62-2e79-467c-a41f-e1fdb393c7c8.webp?v=1714910371","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b8dacc1541aef1e74a3019bc511232053d6f621_75e0b33e-2709-4f44-8af3-792925072302.webp?v=1714910373","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e28ec3d5319a9f2274a112511b1cbf165765498_6ec08729-96f7-4d21-b76c-10bbbcbb310d.webp?v=1714910376","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/837a675773bf5a6b4e3f0894e5e77a2e431cd7f1_8b689244-9c9d-4854-a3f6-ad0603855639.webp?v=1714910378","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0887a4cbf7ade4779825be2a62a5d1b06b1c704_3820aa68-8652-455b-87d6-55d21b919f27.webp?v=1714910380","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b6481b2623cdc9a6523745d89a471eb28d68ad1_2c25448a-8a00-4ad7-9774-f670e11f9fa3.webp?v=1714910382","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e39d06b3530b63d3dad6ad92762c7250fc37e0e_c2a6e137-0ca9-4064-9319-5634c01185f5.webp?v=1714910385","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77e05ded6db41922d3e1625b2d1549799b9a4e70_96a06dad-c271-4693-be20-41d8e4a0d78f.webp?v=1714910387","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9d570b7576b34865178a96efb2d88457718f673_39a2f2b1-56c2-4522-8dcb-f950db28798a.webp?v=1714910390"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/957f2fd661b5af723cde2c08a7e58d39245be177_7eab7846-30c6-47c4-ad57-631372a427b8.webp?v=1714910369","options":["color"],"media":[{"alt":null,"id":23893170651235,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/957f2fd661b5af723cde2c08a7e58d39245be177_7eab7846-30c6-47c4-ad57-631372a427b8.webp?v=1714910369"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/957f2fd661b5af723cde2c08a7e58d39245be177_7eab7846-30c6-47c4-ad57-631372a427b8.webp?v=1714910369","width":2000},{"alt":null,"id":23893171077219,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/247d5cacb0c164559e571ce997fe2386d70cdc33_8ad4be62-2e79-467c-a41f-e1fdb393c7c8.webp?v=1714910371"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/247d5cacb0c164559e571ce997fe2386d70cdc33_8ad4be62-2e79-467c-a41f-e1fdb393c7c8.webp?v=1714910371","width":2000},{"alt":null,"id":23893171503203,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b8dacc1541aef1e74a3019bc511232053d6f621_75e0b33e-2709-4f44-8af3-792925072302.webp?v=1714910373"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b8dacc1541aef1e74a3019bc511232053d6f621_75e0b33e-2709-4f44-8af3-792925072302.webp?v=1714910373","width":2000},{"alt":null,"id":23893171929187,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e28ec3d5319a9f2274a112511b1cbf165765498_6ec08729-96f7-4d21-b76c-10bbbcbb310d.webp?v=1714910376"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e28ec3d5319a9f2274a112511b1cbf165765498_6ec08729-96f7-4d21-b76c-10bbbcbb310d.webp?v=1714910376","width":2000},{"alt":null,"id":23893172650083,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/837a675773bf5a6b4e3f0894e5e77a2e431cd7f1_8b689244-9c9d-4854-a3f6-ad0603855639.webp?v=1714910378"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/837a675773bf5a6b4e3f0894e5e77a2e431cd7f1_8b689244-9c9d-4854-a3f6-ad0603855639.webp?v=1714910378","width":2000},{"alt":null,"id":23893173043299,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0887a4cbf7ade4779825be2a62a5d1b06b1c704_3820aa68-8652-455b-87d6-55d21b919f27.webp?v=1714910380"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0887a4cbf7ade4779825be2a62a5d1b06b1c704_3820aa68-8652-455b-87d6-55d21b919f27.webp?v=1714910380","width":2000},{"alt":null,"id":23893173600355,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b6481b2623cdc9a6523745d89a471eb28d68ad1_2c25448a-8a00-4ad7-9774-f670e11f9fa3.webp?v=1714910382"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b6481b2623cdc9a6523745d89a471eb28d68ad1_2c25448a-8a00-4ad7-9774-f670e11f9fa3.webp?v=1714910382","width":2000},{"alt":null,"id":23893174026339,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e39d06b3530b63d3dad6ad92762c7250fc37e0e_c2a6e137-0ca9-4064-9319-5634c01185f5.webp?v=1714910385"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e39d06b3530b63d3dad6ad92762c7250fc37e0e_c2a6e137-0ca9-4064-9319-5634c01185f5.webp?v=1714910385","width":2000},{"alt":null,"id":23893174911075,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77e05ded6db41922d3e1625b2d1549799b9a4e70_96a06dad-c271-4693-be20-41d8e4a0d78f.webp?v=1714910387"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77e05ded6db41922d3e1625b2d1549799b9a4e70_96a06dad-c271-4693-be20-41d8e4a0d78f.webp?v=1714910387","width":2000},{"alt":null,"id":23893175468131,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9d570b7576b34865178a96efb2d88457718f673_39a2f2b1-56c2-4522-8dcb-f950db28798a.webp?v=1714910390"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9d570b7576b34865178a96efb2d88457718f673_39a2f2b1-56c2-4522-8dcb-f950db28798a.webp?v=1714910390","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910550855779,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-PB103","requires_shipping":true,"taxable":true,"featured_image":{"id":31487830949987,"product_id":7414977495139,"position":9,"created_at":"2024-05-05T19:59:47+08:00","updated_at":"2024-05-05T19:59:47+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77e05ded6db41922d3e1625b2d1549799b9a4e70_96a06dad-c271-4693-be20-41d8e4a0d78f.webp?v=1714910387","variant_ids":[41910550855779]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 迪士尼-星際大戰 Star Wars - 風暴兵-全白設計 - 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":"MPB0118724-PB103","featured_media":{"alt":null,"id":23893174911075,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77e05ded6db41922d3e1625b2d1549799b9a4e70_96a06dad-c271-4693-be20-41d8e4a0d78f.webp?v=1714910387"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910550855779,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-PB103","requires_shipping":true,"taxable":true,"featured_image":{"id":31487830949987,"product_id":7414977495139,"position":9,"created_at":"2024-05-05T19:59:47+08:00","updated_at":"2024-05-05T19:59:47+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77e05ded6db41922d3e1625b2d1549799b9a4e70_96a06dad-c271-4693-be20-41d8e4a0d78f.webp?v=1714910387","variant_ids":[41910550855779]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 迪士尼-星際大戰 Star Wars - 風暴兵-全白設計 - 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":"MPB0118724-PB103","featured_media":{"alt":null,"id":23893174911075,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77e05ded6db41922d3e1625b2d1549799b9a4e70_96a06dad-c271-4693-be20-41d8e4a0d78f.webp?v=1714910387"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null; $type = ""; var sellingStatus if ($isMerge) { $(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: "停產" }