$product = {"id":7408515022947,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 眾紅風暴兵","handle":"iphone-12-mini-mod-nx-printable-pc02","description":null,"published_at":"2024-06-11T16:39:24+08:00","created_at":"2024-05-03T15:41:45+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 mini","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":41886358470755,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PC02","requires_shipping":true,"taxable":true,"featured_image":{"id":31472475865187,"product_id":7408515022947,"position":5,"created_at":"2024-05-03T15:41:57+08:00","updated_at":"2024-05-03T15:41:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c22ae5fe066d7941893f3c3616108523aadb201_5afd85d0-0299-4189-a372-4bb871c614ea.webp?v=1714722117","variant_ids":[41886358470755]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 眾紅風暴兵 - 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":"NPB0118424-PC02","featured_media":{"alt":null,"id":23877393088611,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c22ae5fe066d7941893f3c3616108523aadb201_5afd85d0-0299-4189-a372-4bb871c614ea.webp?v=1714722117"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a1919294c482674b4b1dad0c2f9d335a6612b13_937256d4-7f85-452d-9bb5-f88e8ffc5177.webp?v=1714722108","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db15929f0ceb21e6c1744dccd27303d5d269556e_a2e53070-3fa2-495b-ba4c-bb83de76748c.webp?v=1714722110","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/456a5f474d367e77fc13742ee2fe1f990e3ee507_2cb1509e-bbbf-4414-a36d-9a63b6ef990d.webp?v=1714722112","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a2d05c301938e975f989bdeceb339400aaf170c_a8f1dbdc-1122-42ee-8715-9ba71b776494.webp?v=1714722114","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c22ae5fe066d7941893f3c3616108523aadb201_5afd85d0-0299-4189-a372-4bb871c614ea.webp?v=1714722117","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/503df26d195bed5143fc6e619a9183900d4df3fe_8f2f138f-fc2e-43cc-8ce8-7826d6ce9a9f.webp?v=1714722119","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d1c4c72e91fc346bd6b5a98be0c8574c7b691d6_53991e98-05bf-4387-b34e-b7a802d35d0f.webp?v=1714722121","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c473ac17f003d5af4000fced1b4d7ff6c579513_9e5b8a22-86da-4a85-bbeb-4fff706972cb.webp?v=1714722123","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/701c60b3720904c8cfea45cb0ac259f99ba64b88_7d0b44e9-69d3-409a-bd4b-4fee01965f73.webp?v=1714722126","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0834490cd3983642fbd67de55fb334a231315e8_a7485c61-78d7-4fd7-a757-bcebf55e9bea.webp?v=1714722128","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dae8feeec41425b0a154dc64e0ae6b7e058aaba3_bc94a51b-ca60-4155-a53b-b4606840c886.webp?v=1714722130"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a1919294c482674b4b1dad0c2f9d335a6612b13_937256d4-7f85-452d-9bb5-f88e8ffc5177.webp?v=1714722108","options":["color"],"media":[{"alt":null,"id":23877390991459,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a1919294c482674b4b1dad0c2f9d335a6612b13_937256d4-7f85-452d-9bb5-f88e8ffc5177.webp?v=1714722108"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a1919294c482674b4b1dad0c2f9d335a6612b13_937256d4-7f85-452d-9bb5-f88e8ffc5177.webp?v=1714722108","width":2000},{"alt":null,"id":23877391450211,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db15929f0ceb21e6c1744dccd27303d5d269556e_a2e53070-3fa2-495b-ba4c-bb83de76748c.webp?v=1714722110"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db15929f0ceb21e6c1744dccd27303d5d269556e_a2e53070-3fa2-495b-ba4c-bb83de76748c.webp?v=1714722110","width":2000},{"alt":null,"id":23877392072803,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/456a5f474d367e77fc13742ee2fe1f990e3ee507_2cb1509e-bbbf-4414-a36d-9a63b6ef990d.webp?v=1714722112"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/456a5f474d367e77fc13742ee2fe1f990e3ee507_2cb1509e-bbbf-4414-a36d-9a63b6ef990d.webp?v=1714722112","width":2000},{"alt":null,"id":23877392564323,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a2d05c301938e975f989bdeceb339400aaf170c_a8f1dbdc-1122-42ee-8715-9ba71b776494.webp?v=1714722114"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a2d05c301938e975f989bdeceb339400aaf170c_a8f1dbdc-1122-42ee-8715-9ba71b776494.webp?v=1714722114","width":2000},{"alt":null,"id":23877393088611,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c22ae5fe066d7941893f3c3616108523aadb201_5afd85d0-0299-4189-a372-4bb871c614ea.webp?v=1714722117"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c22ae5fe066d7941893f3c3616108523aadb201_5afd85d0-0299-4189-a372-4bb871c614ea.webp?v=1714722117","width":2000},{"alt":null,"id":23877393416291,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/503df26d195bed5143fc6e619a9183900d4df3fe_8f2f138f-fc2e-43cc-8ce8-7826d6ce9a9f.webp?v=1714722119"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/503df26d195bed5143fc6e619a9183900d4df3fe_8f2f138f-fc2e-43cc-8ce8-7826d6ce9a9f.webp?v=1714722119","width":2000},{"alt":null,"id":23877393907811,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d1c4c72e91fc346bd6b5a98be0c8574c7b691d6_53991e98-05bf-4387-b34e-b7a802d35d0f.webp?v=1714722121"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d1c4c72e91fc346bd6b5a98be0c8574c7b691d6_53991e98-05bf-4387-b34e-b7a802d35d0f.webp?v=1714722121","width":2000},{"alt":null,"id":23877394333795,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c473ac17f003d5af4000fced1b4d7ff6c579513_9e5b8a22-86da-4a85-bbeb-4fff706972cb.webp?v=1714722123"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c473ac17f003d5af4000fced1b4d7ff6c579513_9e5b8a22-86da-4a85-bbeb-4fff706972cb.webp?v=1714722123","width":2000},{"alt":null,"id":23877394792547,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/701c60b3720904c8cfea45cb0ac259f99ba64b88_7d0b44e9-69d3-409a-bd4b-4fee01965f73.webp?v=1714722126"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/701c60b3720904c8cfea45cb0ac259f99ba64b88_7d0b44e9-69d3-409a-bd4b-4fee01965f73.webp?v=1714722126","width":2000},{"alt":null,"id":23877395349603,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0834490cd3983642fbd67de55fb334a231315e8_a7485c61-78d7-4fd7-a757-bcebf55e9bea.webp?v=1714722128"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0834490cd3983642fbd67de55fb334a231315e8_a7485c61-78d7-4fd7-a757-bcebf55e9bea.webp?v=1714722128","width":2000},{"alt":null,"id":23877395873891,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dae8feeec41425b0a154dc64e0ae6b7e058aaba3_bc94a51b-ca60-4155-a53b-b4606840c886.webp?v=1714722130"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dae8feeec41425b0a154dc64e0ae6b7e058aaba3_bc94a51b-ca60-4155-a53b-b4606840c886.webp?v=1714722130","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41886358470755,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PC02","requires_shipping":true,"taxable":true,"featured_image":{"id":31472475865187,"product_id":7408515022947,"position":5,"created_at":"2024-05-03T15:41:57+08:00","updated_at":"2024-05-03T15:41:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c22ae5fe066d7941893f3c3616108523aadb201_5afd85d0-0299-4189-a372-4bb871c614ea.webp?v=1714722117","variant_ids":[41886358470755]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 眾紅風暴兵 - 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":"NPB0118424-PC02","featured_media":{"alt":null,"id":23877393088611,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c22ae5fe066d7941893f3c3616108523aadb201_5afd85d0-0299-4189-a372-4bb871c614ea.webp?v=1714722117"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41886358470755,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PC02","requires_shipping":true,"taxable":true,"featured_image":{"id":31472475865187,"product_id":7408515022947,"position":5,"created_at":"2024-05-03T15:41:57+08:00","updated_at":"2024-05-03T15:41:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c22ae5fe066d7941893f3c3616108523aadb201_5afd85d0-0299-4189-a372-4bb871c614ea.webp?v=1714722117","variant_ids":[41886358470755]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 眾紅風暴兵 - 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":"NPB0118424-PC02","featured_media":{"alt":null,"id":23877393088611,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c22ae5fe066d7941893f3c3616108523aadb201_5afd85d0-0299-4189-a372-4bb871c614ea.webp?v=1714722117"}},"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: "停產" }