$product = {"id":7414978019427,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - JEDI ORDER 原力-潮流系列","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb48","description":null,"published_at":"2024-06-11T17:54:40+08:00","created_at":"2024-05-05T19:59:36+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":41910563209315,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB48","requires_shipping":true,"taxable":true,"featured_image":{"id":31487829246051,"product_id":7414978019427,"position":2,"created_at":"2024-05-05T19:59:41+08:00","updated_at":"2024-05-05T19:59:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc15fe452d21f78d1084ed5f27063dc8a015f76c_c06b0eaa-0a84-44cc-b593-94c47acaacf5.webp?v=1714910381","variant_ids":[41910563209315]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - JEDI ORDER 原力-潮流系列 - 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-PB48","featured_media":{"alt":null,"id":23893173207139,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc15fe452d21f78d1084ed5f27063dc8a015f76c_c06b0eaa-0a84-44cc-b593-94c47acaacf5.webp?v=1714910381"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ddadee6abcdf4f4daeee934690c04289a2926b64_1c21c99b-a899-4666-9e05-67e62229e583.webp?v=1714910378","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc15fe452d21f78d1084ed5f27063dc8a015f76c_c06b0eaa-0a84-44cc-b593-94c47acaacf5.webp?v=1714910381","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/479f8ab71e7d6a3788ca025434e30d4892c8bb51_ef1e4666-0924-448f-87fd-1d7d1f9aa26c.webp?v=1714910384","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18aede02bcf6b7d343d16ac84863a2436964a624_7c637b16-085f-4228-a860-52aae84972e5.webp?v=1714910386","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0624b9fd32e7a7004f455cf7665429e512dbf8a5_583fc563-75cb-4af2-aec7-653fcac12f5f.webp?v=1714910389","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6e5ce015b6bbbfc24ae29feed77e2a3720f9301_189641c6-679a-4631-8ff2-195deeb243aa.webp?v=1714910391","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea89ef3c359b34db040c8ba0d242823fd1358f70_59618279-acc7-43e7-89e5-af028461885b.webp?v=1714910394","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10deb14a9c64e68e052333c9d308bd7e22cd0c5b_a3d842a2-2832-4212-89bb-effe1a2afe17.webp?v=1714910397","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e34499d0ec26f87ca38aa40384fbaf9bd0469636_8e02fb5b-3964-4262-bd2f-24a7566811f0.webp?v=1714910399","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/740cc54e771b17c5d6edbbf8c4911e48a912f567_47277675-f0a0-4025-8a7e-be50a12eff49.webp?v=1714910402","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea6cd93d231a03e86c77d5d7a5dd943b0b08d6fc_ebab8cf7-f395-49b8-ad14-4040325ee9a2.webp?v=1714910404"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ddadee6abcdf4f4daeee934690c04289a2926b64_1c21c99b-a899-4666-9e05-67e62229e583.webp?v=1714910378","options":["color"],"media":[{"alt":null,"id":23893172748387,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ddadee6abcdf4f4daeee934690c04289a2926b64_1c21c99b-a899-4666-9e05-67e62229e583.webp?v=1714910378"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ddadee6abcdf4f4daeee934690c04289a2926b64_1c21c99b-a899-4666-9e05-67e62229e583.webp?v=1714910378","width":2000},{"alt":null,"id":23893173207139,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc15fe452d21f78d1084ed5f27063dc8a015f76c_c06b0eaa-0a84-44cc-b593-94c47acaacf5.webp?v=1714910381"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc15fe452d21f78d1084ed5f27063dc8a015f76c_c06b0eaa-0a84-44cc-b593-94c47acaacf5.webp?v=1714910381","width":2000},{"alt":null,"id":23893173764195,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/479f8ab71e7d6a3788ca025434e30d4892c8bb51_ef1e4666-0924-448f-87fd-1d7d1f9aa26c.webp?v=1714910384"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/479f8ab71e7d6a3788ca025434e30d4892c8bb51_ef1e4666-0924-448f-87fd-1d7d1f9aa26c.webp?v=1714910384","width":2000},{"alt":null,"id":23893174681699,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18aede02bcf6b7d343d16ac84863a2436964a624_7c637b16-085f-4228-a860-52aae84972e5.webp?v=1714910386"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18aede02bcf6b7d343d16ac84863a2436964a624_7c637b16-085f-4228-a860-52aae84972e5.webp?v=1714910386","width":2000},{"alt":null,"id":23893175107683,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0624b9fd32e7a7004f455cf7665429e512dbf8a5_583fc563-75cb-4af2-aec7-653fcac12f5f.webp?v=1714910389"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0624b9fd32e7a7004f455cf7665429e512dbf8a5_583fc563-75cb-4af2-aec7-653fcac12f5f.webp?v=1714910389","width":2000},{"alt":null,"id":23893175631971,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6e5ce015b6bbbfc24ae29feed77e2a3720f9301_189641c6-679a-4631-8ff2-195deeb243aa.webp?v=1714910391"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6e5ce015b6bbbfc24ae29feed77e2a3720f9301_189641c6-679a-4631-8ff2-195deeb243aa.webp?v=1714910391","width":2000},{"alt":null,"id":23893176221795,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea89ef3c359b34db040c8ba0d242823fd1358f70_59618279-acc7-43e7-89e5-af028461885b.webp?v=1714910394"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea89ef3c359b34db040c8ba0d242823fd1358f70_59618279-acc7-43e7-89e5-af028461885b.webp?v=1714910394","width":2000},{"alt":null,"id":23893176778851,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10deb14a9c64e68e052333c9d308bd7e22cd0c5b_a3d842a2-2832-4212-89bb-effe1a2afe17.webp?v=1714910397"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10deb14a9c64e68e052333c9d308bd7e22cd0c5b_a3d842a2-2832-4212-89bb-effe1a2afe17.webp?v=1714910397","width":2000},{"alt":null,"id":23893177303139,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e34499d0ec26f87ca38aa40384fbaf9bd0469636_8e02fb5b-3964-4262-bd2f-24a7566811f0.webp?v=1714910399"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e34499d0ec26f87ca38aa40384fbaf9bd0469636_8e02fb5b-3964-4262-bd2f-24a7566811f0.webp?v=1714910399","width":2000},{"alt":null,"id":23893177925731,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/740cc54e771b17c5d6edbbf8c4911e48a912f567_47277675-f0a0-4025-8a7e-be50a12eff49.webp?v=1714910402"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/740cc54e771b17c5d6edbbf8c4911e48a912f567_47277675-f0a0-4025-8a7e-be50a12eff49.webp?v=1714910402","width":2000},{"alt":null,"id":23893178384483,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea6cd93d231a03e86c77d5d7a5dd943b0b08d6fc_ebab8cf7-f395-49b8-ad14-4040325ee9a2.webp?v=1714910404"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea6cd93d231a03e86c77d5d7a5dd943b0b08d6fc_ebab8cf7-f395-49b8-ad14-4040325ee9a2.webp?v=1714910404","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910563209315,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB48","requires_shipping":true,"taxable":true,"featured_image":{"id":31487829246051,"product_id":7414978019427,"position":2,"created_at":"2024-05-05T19:59:41+08:00","updated_at":"2024-05-05T19:59:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc15fe452d21f78d1084ed5f27063dc8a015f76c_c06b0eaa-0a84-44cc-b593-94c47acaacf5.webp?v=1714910381","variant_ids":[41910563209315]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - JEDI ORDER 原力-潮流系列 - 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-PB48","featured_media":{"alt":null,"id":23893173207139,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc15fe452d21f78d1084ed5f27063dc8a015f76c_c06b0eaa-0a84-44cc-b593-94c47acaacf5.webp?v=1714910381"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910563209315,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB48","requires_shipping":true,"taxable":true,"featured_image":{"id":31487829246051,"product_id":7414978019427,"position":2,"created_at":"2024-05-05T19:59:41+08:00","updated_at":"2024-05-05T19:59:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc15fe452d21f78d1084ed5f27063dc8a015f76c_c06b0eaa-0a84-44cc-b593-94c47acaacf5.webp?v=1714910381","variant_ids":[41910563209315]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - JEDI ORDER 原力-潮流系列 - 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-PB48","featured_media":{"alt":null,"id":23893173207139,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc15fe452d21f78d1084ed5f27063dc8a015f76c_c06b0eaa-0a84-44cc-b593-94c47acaacf5.webp?v=1714910381"}},"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: "停產" }