$product = {"id":7411251970147,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Batman - 漫畫風格","handle":"iphone-14-plus-mod-nx-magsafe-printable-sb02","description":null,"published_at":"2024-06-11T17:39:57+08:00","created_at":"2024-05-04T23:53:58+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Batman","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-batman","device-iPhone 14 Plus","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-batman","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":41896544731235,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-SB02","requires_shipping":true,"taxable":true,"featured_image":{"id":31479963844707,"product_id":7411251970147,"position":6,"created_at":"2024-05-04T23:54:12+08:00","updated_at":"2024-05-04T23:54:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7141ae60593d6cacb1e414e2e699abdbf0c9b6a_dbd9ba75-4197-441a-9798-8153d4ee6ed8.webp?v=1714838052","variant_ids":[41896544731235]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Batman - 漫畫風格 - 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":"MPB0126124-SB02","featured_media":{"alt":null,"id":23885214482531,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7141ae60593d6cacb1e414e2e699abdbf0c9b6a_dbd9ba75-4197-441a-9798-8153d4ee6ed8.webp?v=1714838052"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58aa17a69f356ed77c8521c7dadd3c8f05e98af7_d06ab065-ace0-4752-9dad-5473c7e2f968.webp?v=1714838040","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5851af7ca1d1aec1616f0a7fd66b02cd5540eb15_c7cf304b-4abf-4168-a61c-6db3dfae14cc.webp?v=1714838043","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/029b5cb4cf8a761fb4609dbb78ce72d23ffbc890_1915312d-8adf-4520-83bf-9ec99f90c24d.webp?v=1714838045","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9542633a1bf2b97a253774364317c8347b43ae39_96e1121f-f186-4545-982e-a1a20a02eb08.webp?v=1714838047","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b628cf40f8f56644492f9d9f1a866de90f94cd0_59c9eed9-1c21-41b8-afdb-bb38caa9181e.webp?v=1714838050","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7141ae60593d6cacb1e414e2e699abdbf0c9b6a_dbd9ba75-4197-441a-9798-8153d4ee6ed8.webp?v=1714838052","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b55bef3ab994d4d12ebf196dd2fc1867fd1d5d0_4ea14f9c-2690-4514-ac7e-204f2303215b.webp?v=1714838054","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d07226b72befc14f47c70e5d31c9459ad7a50ba_24f270fe-ac66-4bab-9fdf-9fdd956b4764.webp?v=1714838057","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3926b4d76841e6a65d2257ae78aa4e9914fff60f_862c4d9f-052b-4699-9937-8fc85bb2f26e.webp?v=1714838059","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b0ddd995416b2f41760f7e87d6e63e8d84229aa9_6c7f44f9-3de1-401f-a08e-2d2726343851.webp?v=1714838061"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58aa17a69f356ed77c8521c7dadd3c8f05e98af7_d06ab065-ace0-4752-9dad-5473c7e2f968.webp?v=1714838040","options":["color"],"media":[{"alt":null,"id":23885211762787,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58aa17a69f356ed77c8521c7dadd3c8f05e98af7_d06ab065-ace0-4752-9dad-5473c7e2f968.webp?v=1714838040"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58aa17a69f356ed77c8521c7dadd3c8f05e98af7_d06ab065-ace0-4752-9dad-5473c7e2f968.webp?v=1714838040","width":2000},{"alt":null,"id":23885212221539,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5851af7ca1d1aec1616f0a7fd66b02cd5540eb15_c7cf304b-4abf-4168-a61c-6db3dfae14cc.webp?v=1714838043"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5851af7ca1d1aec1616f0a7fd66b02cd5540eb15_c7cf304b-4abf-4168-a61c-6db3dfae14cc.webp?v=1714838043","width":2000},{"alt":null,"id":23885212778595,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/029b5cb4cf8a761fb4609dbb78ce72d23ffbc890_1915312d-8adf-4520-83bf-9ec99f90c24d.webp?v=1714838045"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/029b5cb4cf8a761fb4609dbb78ce72d23ffbc890_1915312d-8adf-4520-83bf-9ec99f90c24d.webp?v=1714838045","width":2000},{"alt":null,"id":23885213335651,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9542633a1bf2b97a253774364317c8347b43ae39_96e1121f-f186-4545-982e-a1a20a02eb08.webp?v=1714838047"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9542633a1bf2b97a253774364317c8347b43ae39_96e1121f-f186-4545-982e-a1a20a02eb08.webp?v=1714838047","width":2000},{"alt":null,"id":23885213794403,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b628cf40f8f56644492f9d9f1a866de90f94cd0_59c9eed9-1c21-41b8-afdb-bb38caa9181e.webp?v=1714838050"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b628cf40f8f56644492f9d9f1a866de90f94cd0_59c9eed9-1c21-41b8-afdb-bb38caa9181e.webp?v=1714838050","width":2000},{"alt":null,"id":23885214482531,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7141ae60593d6cacb1e414e2e699abdbf0c9b6a_dbd9ba75-4197-441a-9798-8153d4ee6ed8.webp?v=1714838052"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7141ae60593d6cacb1e414e2e699abdbf0c9b6a_dbd9ba75-4197-441a-9798-8153d4ee6ed8.webp?v=1714838052","width":2000},{"alt":null,"id":23885215137891,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b55bef3ab994d4d12ebf196dd2fc1867fd1d5d0_4ea14f9c-2690-4514-ac7e-204f2303215b.webp?v=1714838054"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b55bef3ab994d4d12ebf196dd2fc1867fd1d5d0_4ea14f9c-2690-4514-ac7e-204f2303215b.webp?v=1714838054","width":2000},{"alt":null,"id":23885215596643,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d07226b72befc14f47c70e5d31c9459ad7a50ba_24f270fe-ac66-4bab-9fdf-9fdd956b4764.webp?v=1714838057"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d07226b72befc14f47c70e5d31c9459ad7a50ba_24f270fe-ac66-4bab-9fdf-9fdd956b4764.webp?v=1714838057","width":2000},{"alt":null,"id":23885216153699,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3926b4d76841e6a65d2257ae78aa4e9914fff60f_862c4d9f-052b-4699-9937-8fc85bb2f26e.webp?v=1714838059"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3926b4d76841e6a65d2257ae78aa4e9914fff60f_862c4d9f-052b-4699-9937-8fc85bb2f26e.webp?v=1714838059","width":2000},{"alt":null,"id":23885216677987,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b0ddd995416b2f41760f7e87d6e63e8d84229aa9_6c7f44f9-3de1-401f-a08e-2d2726343851.webp?v=1714838061"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b0ddd995416b2f41760f7e87d6e63e8d84229aa9_6c7f44f9-3de1-401f-a08e-2d2726343851.webp?v=1714838061","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41896544731235,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-SB02","requires_shipping":true,"taxable":true,"featured_image":{"id":31479963844707,"product_id":7411251970147,"position":6,"created_at":"2024-05-04T23:54:12+08:00","updated_at":"2024-05-04T23:54:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7141ae60593d6cacb1e414e2e699abdbf0c9b6a_dbd9ba75-4197-441a-9798-8153d4ee6ed8.webp?v=1714838052","variant_ids":[41896544731235]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Batman - 漫畫風格 - 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":"MPB0126124-SB02","featured_media":{"alt":null,"id":23885214482531,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7141ae60593d6cacb1e414e2e699abdbf0c9b6a_dbd9ba75-4197-441a-9798-8153d4ee6ed8.webp?v=1714838052"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41896544731235,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-SB02","requires_shipping":true,"taxable":true,"featured_image":{"id":31479963844707,"product_id":7411251970147,"position":6,"created_at":"2024-05-04T23:54:12+08:00","updated_at":"2024-05-04T23:54:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7141ae60593d6cacb1e414e2e699abdbf0c9b6a_dbd9ba75-4197-441a-9798-8153d4ee6ed8.webp?v=1714838052","variant_ids":[41896544731235]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Batman - 漫畫風格 - 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":"MPB0126124-SB02","featured_media":{"alt":null,"id":23885214482531,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7141ae60593d6cacb1e414e2e699abdbf0c9b6a_dbd9ba75-4197-441a-9798-8153d4ee6ed8.webp?v=1714838052"}},"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: "停產" }