$product = {"id":7407867265123,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-剪紙系列","handle":"iphone-14-plus-mod-nx-printable-pb56","description":null,"published_at":"2024-06-11T16:25:03+08:00","created_at":"2024-05-03T11:05: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 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":41879842193507,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB56","requires_shipping":true,"taxable":true,"featured_image":{"id":31470572830819,"product_id":7407867265123,"position":1,"created_at":"2024-05-03T11:05:49+08:00","updated_at":"2024-05-03T11:05:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5536815129d6cefe8cc4ebe321a3927bd041728f_95429b16-23ea-4044-bad3-c68c3a83bddc.webp?v=1714705549","variant_ids":[41879842193507]},"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-PB56","featured_media":{"alt":null,"id":23875476684899,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5536815129d6cefe8cc4ebe321a3927bd041728f_95429b16-23ea-4044-bad3-c68c3a83bddc.webp?v=1714705549"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5536815129d6cefe8cc4ebe321a3927bd041728f_95429b16-23ea-4044-bad3-c68c3a83bddc.webp?v=1714705549","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a54e5d4f08d6afd475bd2f2487e8883c520bb5d_184f5e12-3f92-4d18-b1f5-d217710eb9d1.webp?v=1714705551","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a479038ebbdd256e4189cfaeb191d517c6053dc_ee203c91-f40d-40fe-af48-336c5d69f04e.webp?v=1714705554","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c646b03c381f822953dc446423e371d1048dead6_d44b413b-981c-4eb0-9cd8-5e320f4ebcc6.webp?v=1714705556","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6ce46652967865d6a9acc1f16b787fa31263f34_6c8aeb57-e73f-4b78-8be1-05fa71c32e3c.webp?v=1714705559","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34b3c43c05b40a65680b84c36c281f700669b702_064e0d5f-7c9d-4a4f-8f5a-3828d236931f.webp?v=1714705561","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b97009099d24fee4cd9777fd0b81d60b2f67c6b_b988af6e-38fc-4e1d-b12d-7490116f9fef.webp?v=1714705563","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a1365609193869bfcc4dd4282b9892dd950c276d_dfdc8638-e609-462a-9dd2-501af78f8fa6.webp?v=1714705566","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aeb3891356ecdc83f96bf733140034c3769e1264_515b183e-ac3e-47bc-830d-d120bd660287.webp?v=1714705568","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a812725b1c3ca201cbd6b2ca457b6cf732e956a_454f73f7-10b4-443b-a5b7-d6917c4654c8.webp?v=1714705571"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5536815129d6cefe8cc4ebe321a3927bd041728f_95429b16-23ea-4044-bad3-c68c3a83bddc.webp?v=1714705549","options":["color"],"media":[{"alt":null,"id":23875476684899,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5536815129d6cefe8cc4ebe321a3927bd041728f_95429b16-23ea-4044-bad3-c68c3a83bddc.webp?v=1714705549"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5536815129d6cefe8cc4ebe321a3927bd041728f_95429b16-23ea-4044-bad3-c68c3a83bddc.webp?v=1714705549","width":2000},{"alt":null,"id":23875477307491,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a54e5d4f08d6afd475bd2f2487e8883c520bb5d_184f5e12-3f92-4d18-b1f5-d217710eb9d1.webp?v=1714705551"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a54e5d4f08d6afd475bd2f2487e8883c520bb5d_184f5e12-3f92-4d18-b1f5-d217710eb9d1.webp?v=1714705551","width":2000},{"alt":null,"id":23875477733475,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a479038ebbdd256e4189cfaeb191d517c6053dc_ee203c91-f40d-40fe-af48-336c5d69f04e.webp?v=1714705554"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a479038ebbdd256e4189cfaeb191d517c6053dc_ee203c91-f40d-40fe-af48-336c5d69f04e.webp?v=1714705554","width":2000},{"alt":null,"id":23875478159459,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c646b03c381f822953dc446423e371d1048dead6_d44b413b-981c-4eb0-9cd8-5e320f4ebcc6.webp?v=1714705556"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c646b03c381f822953dc446423e371d1048dead6_d44b413b-981c-4eb0-9cd8-5e320f4ebcc6.webp?v=1714705556","width":2000},{"alt":null,"id":23875478552675,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6ce46652967865d6a9acc1f16b787fa31263f34_6c8aeb57-e73f-4b78-8be1-05fa71c32e3c.webp?v=1714705559"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6ce46652967865d6a9acc1f16b787fa31263f34_6c8aeb57-e73f-4b78-8be1-05fa71c32e3c.webp?v=1714705559","width":2000},{"alt":null,"id":23875478913123,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34b3c43c05b40a65680b84c36c281f700669b702_064e0d5f-7c9d-4a4f-8f5a-3828d236931f.webp?v=1714705561"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34b3c43c05b40a65680b84c36c281f700669b702_064e0d5f-7c9d-4a4f-8f5a-3828d236931f.webp?v=1714705561","width":2000},{"alt":null,"id":23875479306339,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b97009099d24fee4cd9777fd0b81d60b2f67c6b_b988af6e-38fc-4e1d-b12d-7490116f9fef.webp?v=1714705563"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b97009099d24fee4cd9777fd0b81d60b2f67c6b_b988af6e-38fc-4e1d-b12d-7490116f9fef.webp?v=1714705563","width":2000},{"alt":null,"id":23875479666787,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a1365609193869bfcc4dd4282b9892dd950c276d_dfdc8638-e609-462a-9dd2-501af78f8fa6.webp?v=1714705566"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a1365609193869bfcc4dd4282b9892dd950c276d_dfdc8638-e609-462a-9dd2-501af78f8fa6.webp?v=1714705566","width":2000},{"alt":null,"id":23875480125539,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aeb3891356ecdc83f96bf733140034c3769e1264_515b183e-ac3e-47bc-830d-d120bd660287.webp?v=1714705568"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aeb3891356ecdc83f96bf733140034c3769e1264_515b183e-ac3e-47bc-830d-d120bd660287.webp?v=1714705568","width":2000},{"alt":null,"id":23875480485987,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a812725b1c3ca201cbd6b2ca457b6cf732e956a_454f73f7-10b4-443b-a5b7-d6917c4654c8.webp?v=1714705571"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a812725b1c3ca201cbd6b2ca457b6cf732e956a_454f73f7-10b4-443b-a5b7-d6917c4654c8.webp?v=1714705571","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41879842193507,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB56","requires_shipping":true,"taxable":true,"featured_image":{"id":31470572830819,"product_id":7407867265123,"position":1,"created_at":"2024-05-03T11:05:49+08:00","updated_at":"2024-05-03T11:05:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5536815129d6cefe8cc4ebe321a3927bd041728f_95429b16-23ea-4044-bad3-c68c3a83bddc.webp?v=1714705549","variant_ids":[41879842193507]},"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-PB56","featured_media":{"alt":null,"id":23875476684899,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5536815129d6cefe8cc4ebe321a3927bd041728f_95429b16-23ea-4044-bad3-c68c3a83bddc.webp?v=1714705549"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41879842193507,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB56","requires_shipping":true,"taxable":true,"featured_image":{"id":31470572830819,"product_id":7407867265123,"position":1,"created_at":"2024-05-03T11:05:49+08:00","updated_at":"2024-05-03T11:05:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5536815129d6cefe8cc4ebe321a3927bd041728f_95429b16-23ea-4044-bad3-c68c3a83bddc.webp?v=1714705549","variant_ids":[41879842193507]},"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-PB56","featured_media":{"alt":null,"id":23875476684899,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5536815129d6cefe8cc4ebe321a3927bd041728f_95429b16-23ea-4044-bad3-c68c3a83bddc.webp?v=1714705549"}},"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: "停產" }