$product = {"id":7416354111587,"title":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-全白設計","handle":"iphone-8-mod-nx-printable-pb103","description":null,"published_at":"2024-06-11T16:56:45+08:00","created_at":"2024-05-06T14:40:38+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 8","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":41918827298915,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB103","requires_shipping":true,"taxable":true,"featured_image":{"id":31491921674339,"product_id":7416354111587,"position":6,"created_at":"2024-05-06T14:40:52+08:00","updated_at":"2024-05-06T14:40:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/795bda167b977bc960a9754eec8e990864dd44a0_3c236a40-55b4-443d-91e3-508d863d7c8b.webp?v=1714977652","variant_ids":[41918827298915]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0105424-PB103","featured_media":{"alt":null,"id":23897334743139,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/795bda167b977bc960a9754eec8e990864dd44a0_3c236a40-55b4-443d-91e3-508d863d7c8b.webp?v=1714977652"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f49fa627c9b107624991aa9111c22982e75e15b2_4b36da38-2f6a-46bc-9509-ff85f5afd25f.webp?v=1714977641","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf340009be016bce377c1b288ae128843a3a5fe9_7133ac0b-01d8-42be-9f80-a896a80a91ac.webp?v=1714977643","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9562874725ea217c984c9aa1b756741f0ace7a97_90e7941b-c0f9-4bba-8e07-c7a58d7206fe.webp?v=1714977645","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3071bee168f01a1471a491e4c743e5a691a0b43_7cb042a6-0a18-4a38-bfa7-e6cb423a6ad2.webp?v=1714977647","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c4fb88d9659696b3cf075b29319a3c05ea33da3_45070a24-1498-41cb-a6b4-fdcfd5cf297a.webp?v=1714977650","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/795bda167b977bc960a9754eec8e990864dd44a0_3c236a40-55b4-443d-91e3-508d863d7c8b.webp?v=1714977652","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5859003aa796f8c6fa4365c0e1e5b39e608b2d59_1b26e532-6370-45c3-8b32-b5586daca31b.webp?v=1714977655","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52c639bef7b3a709fd163a48b27e86a6047dbbb0_b377bdf4-34dc-4eb3-a534-f680f292a452.webp?v=1714977657","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea43261c94e6739cb220abf6d4586f52b7c0a2df_c7a39273-b621-4e00-a822-9467d4abe809.webp?v=1714977659","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd2987035b57f8386d69ea4082863e2501a5ffaa_f4947408-1396-4007-aa49-c34adff4a722.webp?v=1714977662"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f49fa627c9b107624991aa9111c22982e75e15b2_4b36da38-2f6a-46bc-9509-ff85f5afd25f.webp?v=1714977641","options":["color"],"media":[{"alt":null,"id":23897332613219,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f49fa627c9b107624991aa9111c22982e75e15b2_4b36da38-2f6a-46bc-9509-ff85f5afd25f.webp?v=1714977641"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f49fa627c9b107624991aa9111c22982e75e15b2_4b36da38-2f6a-46bc-9509-ff85f5afd25f.webp?v=1714977641","width":2000},{"alt":null,"id":23897333006435,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf340009be016bce377c1b288ae128843a3a5fe9_7133ac0b-01d8-42be-9f80-a896a80a91ac.webp?v=1714977643"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf340009be016bce377c1b288ae128843a3a5fe9_7133ac0b-01d8-42be-9f80-a896a80a91ac.webp?v=1714977643","width":2000},{"alt":null,"id":23897333432419,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9562874725ea217c984c9aa1b756741f0ace7a97_90e7941b-c0f9-4bba-8e07-c7a58d7206fe.webp?v=1714977645"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9562874725ea217c984c9aa1b756741f0ace7a97_90e7941b-c0f9-4bba-8e07-c7a58d7206fe.webp?v=1714977645","width":2000},{"alt":null,"id":23897333858403,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3071bee168f01a1471a491e4c743e5a691a0b43_7cb042a6-0a18-4a38-bfa7-e6cb423a6ad2.webp?v=1714977647"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3071bee168f01a1471a491e4c743e5a691a0b43_7cb042a6-0a18-4a38-bfa7-e6cb423a6ad2.webp?v=1714977647","width":2000},{"alt":null,"id":23897334349923,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c4fb88d9659696b3cf075b29319a3c05ea33da3_45070a24-1498-41cb-a6b4-fdcfd5cf297a.webp?v=1714977650"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c4fb88d9659696b3cf075b29319a3c05ea33da3_45070a24-1498-41cb-a6b4-fdcfd5cf297a.webp?v=1714977650","width":2000},{"alt":null,"id":23897334743139,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/795bda167b977bc960a9754eec8e990864dd44a0_3c236a40-55b4-443d-91e3-508d863d7c8b.webp?v=1714977652"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/795bda167b977bc960a9754eec8e990864dd44a0_3c236a40-55b4-443d-91e3-508d863d7c8b.webp?v=1714977652","width":2000},{"alt":null,"id":23897335136355,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5859003aa796f8c6fa4365c0e1e5b39e608b2d59_1b26e532-6370-45c3-8b32-b5586daca31b.webp?v=1714977655"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5859003aa796f8c6fa4365c0e1e5b39e608b2d59_1b26e532-6370-45c3-8b32-b5586daca31b.webp?v=1714977655","width":2000},{"alt":null,"id":23897335660643,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52c639bef7b3a709fd163a48b27e86a6047dbbb0_b377bdf4-34dc-4eb3-a534-f680f292a452.webp?v=1714977657"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52c639bef7b3a709fd163a48b27e86a6047dbbb0_b377bdf4-34dc-4eb3-a534-f680f292a452.webp?v=1714977657","width":2000},{"alt":null,"id":23897336119395,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea43261c94e6739cb220abf6d4586f52b7c0a2df_c7a39273-b621-4e00-a822-9467d4abe809.webp?v=1714977659"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea43261c94e6739cb220abf6d4586f52b7c0a2df_c7a39273-b621-4e00-a822-9467d4abe809.webp?v=1714977659","width":2000},{"alt":null,"id":23897336545379,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd2987035b57f8386d69ea4082863e2501a5ffaa_f4947408-1396-4007-aa49-c34adff4a722.webp?v=1714977662"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd2987035b57f8386d69ea4082863e2501a5ffaa_f4947408-1396-4007-aa49-c34adff4a722.webp?v=1714977662","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41918827298915,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB103","requires_shipping":true,"taxable":true,"featured_image":{"id":31491921674339,"product_id":7416354111587,"position":6,"created_at":"2024-05-06T14:40:52+08:00","updated_at":"2024-05-06T14:40:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/795bda167b977bc960a9754eec8e990864dd44a0_3c236a40-55b4-443d-91e3-508d863d7c8b.webp?v=1714977652","variant_ids":[41918827298915]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0105424-PB103","featured_media":{"alt":null,"id":23897334743139,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/795bda167b977bc960a9754eec8e990864dd44a0_3c236a40-55b4-443d-91e3-508d863d7c8b.webp?v=1714977652"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41918827298915,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB103","requires_shipping":true,"taxable":true,"featured_image":{"id":31491921674339,"product_id":7416354111587,"position":6,"created_at":"2024-05-06T14:40:52+08:00","updated_at":"2024-05-06T14:40:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/795bda167b977bc960a9754eec8e990864dd44a0_3c236a40-55b4-443d-91e3-508d863d7c8b.webp?v=1714977652","variant_ids":[41918827298915]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0105424-PB103","featured_media":{"alt":null,"id":23897334743139,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/795bda167b977bc960a9754eec8e990864dd44a0_3c236a40-55b4-443d-91e3-508d863d7c8b.webp?v=1714977652"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null var sellingStatus if ($bumper) { $(document).ready(function() { var productImg = $product.images[0] var bumperVariants = $bumper.variants; var bumperColors = new Object(); var currentVariant = ''; var productType = ''; bumperVariants.forEach(variant => { bumperColors[`${variant.title.split(' (')[0].toLowerCase()}`] = variant.featured_image.src; }); if (productType === 'mod-nx-backplate' || productType === 'mod-backplate') { mergeImages( [productImg, bumperColors[currentVariant]], { crossOrigin: 'anonymous' } ).then(mergedImg => { $('.merged-img').attr('src', mergedImg); }); } else { mergeImages( [bumperColors[currentVariant], productImg], { crossOrigin: 'anonymous' } ).then(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: "停產" }