$product = {"id":7411271532643,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Look - 願傷疤 有天開出花(亞馬遜雨林)","handle":"iphone-14-plus-mod-nx-magsafe-printable-af01","description":null,"published_at":"2024-06-11T17:40:27+08:00","created_at":"2024-05-04T23:57:41+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Look","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-look","device-iPhone 14 Plus","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-look","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":41896791015523,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-AF01","requires_shipping":true,"taxable":true,"featured_image":{"id":31480011128931,"product_id":7411271532643,"position":1,"created_at":"2024-05-04T23:57:44+08:00","updated_at":"2024-05-04T23:57:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52fcfdf8160accc48483dbf3ce49501dd7f7fbb1_5e7fff28-a04a-4056-9ce0-47fd1fe1b472.webp?v=1714838264","variant_ids":[41896791015523]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Look - 願傷疤 有天開出花(亞馬遜雨林) - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126124-AF01","featured_media":{"alt":null,"id":23885261766755,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52fcfdf8160accc48483dbf3ce49501dd7f7fbb1_5e7fff28-a04a-4056-9ce0-47fd1fe1b472.webp?v=1714838264"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52fcfdf8160accc48483dbf3ce49501dd7f7fbb1_5e7fff28-a04a-4056-9ce0-47fd1fe1b472.webp?v=1714838264","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1132e59e175f2d26ee4b3cfadf46ad5fe8e74f27_c2f7f36c-01dd-4037-b846-6572877cef26.webp?v=1714838266","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a767e10b637382edce7f02ceb0cc2e06d43e1505_93dd8d37-eefc-4184-bc00-c23cee1623fa.webp?v=1714838269","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/791421a0efb2f53ca89c7d12cc0f4f733643cd02_7e6c781d-e3bb-4b67-82d7-46b6b8e6ab68.webp?v=1714838271","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1bae3ecc5a6dbe8869ad587b89c3b324bf0b01f0_52c6e0de-cdbd-4e00-9617-a8f33a52b139.webp?v=1714838273","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b74008ceabedbd0accda985e7e9581260fd76c2a_149e8400-acba-49d0-9e3e-2114241ec948.webp?v=1714838275","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/97a638d22a38b78db53f0fcabb101317ab672515_f2005c2a-7ffc-46ab-9f29-352116b87b91.webp?v=1714838278","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9d18c772f5f7652acc0c5371b33a326a41c1009_84ab0e06-57c8-41b9-82f1-b5e8ee150a65.webp?v=1714838280","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/220149b808df3303f4b45e5ac759ac560376c7bd_0a299da8-9995-4522-820b-f55ed72d5275.webp?v=1714838283","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fceb0255cf46dd2fd8cc3ae1182fefa547f4161_f1fb4bf7-3a09-46bc-803a-adc4cf6e90a9.webp?v=1714838285"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52fcfdf8160accc48483dbf3ce49501dd7f7fbb1_5e7fff28-a04a-4056-9ce0-47fd1fe1b472.webp?v=1714838264","options":["color"],"media":[{"alt":null,"id":23885261766755,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52fcfdf8160accc48483dbf3ce49501dd7f7fbb1_5e7fff28-a04a-4056-9ce0-47fd1fe1b472.webp?v=1714838264"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52fcfdf8160accc48483dbf3ce49501dd7f7fbb1_5e7fff28-a04a-4056-9ce0-47fd1fe1b472.webp?v=1714838264","width":2000},{"alt":null,"id":23885262487651,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1132e59e175f2d26ee4b3cfadf46ad5fe8e74f27_c2f7f36c-01dd-4037-b846-6572877cef26.webp?v=1714838266"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1132e59e175f2d26ee4b3cfadf46ad5fe8e74f27_c2f7f36c-01dd-4037-b846-6572877cef26.webp?v=1714838266","width":2000},{"alt":null,"id":23885263077475,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a767e10b637382edce7f02ceb0cc2e06d43e1505_93dd8d37-eefc-4184-bc00-c23cee1623fa.webp?v=1714838269"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a767e10b637382edce7f02ceb0cc2e06d43e1505_93dd8d37-eefc-4184-bc00-c23cee1623fa.webp?v=1714838269","width":2000},{"alt":null,"id":23885263470691,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/791421a0efb2f53ca89c7d12cc0f4f733643cd02_7e6c781d-e3bb-4b67-82d7-46b6b8e6ab68.webp?v=1714838271"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/791421a0efb2f53ca89c7d12cc0f4f733643cd02_7e6c781d-e3bb-4b67-82d7-46b6b8e6ab68.webp?v=1714838271","width":2000},{"alt":null,"id":23885263962211,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1bae3ecc5a6dbe8869ad587b89c3b324bf0b01f0_52c6e0de-cdbd-4e00-9617-a8f33a52b139.webp?v=1714838273"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1bae3ecc5a6dbe8869ad587b89c3b324bf0b01f0_52c6e0de-cdbd-4e00-9617-a8f33a52b139.webp?v=1714838273","width":2000},{"alt":null,"id":23885264420963,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b74008ceabedbd0accda985e7e9581260fd76c2a_149e8400-acba-49d0-9e3e-2114241ec948.webp?v=1714838275"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b74008ceabedbd0accda985e7e9581260fd76c2a_149e8400-acba-49d0-9e3e-2114241ec948.webp?v=1714838275","width":2000},{"alt":null,"id":23885264945251,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/97a638d22a38b78db53f0fcabb101317ab672515_f2005c2a-7ffc-46ab-9f29-352116b87b91.webp?v=1714838278"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/97a638d22a38b78db53f0fcabb101317ab672515_f2005c2a-7ffc-46ab-9f29-352116b87b91.webp?v=1714838278","width":2000},{"alt":null,"id":23885265469539,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9d18c772f5f7652acc0c5371b33a326a41c1009_84ab0e06-57c8-41b9-82f1-b5e8ee150a65.webp?v=1714838280"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9d18c772f5f7652acc0c5371b33a326a41c1009_84ab0e06-57c8-41b9-82f1-b5e8ee150a65.webp?v=1714838280","width":2000},{"alt":null,"id":23885265961059,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/220149b808df3303f4b45e5ac759ac560376c7bd_0a299da8-9995-4522-820b-f55ed72d5275.webp?v=1714838283"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/220149b808df3303f4b45e5ac759ac560376c7bd_0a299da8-9995-4522-820b-f55ed72d5275.webp?v=1714838283","width":2000},{"alt":null,"id":23885266747491,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fceb0255cf46dd2fd8cc3ae1182fefa547f4161_f1fb4bf7-3a09-46bc-803a-adc4cf6e90a9.webp?v=1714838285"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fceb0255cf46dd2fd8cc3ae1182fefa547f4161_f1fb4bf7-3a09-46bc-803a-adc4cf6e90a9.webp?v=1714838285","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41896791015523,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-AF01","requires_shipping":true,"taxable":true,"featured_image":{"id":31480011128931,"product_id":7411271532643,"position":1,"created_at":"2024-05-04T23:57:44+08:00","updated_at":"2024-05-04T23:57:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52fcfdf8160accc48483dbf3ce49501dd7f7fbb1_5e7fff28-a04a-4056-9ce0-47fd1fe1b472.webp?v=1714838264","variant_ids":[41896791015523]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Look - 願傷疤 有天開出花(亞馬遜雨林) - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126124-AF01","featured_media":{"alt":null,"id":23885261766755,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52fcfdf8160accc48483dbf3ce49501dd7f7fbb1_5e7fff28-a04a-4056-9ce0-47fd1fe1b472.webp?v=1714838264"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41896791015523,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-AF01","requires_shipping":true,"taxable":true,"featured_image":{"id":31480011128931,"product_id":7411271532643,"position":1,"created_at":"2024-05-04T23:57:44+08:00","updated_at":"2024-05-04T23:57:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52fcfdf8160accc48483dbf3ce49501dd7f7fbb1_5e7fff28-a04a-4056-9ce0-47fd1fe1b472.webp?v=1714838264","variant_ids":[41896791015523]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Look - 願傷疤 有天開出花(亞馬遜雨林) - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126124-AF01","featured_media":{"alt":null,"id":23885261766755,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52fcfdf8160accc48483dbf3ce49501dd7f7fbb1_5e7fff28-a04a-4056-9ce0-47fd1fe1b472.webp?v=1714838264"}},"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: "停產" }