$product = {"id":7408540745827,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【獨家設計款】 - 星雨夜空","handle":"iphone-12-mini-mod-nx-printable-a046","description":null,"published_at":"2024-06-11T16:40:08+08:00","created_at":"2024-05-03T15:46:40+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"MOD NX 客製化","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","device-iPhone 12 mini","discountable-item","member","merge","mod-nx-printable","new-modnx-sku","reseller","reseller-modnx","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":41886651940963,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-A046","requires_shipping":true,"taxable":true,"featured_image":{"id":31472537862243,"product_id":7408540745827,"position":2,"created_at":"2024-05-03T15:46:47+08:00","updated_at":"2024-05-03T15:46:47+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5fb38b304fd88a828df929df80b29dd43a9496e_fa5cdf51-0d2b-4a6c-ae33-7aa4c5e356a3.webp?v=1714722407","variant_ids":[41886651940963]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【獨家設計款】 - 星雨夜空 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-A046","featured_media":{"alt":null,"id":23877455151203,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5fb38b304fd88a828df929df80b29dd43a9496e_fa5cdf51-0d2b-4a6c-ae33-7aa4c5e356a3.webp?v=1714722407"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/186c6fa87e37786cf0acda4cf5d7fc410e7669ff_eba9df3d-73dc-4c5a-9a7c-5f664e147783.webp?v=1714722403","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5fb38b304fd88a828df929df80b29dd43a9496e_fa5cdf51-0d2b-4a6c-ae33-7aa4c5e356a3.webp?v=1714722407","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/225cea576cb501888230204f57c322267ee16575_e29a4998-0665-41c2-893e-70d8dedefe94.webp?v=1714722409","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa82357eb6fae19aa59e1d4d5e9a98edc80889d5_204e341d-0f6c-4b3f-901e-f722ee01b50e.webp?v=1714722411","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d097bf962a010d370eb84cbb182b7baf91274361_28da3952-a6c6-42f9-93ee-01c2162fa283.webp?v=1714722414","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a9c4ce55dfa0efb3cffd79a0c8f0b5072619040_de23b1ec-9bdd-48dd-b49b-aeb1772fdf10.webp?v=1714722416","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca4e1d850180e2f50c91c1609da359851d8b0fcc_0fa79b4b-456e-4402-8cbd-809634351e75.webp?v=1714722419","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/594e0819905c69490c477c885f36d3348c395b21_d077cbb9-0077-4f86-9e35-aadc8ed9c8c0.webp?v=1714722422","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98da353c8b16c16bac56a4b61571da638c17691b_03d2be06-ad59-47a8-8a09-023859ff4141.webp?v=1714722424","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c7b7856b4d3886c031ee81890427afed06b21a99_ce64f8d0-1f43-4f1b-bf1f-386395aac98c.webp?v=1714722426","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1cc920e40530134fc3f729cce61ba657049d86d1_9f65add3-7c1e-4b35-a084-e82a5345b997.webp?v=1714722429"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/186c6fa87e37786cf0acda4cf5d7fc410e7669ff_eba9df3d-73dc-4c5a-9a7c-5f664e147783.webp?v=1714722403","options":["color"],"media":[{"alt":null,"id":23877454364771,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/186c6fa87e37786cf0acda4cf5d7fc410e7669ff_eba9df3d-73dc-4c5a-9a7c-5f664e147783.webp?v=1714722403"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/186c6fa87e37786cf0acda4cf5d7fc410e7669ff_eba9df3d-73dc-4c5a-9a7c-5f664e147783.webp?v=1714722403","width":2000},{"alt":null,"id":23877455151203,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5fb38b304fd88a828df929df80b29dd43a9496e_fa5cdf51-0d2b-4a6c-ae33-7aa4c5e356a3.webp?v=1714722407"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5fb38b304fd88a828df929df80b29dd43a9496e_fa5cdf51-0d2b-4a6c-ae33-7aa4c5e356a3.webp?v=1714722407","width":2000},{"alt":null,"id":23877455675491,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/225cea576cb501888230204f57c322267ee16575_e29a4998-0665-41c2-893e-70d8dedefe94.webp?v=1714722409"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/225cea576cb501888230204f57c322267ee16575_e29a4998-0665-41c2-893e-70d8dedefe94.webp?v=1714722409","width":2000},{"alt":null,"id":23877456494691,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa82357eb6fae19aa59e1d4d5e9a98edc80889d5_204e341d-0f6c-4b3f-901e-f722ee01b50e.webp?v=1714722411"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa82357eb6fae19aa59e1d4d5e9a98edc80889d5_204e341d-0f6c-4b3f-901e-f722ee01b50e.webp?v=1714722411","width":2000},{"alt":null,"id":23877457018979,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d097bf962a010d370eb84cbb182b7baf91274361_28da3952-a6c6-42f9-93ee-01c2162fa283.webp?v=1714722414"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d097bf962a010d370eb84cbb182b7baf91274361_28da3952-a6c6-42f9-93ee-01c2162fa283.webp?v=1714722414","width":2000},{"alt":null,"id":23877457641571,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a9c4ce55dfa0efb3cffd79a0c8f0b5072619040_de23b1ec-9bdd-48dd-b49b-aeb1772fdf10.webp?v=1714722416"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a9c4ce55dfa0efb3cffd79a0c8f0b5072619040_de23b1ec-9bdd-48dd-b49b-aeb1772fdf10.webp?v=1714722416","width":2000},{"alt":null,"id":23877458165859,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca4e1d850180e2f50c91c1609da359851d8b0fcc_0fa79b4b-456e-4402-8cbd-809634351e75.webp?v=1714722419"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca4e1d850180e2f50c91c1609da359851d8b0fcc_0fa79b4b-456e-4402-8cbd-809634351e75.webp?v=1714722419","width":2000},{"alt":null,"id":23877458788451,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/594e0819905c69490c477c885f36d3348c395b21_d077cbb9-0077-4f86-9e35-aadc8ed9c8c0.webp?v=1714722422"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/594e0819905c69490c477c885f36d3348c395b21_d077cbb9-0077-4f86-9e35-aadc8ed9c8c0.webp?v=1714722422","width":2000},{"alt":null,"id":23877459312739,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98da353c8b16c16bac56a4b61571da638c17691b_03d2be06-ad59-47a8-8a09-023859ff4141.webp?v=1714722424"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98da353c8b16c16bac56a4b61571da638c17691b_03d2be06-ad59-47a8-8a09-023859ff4141.webp?v=1714722424","width":2000},{"alt":null,"id":23877460131939,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c7b7856b4d3886c031ee81890427afed06b21a99_ce64f8d0-1f43-4f1b-bf1f-386395aac98c.webp?v=1714722426"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c7b7856b4d3886c031ee81890427afed06b21a99_ce64f8d0-1f43-4f1b-bf1f-386395aac98c.webp?v=1714722426","width":2000},{"alt":null,"id":23877460656227,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1cc920e40530134fc3f729cce61ba657049d86d1_9f65add3-7c1e-4b35-a084-e82a5345b997.webp?v=1714722429"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1cc920e40530134fc3f729cce61ba657049d86d1_9f65add3-7c1e-4b35-a084-e82a5345b997.webp?v=1714722429","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41886651940963,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-A046","requires_shipping":true,"taxable":true,"featured_image":{"id":31472537862243,"product_id":7408540745827,"position":2,"created_at":"2024-05-03T15:46:47+08:00","updated_at":"2024-05-03T15:46:47+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5fb38b304fd88a828df929df80b29dd43a9496e_fa5cdf51-0d2b-4a6c-ae33-7aa4c5e356a3.webp?v=1714722407","variant_ids":[41886651940963]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【獨家設計款】 - 星雨夜空 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-A046","featured_media":{"alt":null,"id":23877455151203,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5fb38b304fd88a828df929df80b29dd43a9496e_fa5cdf51-0d2b-4a6c-ae33-7aa4c5e356a3.webp?v=1714722407"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41886651940963,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-A046","requires_shipping":true,"taxable":true,"featured_image":{"id":31472537862243,"product_id":7408540745827,"position":2,"created_at":"2024-05-03T15:46:47+08:00","updated_at":"2024-05-03T15:46:47+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5fb38b304fd88a828df929df80b29dd43a9496e_fa5cdf51-0d2b-4a6c-ae33-7aa4c5e356a3.webp?v=1714722407","variant_ids":[41886651940963]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【獨家設計款】 - 星雨夜空 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-A046","featured_media":{"alt":null,"id":23877455151203,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5fb38b304fd88a828df929df80b29dd43a9496e_fa5cdf51-0d2b-4a6c-ae33-7aa4c5e356a3.webp?v=1714722407"}},"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: "停產" }