$product = {"id":7407843934307,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 小圖款-凱羅忍","handle":"iphone-14-plus-mod-nx-printable-pc06","description":null,"published_at":"2024-06-11T16:24:25+08:00","created_at":"2024-05-03T11:01:05+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 14 Plus","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":41879537385571,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PC06","requires_shipping":true,"taxable":true,"featured_image":{"id":31470508965987,"product_id":7407843934307,"position":5,"created_at":"2024-05-03T11:01:18+08:00","updated_at":"2024-05-03T11:01:18+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5535f66655b97bcc80a1b6b4347e663dcb5c0ee8_96cc51b0-2816-4abb-b0fe-07d1bc7d19c6.webp?v=1714705278","variant_ids":[41879537385571]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0126124-PC06","featured_media":{"alt":null,"id":23875412721763,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5535f66655b97bcc80a1b6b4347e663dcb5c0ee8_96cc51b0-2816-4abb-b0fe-07d1bc7d19c6.webp?v=1714705278"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/219aa937190c134f761c45d93136d0beab4e1f0e_942c4c25-7872-4e13-aaf7-9af96b685171.webp?v=1714705267","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e01364b4f6ddcaafabfd685681d1ae3b3491f04d_138ffb52-3bfc-4531-b72b-13fb168e44f8.webp?v=1714705270","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff60211a6fdf15439e335345cc70875725f2037d_b8c7c90d-7415-4090-99c9-64beb6f3f606.webp?v=1714705272","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5253787d98a3d596672c828ae0b91280a4ef9386_3554676b-2237-439c-bb76-f87135314673.webp?v=1714705275","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5535f66655b97bcc80a1b6b4347e663dcb5c0ee8_96cc51b0-2816-4abb-b0fe-07d1bc7d19c6.webp?v=1714705278","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc3a5a7a765e7d3f6a7862d541741178df234c79_e248865b-bed6-425f-a1e0-1392a0357961.webp?v=1714705280","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/04211803e2cc49e2b731fe60378f24081a30a3b0_c1a039e1-6532-4c6e-9a37-7917ccb06b20.webp?v=1714705282","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c549b1e977628ecbe9a50b55cdf6d5a3be5893b_08a6ec5f-8a24-4d84-a670-2517b867f313.webp?v=1714705285","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/49af8795d6fd66258dd3f9aafd508d1d38104576_4551ab11-986e-4379-b7bb-e838c579505b.webp?v=1714705287","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aed69db2747bb38f95c03347bddbf15c9e845d1c_250bd75d-7153-45ef-92be-e1a2f8745b14.webp?v=1714705289"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/219aa937190c134f761c45d93136d0beab4e1f0e_942c4c25-7872-4e13-aaf7-9af96b685171.webp?v=1714705267","options":["color"],"media":[{"alt":null,"id":23875410788451,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/219aa937190c134f761c45d93136d0beab4e1f0e_942c4c25-7872-4e13-aaf7-9af96b685171.webp?v=1714705267"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/219aa937190c134f761c45d93136d0beab4e1f0e_942c4c25-7872-4e13-aaf7-9af96b685171.webp?v=1714705267","width":2000},{"alt":null,"id":23875411181667,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e01364b4f6ddcaafabfd685681d1ae3b3491f04d_138ffb52-3bfc-4531-b72b-13fb168e44f8.webp?v=1714705270"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e01364b4f6ddcaafabfd685681d1ae3b3491f04d_138ffb52-3bfc-4531-b72b-13fb168e44f8.webp?v=1714705270","width":2000},{"alt":null,"id":23875411771491,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff60211a6fdf15439e335345cc70875725f2037d_b8c7c90d-7415-4090-99c9-64beb6f3f606.webp?v=1714705272"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff60211a6fdf15439e335345cc70875725f2037d_b8c7c90d-7415-4090-99c9-64beb6f3f606.webp?v=1714705272","width":2000},{"alt":null,"id":23875412230243,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5253787d98a3d596672c828ae0b91280a4ef9386_3554676b-2237-439c-bb76-f87135314673.webp?v=1714705275"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5253787d98a3d596672c828ae0b91280a4ef9386_3554676b-2237-439c-bb76-f87135314673.webp?v=1714705275","width":2000},{"alt":null,"id":23875412721763,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5535f66655b97bcc80a1b6b4347e663dcb5c0ee8_96cc51b0-2816-4abb-b0fe-07d1bc7d19c6.webp?v=1714705278"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5535f66655b97bcc80a1b6b4347e663dcb5c0ee8_96cc51b0-2816-4abb-b0fe-07d1bc7d19c6.webp?v=1714705278","width":2000},{"alt":null,"id":23875413049443,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc3a5a7a765e7d3f6a7862d541741178df234c79_e248865b-bed6-425f-a1e0-1392a0357961.webp?v=1714705280"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc3a5a7a765e7d3f6a7862d541741178df234c79_e248865b-bed6-425f-a1e0-1392a0357961.webp?v=1714705280","width":2000},{"alt":null,"id":23875413508195,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/04211803e2cc49e2b731fe60378f24081a30a3b0_c1a039e1-6532-4c6e-9a37-7917ccb06b20.webp?v=1714705282"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/04211803e2cc49e2b731fe60378f24081a30a3b0_c1a039e1-6532-4c6e-9a37-7917ccb06b20.webp?v=1714705282","width":2000},{"alt":null,"id":23875413934179,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c549b1e977628ecbe9a50b55cdf6d5a3be5893b_08a6ec5f-8a24-4d84-a670-2517b867f313.webp?v=1714705285"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c549b1e977628ecbe9a50b55cdf6d5a3be5893b_08a6ec5f-8a24-4d84-a670-2517b867f313.webp?v=1714705285","width":2000},{"alt":null,"id":23875414392931,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/49af8795d6fd66258dd3f9aafd508d1d38104576_4551ab11-986e-4379-b7bb-e838c579505b.webp?v=1714705287"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/49af8795d6fd66258dd3f9aafd508d1d38104576_4551ab11-986e-4379-b7bb-e838c579505b.webp?v=1714705287","width":2000},{"alt":null,"id":23875414818915,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aed69db2747bb38f95c03347bddbf15c9e845d1c_250bd75d-7153-45ef-92be-e1a2f8745b14.webp?v=1714705289"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aed69db2747bb38f95c03347bddbf15c9e845d1c_250bd75d-7153-45ef-92be-e1a2f8745b14.webp?v=1714705289","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41879537385571,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PC06","requires_shipping":true,"taxable":true,"featured_image":{"id":31470508965987,"product_id":7407843934307,"position":5,"created_at":"2024-05-03T11:01:18+08:00","updated_at":"2024-05-03T11:01:18+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5535f66655b97bcc80a1b6b4347e663dcb5c0ee8_96cc51b0-2816-4abb-b0fe-07d1bc7d19c6.webp?v=1714705278","variant_ids":[41879537385571]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0126124-PC06","featured_media":{"alt":null,"id":23875412721763,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5535f66655b97bcc80a1b6b4347e663dcb5c0ee8_96cc51b0-2816-4abb-b0fe-07d1bc7d19c6.webp?v=1714705278"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41879537385571,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PC06","requires_shipping":true,"taxable":true,"featured_image":{"id":31470508965987,"product_id":7407843934307,"position":5,"created_at":"2024-05-03T11:01:18+08:00","updated_at":"2024-05-03T11:01:18+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5535f66655b97bcc80a1b6b4347e663dcb5c0ee8_96cc51b0-2816-4abb-b0fe-07d1bc7d19c6.webp?v=1714705278","variant_ids":[41879537385571]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0126124-PC06","featured_media":{"alt":null,"id":23875412721763,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5535f66655b97bcc80a1b6b4347e663dcb5c0ee8_96cc51b0-2816-4abb-b0fe-07d1bc7d19c6.webp?v=1714705278"}},"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: "停產" }