$product = {"id":7414970253411,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 迪士尼-星際大戰 Star Wars - 星戰角色-漫畫系列","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-pb84","description":null,"published_at":"2024-06-11T17:54:28+08:00","created_at":"2024-05-05T19:57:58+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 pro max","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":41910472278115,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-PB84","requires_shipping":true,"taxable":true,"featured_image":{"id":31487808340067,"product_id":7414970253411,"position":5,"created_at":"2024-05-05T19:58:10+08:00","updated_at":"2024-05-05T19:58:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/737bb5abd1a285ef59f301714b959960fe0727d2_d8830fa0-6263-40d2-88b3-218bbb0c7930.webp?v=1714910290","variant_ids":[41910472278115]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 迪士尼-星際大戰 Star Wars - 星戰角色-漫畫系列 - 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":"MPB0118724-PB84","featured_media":{"alt":null,"id":23893152366691,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/737bb5abd1a285ef59f301714b959960fe0727d2_d8830fa0-6263-40d2-88b3-218bbb0c7930.webp?v=1714910290"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/19f87c2504960725b220673b3c883c6fd839a42a_8a54aa86-66b7-4f22-8284-d6e700af7f27.webp?v=1714910280","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1b77521acc399cc9cb0d5985fe75d5b2f9482f4_92315069-6839-4c68-a31d-a387828a4b3e.webp?v=1714910283","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2da06ac9f7aea649a02b1ccca52bd67efa1c28d2_d5b959c7-1d1b-46fc-a6eb-f4fc8ac263d4.webp?v=1714910285","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd626d75c881e39ba2ec93477ec560cb49a05194_a74ed3ea-ced6-4cdb-bbad-085ab28f377c.webp?v=1714910288","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/737bb5abd1a285ef59f301714b959960fe0727d2_d8830fa0-6263-40d2-88b3-218bbb0c7930.webp?v=1714910290","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/514ac12254ef2fbc6eeac84fdc2b5dd48cc9e1e1_a0bf63b7-9e6b-41a0-ae28-d90581f696ca.webp?v=1714910293","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8617c05c007ac46a80a0022e5d7eeef61957b00a_c1e10506-b018-4644-9fae-141818668190.webp?v=1714910295","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efebca209ae118004d236cb459c4ae3b9839414b_0a9ee7fd-6de3-4afa-9a72-2aa67f5b08db.webp?v=1714910298","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/325a0fb5a3cd73cb319428bcbe51978ee9f60c4c_88e0490c-b22f-4429-8019-d751d32085cd.webp?v=1714910300","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/30b138c423d2306793d2d907d7be682cf8df17e6_abfa74a3-d321-4398-8b22-b32a67501bce.webp?v=1714910302"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/19f87c2504960725b220673b3c883c6fd839a42a_8a54aa86-66b7-4f22-8284-d6e700af7f27.webp?v=1714910280","options":["color"],"media":[{"alt":null,"id":23893149745251,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/19f87c2504960725b220673b3c883c6fd839a42a_8a54aa86-66b7-4f22-8284-d6e700af7f27.webp?v=1714910280"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/19f87c2504960725b220673b3c883c6fd839a42a_8a54aa86-66b7-4f22-8284-d6e700af7f27.webp?v=1714910280","width":2000},{"alt":null,"id":23893150302307,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1b77521acc399cc9cb0d5985fe75d5b2f9482f4_92315069-6839-4c68-a31d-a387828a4b3e.webp?v=1714910283"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1b77521acc399cc9cb0d5985fe75d5b2f9482f4_92315069-6839-4c68-a31d-a387828a4b3e.webp?v=1714910283","width":2000},{"alt":null,"id":23893150957667,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2da06ac9f7aea649a02b1ccca52bd67efa1c28d2_d5b959c7-1d1b-46fc-a6eb-f4fc8ac263d4.webp?v=1714910285"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2da06ac9f7aea649a02b1ccca52bd67efa1c28d2_d5b959c7-1d1b-46fc-a6eb-f4fc8ac263d4.webp?v=1714910285","width":2000},{"alt":null,"id":23893151547491,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd626d75c881e39ba2ec93477ec560cb49a05194_a74ed3ea-ced6-4cdb-bbad-085ab28f377c.webp?v=1714910288"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd626d75c881e39ba2ec93477ec560cb49a05194_a74ed3ea-ced6-4cdb-bbad-085ab28f377c.webp?v=1714910288","width":2000},{"alt":null,"id":23893152366691,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/737bb5abd1a285ef59f301714b959960fe0727d2_d8830fa0-6263-40d2-88b3-218bbb0c7930.webp?v=1714910290"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/737bb5abd1a285ef59f301714b959960fe0727d2_d8830fa0-6263-40d2-88b3-218bbb0c7930.webp?v=1714910290","width":2000},{"alt":null,"id":23893152890979,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/514ac12254ef2fbc6eeac84fdc2b5dd48cc9e1e1_a0bf63b7-9e6b-41a0-ae28-d90581f696ca.webp?v=1714910293"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/514ac12254ef2fbc6eeac84fdc2b5dd48cc9e1e1_a0bf63b7-9e6b-41a0-ae28-d90581f696ca.webp?v=1714910293","width":2000},{"alt":null,"id":23893153874019,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8617c05c007ac46a80a0022e5d7eeef61957b00a_c1e10506-b018-4644-9fae-141818668190.webp?v=1714910295"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8617c05c007ac46a80a0022e5d7eeef61957b00a_c1e10506-b018-4644-9fae-141818668190.webp?v=1714910295","width":2000},{"alt":null,"id":23893154562147,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efebca209ae118004d236cb459c4ae3b9839414b_0a9ee7fd-6de3-4afa-9a72-2aa67f5b08db.webp?v=1714910298"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efebca209ae118004d236cb459c4ae3b9839414b_0a9ee7fd-6de3-4afa-9a72-2aa67f5b08db.webp?v=1714910298","width":2000},{"alt":null,"id":23893154955363,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/325a0fb5a3cd73cb319428bcbe51978ee9f60c4c_88e0490c-b22f-4429-8019-d751d32085cd.webp?v=1714910300"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/325a0fb5a3cd73cb319428bcbe51978ee9f60c4c_88e0490c-b22f-4429-8019-d751d32085cd.webp?v=1714910300","width":2000},{"alt":null,"id":23893155479651,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/30b138c423d2306793d2d907d7be682cf8df17e6_abfa74a3-d321-4398-8b22-b32a67501bce.webp?v=1714910302"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/30b138c423d2306793d2d907d7be682cf8df17e6_abfa74a3-d321-4398-8b22-b32a67501bce.webp?v=1714910302","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910472278115,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-PB84","requires_shipping":true,"taxable":true,"featured_image":{"id":31487808340067,"product_id":7414970253411,"position":5,"created_at":"2024-05-05T19:58:10+08:00","updated_at":"2024-05-05T19:58:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/737bb5abd1a285ef59f301714b959960fe0727d2_d8830fa0-6263-40d2-88b3-218bbb0c7930.webp?v=1714910290","variant_ids":[41910472278115]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 迪士尼-星際大戰 Star Wars - 星戰角色-漫畫系列 - 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":"MPB0118724-PB84","featured_media":{"alt":null,"id":23893152366691,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/737bb5abd1a285ef59f301714b959960fe0727d2_d8830fa0-6263-40d2-88b3-218bbb0c7930.webp?v=1714910290"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910472278115,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-PB84","requires_shipping":true,"taxable":true,"featured_image":{"id":31487808340067,"product_id":7414970253411,"position":5,"created_at":"2024-05-05T19:58:10+08:00","updated_at":"2024-05-05T19:58:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/737bb5abd1a285ef59f301714b959960fe0727d2_d8830fa0-6263-40d2-88b3-218bbb0c7930.webp?v=1714910290","variant_ids":[41910472278115]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 迪士尼-星際大戰 Star Wars - 星戰角色-漫畫系列 - 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":"MPB0118724-PB84","featured_media":{"alt":null,"id":23893152366691,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/737bb5abd1a285ef59f301714b959960fe0727d2_d8830fa0-6263-40d2-88b3-218bbb0c7930.webp?v=1714910290"}},"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: "停產" }