$product = {"id":7408515154019,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 達斯魔-星際大戰Logo","handle":"iphone-12-pro-max-mod-nx-printable-pb100","description":null,"published_at":"2024-06-11T16:39:24+08:00","created_at":"2024-05-03T15:41:46+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 12 pro max","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-star-wars","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":41886358667363,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB100","requires_shipping":true,"taxable":true,"featured_image":{"id":31472474620003,"product_id":7408515154019,"position":2,"created_at":"2024-05-03T15:41:52+08:00","updated_at":"2024-05-03T15:41:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e63fa62ef4d270c3683410d5d9dce4d831ee813_3ed02d58-b544-4892-ad81-b337cd1c1e22.webp?v=1714722112","variant_ids":[41886358667363]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 達斯魔-星際大戰Logo - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118724-PB100","featured_media":{"alt":null,"id":23877391876195,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e63fa62ef4d270c3683410d5d9dce4d831ee813_3ed02d58-b544-4892-ad81-b337cd1c1e22.webp?v=1714722112"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b9f7c58181b70acf126bba3bea45ce4520c31d8_9f73e170-7495-4158-98a4-fb60cbb6eca7.webp?v=1714722110","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e63fa62ef4d270c3683410d5d9dce4d831ee813_3ed02d58-b544-4892-ad81-b337cd1c1e22.webp?v=1714722112","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf54904fda380b262e1f53fa82fe2abd5f9cb39c_31ccac2b-83c3-45c7-98e5-0ed763ecbdc9.webp?v=1714722114","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf0ff33a36908a6234cb98c751ca7095ae79aea9_b08111c6-b9f5-4aa4-be8d-2b6034411e44.webp?v=1714722117","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bc9d91f0a0b44d90b102d1bf86d6deeb6770bab_146665a4-48f2-4a42-ab6f-2cbf772f782c.webp?v=1714722119","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5cdcdb7a7448537cd94826382146d964bd0aa41_32278055-7e88-4829-8751-ff728f11039a.webp?v=1714722121","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/922fc506bf5aed14a23794f4ad72cd84e990503f_35a125af-3a9e-4c46-80af-2ed2b6ec30c0.webp?v=1714722123","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03ab6fcafadd8416e2d217e18a430cee7097283a_04e65032-ddc5-40d6-9caf-b92fc14e7f8b.webp?v=1714722126","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37a12fef572575b0d28bf30429d32d7a595acd6e_2d3ebfca-ac6e-4f1d-9424-a102ec982b78.webp?v=1714722128","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44046c255ce27680330e2fcb81c4cb7902740d3a_89748a44-27b1-42f9-8d13-a1b358084372.webp?v=1714722130"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b9f7c58181b70acf126bba3bea45ce4520c31d8_9f73e170-7495-4158-98a4-fb60cbb6eca7.webp?v=1714722110","options":["color"],"media":[{"alt":null,"id":23877391417443,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b9f7c58181b70acf126bba3bea45ce4520c31d8_9f73e170-7495-4158-98a4-fb60cbb6eca7.webp?v=1714722110"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b9f7c58181b70acf126bba3bea45ce4520c31d8_9f73e170-7495-4158-98a4-fb60cbb6eca7.webp?v=1714722110","width":2000},{"alt":null,"id":23877391876195,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e63fa62ef4d270c3683410d5d9dce4d831ee813_3ed02d58-b544-4892-ad81-b337cd1c1e22.webp?v=1714722112"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e63fa62ef4d270c3683410d5d9dce4d831ee813_3ed02d58-b544-4892-ad81-b337cd1c1e22.webp?v=1714722112","width":2000},{"alt":null,"id":23877392466019,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf54904fda380b262e1f53fa82fe2abd5f9cb39c_31ccac2b-83c3-45c7-98e5-0ed763ecbdc9.webp?v=1714722114"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf54904fda380b262e1f53fa82fe2abd5f9cb39c_31ccac2b-83c3-45c7-98e5-0ed763ecbdc9.webp?v=1714722114","width":2000},{"alt":null,"id":23877393023075,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf0ff33a36908a6234cb98c751ca7095ae79aea9_b08111c6-b9f5-4aa4-be8d-2b6034411e44.webp?v=1714722117"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf0ff33a36908a6234cb98c751ca7095ae79aea9_b08111c6-b9f5-4aa4-be8d-2b6034411e44.webp?v=1714722117","width":2000},{"alt":null,"id":23877393350755,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bc9d91f0a0b44d90b102d1bf86d6deeb6770bab_146665a4-48f2-4a42-ab6f-2cbf772f782c.webp?v=1714722119"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bc9d91f0a0b44d90b102d1bf86d6deeb6770bab_146665a4-48f2-4a42-ab6f-2cbf772f782c.webp?v=1714722119","width":2000},{"alt":null,"id":23877393973347,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5cdcdb7a7448537cd94826382146d964bd0aa41_32278055-7e88-4829-8751-ff728f11039a.webp?v=1714722121"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5cdcdb7a7448537cd94826382146d964bd0aa41_32278055-7e88-4829-8751-ff728f11039a.webp?v=1714722121","width":2000},{"alt":null,"id":23877394399331,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/922fc506bf5aed14a23794f4ad72cd84e990503f_35a125af-3a9e-4c46-80af-2ed2b6ec30c0.webp?v=1714722123"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/922fc506bf5aed14a23794f4ad72cd84e990503f_35a125af-3a9e-4c46-80af-2ed2b6ec30c0.webp?v=1714722123","width":2000},{"alt":null,"id":23877394759779,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03ab6fcafadd8416e2d217e18a430cee7097283a_04e65032-ddc5-40d6-9caf-b92fc14e7f8b.webp?v=1714722126"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03ab6fcafadd8416e2d217e18a430cee7097283a_04e65032-ddc5-40d6-9caf-b92fc14e7f8b.webp?v=1714722126","width":2000},{"alt":null,"id":23877395316835,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37a12fef572575b0d28bf30429d32d7a595acd6e_2d3ebfca-ac6e-4f1d-9424-a102ec982b78.webp?v=1714722128"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37a12fef572575b0d28bf30429d32d7a595acd6e_2d3ebfca-ac6e-4f1d-9424-a102ec982b78.webp?v=1714722128","width":2000},{"alt":null,"id":23877395906659,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44046c255ce27680330e2fcb81c4cb7902740d3a_89748a44-27b1-42f9-8d13-a1b358084372.webp?v=1714722130"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44046c255ce27680330e2fcb81c4cb7902740d3a_89748a44-27b1-42f9-8d13-a1b358084372.webp?v=1714722130","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41886358667363,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB100","requires_shipping":true,"taxable":true,"featured_image":{"id":31472474620003,"product_id":7408515154019,"position":2,"created_at":"2024-05-03T15:41:52+08:00","updated_at":"2024-05-03T15:41:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e63fa62ef4d270c3683410d5d9dce4d831ee813_3ed02d58-b544-4892-ad81-b337cd1c1e22.webp?v=1714722112","variant_ids":[41886358667363]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 達斯魔-星際大戰Logo - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118724-PB100","featured_media":{"alt":null,"id":23877391876195,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e63fa62ef4d270c3683410d5d9dce4d831ee813_3ed02d58-b544-4892-ad81-b337cd1c1e22.webp?v=1714722112"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41886358667363,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB100","requires_shipping":true,"taxable":true,"featured_image":{"id":31472474620003,"product_id":7408515154019,"position":2,"created_at":"2024-05-03T15:41:52+08:00","updated_at":"2024-05-03T15:41:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e63fa62ef4d270c3683410d5d9dce4d831ee813_3ed02d58-b544-4892-ad81-b337cd1c1e22.webp?v=1714722112","variant_ids":[41886358667363]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 達斯魔-星際大戰Logo - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118724-PB100","featured_media":{"alt":null,"id":23877391876195,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e63fa62ef4d270c3683410d5d9dce4d831ee813_3ed02d58-b544-4892-ad81-b337cd1c1e22.webp?v=1714722112"}},"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: "停產" }