$product = {"id":7415012491363,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 小圖款-BB8","handle":"iphone-12-mini-mod-nx-magsafe-printable-pc04","description":null,"published_at":"2024-06-11T17:55:36+08:00","created_at":"2024-05-05T20:06:05+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 mini","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":41910931325027,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PC04","requires_shipping":true,"taxable":true,"featured_image":{"id":31487922438243,"product_id":7415012491363,"position":6,"created_at":"2024-05-05T20:06:21+08:00","updated_at":"2024-05-05T20:06:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd3e6e068851024c01fff6e0c20c729b0e58f491_43a82d53-07f9-418e-8c25-8314ee72a0b7.webp?v=1714910781","variant_ids":[41910931325027]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 小圖款-BB8 - 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-PC04","featured_media":{"alt":null,"id":23893266464867,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd3e6e068851024c01fff6e0c20c729b0e58f491_43a82d53-07f9-418e-8c25-8314ee72a0b7.webp?v=1714910781"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40eb4d0d66354fff5d925fe73d2fbc7b7cfb20d0_e112f7e4-a28f-4fa5-abeb-b69866ac850c.webp?v=1714910769","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a2a20547e985520e4e75d3ac30c13ece356e240_ddb9e886-1a9f-4714-95c7-1b8da66f453f.webp?v=1714910771","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb37c150a690b7fa71b6363127f0fc0cf15d4170_00e7a441-e73d-486b-83c1-381419a28374.webp?v=1714910773","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0d9472be8c82527d8e79d9fa6f09554e9435c9c_d3193d3f-a0ac-47f6-8b3f-bbee42347f6d.webp?v=1714910776","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5ac9cadcba387db6d334d1d01bd46caec8e0d31_059978f7-dc8d-450d-b13a-e6f5ccddcdc2.webp?v=1714910778","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd3e6e068851024c01fff6e0c20c729b0e58f491_43a82d53-07f9-418e-8c25-8314ee72a0b7.webp?v=1714910781","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ac8499cb50963e1f3a231dc4687ac6921a353bb_06934a70-1c51-4186-84bf-ea2862abb591.webp?v=1714910783","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/434e56b60a2a0a1aa2c3242c0034590a822cf36d_58afb1d4-54a1-42c7-812a-1c12865b9b53.webp?v=1714910786","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6096851d2c8e1a2e7b4a7c86681e7a895b7810fa_9747a000-4705-4491-96f0-c9c4a03a7ab5.webp?v=1714910788","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0745333e31124a34735c83d482b68ee39c8e562e_bc493a78-859e-4630-9a3c-590a2dadff03.webp?v=1714910790","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e505cbb5812efd42e9c14fc27b86bdc283edb4cc_e6854fde-3866-4660-998c-b2e2af26c75f.webp?v=1714910792"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40eb4d0d66354fff5d925fe73d2fbc7b7cfb20d0_e112f7e4-a28f-4fa5-abeb-b69866ac850c.webp?v=1714910769","options":["color"],"media":[{"alt":null,"id":23893263581283,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40eb4d0d66354fff5d925fe73d2fbc7b7cfb20d0_e112f7e4-a28f-4fa5-abeb-b69866ac850c.webp?v=1714910769"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40eb4d0d66354fff5d925fe73d2fbc7b7cfb20d0_e112f7e4-a28f-4fa5-abeb-b69866ac850c.webp?v=1714910769","width":2000},{"alt":null,"id":23893264302179,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a2a20547e985520e4e75d3ac30c13ece356e240_ddb9e886-1a9f-4714-95c7-1b8da66f453f.webp?v=1714910771"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a2a20547e985520e4e75d3ac30c13ece356e240_ddb9e886-1a9f-4714-95c7-1b8da66f453f.webp?v=1714910771","width":2000},{"alt":null,"id":23893264793699,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb37c150a690b7fa71b6363127f0fc0cf15d4170_00e7a441-e73d-486b-83c1-381419a28374.webp?v=1714910773"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb37c150a690b7fa71b6363127f0fc0cf15d4170_00e7a441-e73d-486b-83c1-381419a28374.webp?v=1714910773","width":2000},{"alt":null,"id":23893265154147,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0d9472be8c82527d8e79d9fa6f09554e9435c9c_d3193d3f-a0ac-47f6-8b3f-bbee42347f6d.webp?v=1714910776"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0d9472be8c82527d8e79d9fa6f09554e9435c9c_d3193d3f-a0ac-47f6-8b3f-bbee42347f6d.webp?v=1714910776","width":2000},{"alt":null,"id":23893266137187,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5ac9cadcba387db6d334d1d01bd46caec8e0d31_059978f7-dc8d-450d-b13a-e6f5ccddcdc2.webp?v=1714910778"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5ac9cadcba387db6d334d1d01bd46caec8e0d31_059978f7-dc8d-450d-b13a-e6f5ccddcdc2.webp?v=1714910778","width":2000},{"alt":null,"id":23893266464867,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd3e6e068851024c01fff6e0c20c729b0e58f491_43a82d53-07f9-418e-8c25-8314ee72a0b7.webp?v=1714910781"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd3e6e068851024c01fff6e0c20c729b0e58f491_43a82d53-07f9-418e-8c25-8314ee72a0b7.webp?v=1714910781","width":2000},{"alt":null,"id":23893267054691,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ac8499cb50963e1f3a231dc4687ac6921a353bb_06934a70-1c51-4186-84bf-ea2862abb591.webp?v=1714910783"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ac8499cb50963e1f3a231dc4687ac6921a353bb_06934a70-1c51-4186-84bf-ea2862abb591.webp?v=1714910783","width":2000},{"alt":null,"id":23893267382371,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/434e56b60a2a0a1aa2c3242c0034590a822cf36d_58afb1d4-54a1-42c7-812a-1c12865b9b53.webp?v=1714910786"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/434e56b60a2a0a1aa2c3242c0034590a822cf36d_58afb1d4-54a1-42c7-812a-1c12865b9b53.webp?v=1714910786","width":2000},{"alt":null,"id":23893267873891,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6096851d2c8e1a2e7b4a7c86681e7a895b7810fa_9747a000-4705-4491-96f0-c9c4a03a7ab5.webp?v=1714910788"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6096851d2c8e1a2e7b4a7c86681e7a895b7810fa_9747a000-4705-4491-96f0-c9c4a03a7ab5.webp?v=1714910788","width":2000},{"alt":null,"id":23893268496483,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0745333e31124a34735c83d482b68ee39c8e562e_bc493a78-859e-4630-9a3c-590a2dadff03.webp?v=1714910790"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0745333e31124a34735c83d482b68ee39c8e562e_bc493a78-859e-4630-9a3c-590a2dadff03.webp?v=1714910790","width":2000},{"alt":null,"id":23893268856931,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e505cbb5812efd42e9c14fc27b86bdc283edb4cc_e6854fde-3866-4660-998c-b2e2af26c75f.webp?v=1714910792"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e505cbb5812efd42e9c14fc27b86bdc283edb4cc_e6854fde-3866-4660-998c-b2e2af26c75f.webp?v=1714910792","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910931325027,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PC04","requires_shipping":true,"taxable":true,"featured_image":{"id":31487922438243,"product_id":7415012491363,"position":6,"created_at":"2024-05-05T20:06:21+08:00","updated_at":"2024-05-05T20:06:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd3e6e068851024c01fff6e0c20c729b0e58f491_43a82d53-07f9-418e-8c25-8314ee72a0b7.webp?v=1714910781","variant_ids":[41910931325027]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 小圖款-BB8 - 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-PC04","featured_media":{"alt":null,"id":23893266464867,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd3e6e068851024c01fff6e0c20c729b0e58f491_43a82d53-07f9-418e-8c25-8314ee72a0b7.webp?v=1714910781"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910931325027,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PC04","requires_shipping":true,"taxable":true,"featured_image":{"id":31487922438243,"product_id":7415012491363,"position":6,"created_at":"2024-05-05T20:06:21+08:00","updated_at":"2024-05-05T20:06:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd3e6e068851024c01fff6e0c20c729b0e58f491_43a82d53-07f9-418e-8c25-8314ee72a0b7.webp?v=1714910781","variant_ids":[41910931325027]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 小圖款-BB8 - 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-PC04","featured_media":{"alt":null,"id":23893266464867,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd3e6e068851024c01fff6e0c20c729b0e58f491_43a82d53-07f9-418e-8c25-8314ee72a0b7.webp?v=1714910781"}},"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: "停產" }