$product = {"id":7416001429603,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【獨家設計款】 - 春夏犬の時裝週","handle":"iphone-xs-max-mod-nx-printable-b071","description":null,"published_at":"2024-06-11T16:50:06+08:00","created_at":"2024-05-06T12:40:08+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"MOD NX 客製化","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","device-iPhone XS Max","discountable-item","member","merge","mod-nx-printable","new-modnx-sku","reseller","reseller-modnx-original-design","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":41916387393635,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-B071","requires_shipping":true,"taxable":true,"featured_image":{"id":31490958360675,"product_id":7416001429603,"position":7,"created_at":"2024-05-06T12:40:25+08:00","updated_at":"2024-05-06T12:40:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3633e02d1f11ea8d4e9477aa385e48eb573164b8_46afaa3c-9420-416e-89fa-ddbfc28b475d.webp?v=1714970425","variant_ids":[41916387393635]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【獨家設計款】 - 春夏犬の時裝週 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108624-B071","featured_media":{"alt":null,"id":23896365498467,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3633e02d1f11ea8d4e9477aa385e48eb573164b8_46afaa3c-9420-416e-89fa-ddbfc28b475d.webp?v=1714970425"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ccd0583514fcc86be9212f37b4a782a2d3096e5d_a37576ee-feb2-46d4-b9b5-0ff5a1135e31.webp?v=1714970411","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79b22f8ecaebe2d0f2f8722065d2856caf923a5a_6c5d3c0b-5849-40fb-b7a1-3d7ae0e58f2e.webp?v=1714970413","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbb0857d90659ac78c445dd66417ad85c2812fe4_7856e97f-77e0-41ee-9597-bed37e8e3d08.webp?v=1714970416","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c51660d62624cf67296494960528a3e797849567_07815fbf-4a23-479e-ba1b-9d94a630ed34.webp?v=1714970418","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/47dde8960ba7fa65e73c0bbcb7d950475e70500d_3abcf2b4-e0de-4aa4-8048-ce250370a460.webp?v=1714970420","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/091db211c099eef3be5c3f648166f4cf3c978344_b36ac898-5310-4487-8dcc-1e56e1a23483.webp?v=1714970423","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3633e02d1f11ea8d4e9477aa385e48eb573164b8_46afaa3c-9420-416e-89fa-ddbfc28b475d.webp?v=1714970425","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b9f7b37acccb0710de70a2a97c061584e37f407_d8c6a694-f869-4fae-b8d4-d1d800478376.webp?v=1714970428","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fdd68ae30b31f3b44ef09581b559218925f22060_6db26cd2-fc62-414f-90ee-098fc5067c9c.webp?v=1714970430","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/239f59e615c1b4c4d166dcc558bd3d6de7fd7425_bf153bf8-f9a7-4a60-976f-e2065b5449a9.webp?v=1714970433"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ccd0583514fcc86be9212f37b4a782a2d3096e5d_a37576ee-feb2-46d4-b9b5-0ff5a1135e31.webp?v=1714970411","options":["color"],"media":[{"alt":null,"id":23896362025059,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ccd0583514fcc86be9212f37b4a782a2d3096e5d_a37576ee-feb2-46d4-b9b5-0ff5a1135e31.webp?v=1714970411"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ccd0583514fcc86be9212f37b4a782a2d3096e5d_a37576ee-feb2-46d4-b9b5-0ff5a1135e31.webp?v=1714970411","width":2000},{"alt":null,"id":23896362516579,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79b22f8ecaebe2d0f2f8722065d2856caf923a5a_6c5d3c0b-5849-40fb-b7a1-3d7ae0e58f2e.webp?v=1714970413"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79b22f8ecaebe2d0f2f8722065d2856caf923a5a_6c5d3c0b-5849-40fb-b7a1-3d7ae0e58f2e.webp?v=1714970413","width":2000},{"alt":null,"id":23896363040867,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbb0857d90659ac78c445dd66417ad85c2812fe4_7856e97f-77e0-41ee-9597-bed37e8e3d08.webp?v=1714970416"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbb0857d90659ac78c445dd66417ad85c2812fe4_7856e97f-77e0-41ee-9597-bed37e8e3d08.webp?v=1714970416","width":2000},{"alt":null,"id":23896363466851,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c51660d62624cf67296494960528a3e797849567_07815fbf-4a23-479e-ba1b-9d94a630ed34.webp?v=1714970418"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c51660d62624cf67296494960528a3e797849567_07815fbf-4a23-479e-ba1b-9d94a630ed34.webp?v=1714970418","width":2000},{"alt":null,"id":23896363860067,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/47dde8960ba7fa65e73c0bbcb7d950475e70500d_3abcf2b4-e0de-4aa4-8048-ce250370a460.webp?v=1714970420"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/47dde8960ba7fa65e73c0bbcb7d950475e70500d_3abcf2b4-e0de-4aa4-8048-ce250370a460.webp?v=1714970420","width":2000},{"alt":null,"id":23896364286051,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/091db211c099eef3be5c3f648166f4cf3c978344_b36ac898-5310-4487-8dcc-1e56e1a23483.webp?v=1714970423"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/091db211c099eef3be5c3f648166f4cf3c978344_b36ac898-5310-4487-8dcc-1e56e1a23483.webp?v=1714970423","width":2000},{"alt":null,"id":23896365498467,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3633e02d1f11ea8d4e9477aa385e48eb573164b8_46afaa3c-9420-416e-89fa-ddbfc28b475d.webp?v=1714970425"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3633e02d1f11ea8d4e9477aa385e48eb573164b8_46afaa3c-9420-416e-89fa-ddbfc28b475d.webp?v=1714970425","width":2000},{"alt":null,"id":23896366022755,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b9f7b37acccb0710de70a2a97c061584e37f407_d8c6a694-f869-4fae-b8d4-d1d800478376.webp?v=1714970428"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b9f7b37acccb0710de70a2a97c061584e37f407_d8c6a694-f869-4fae-b8d4-d1d800478376.webp?v=1714970428","width":2000},{"alt":null,"id":23896366481507,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fdd68ae30b31f3b44ef09581b559218925f22060_6db26cd2-fc62-414f-90ee-098fc5067c9c.webp?v=1714970430"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fdd68ae30b31f3b44ef09581b559218925f22060_6db26cd2-fc62-414f-90ee-098fc5067c9c.webp?v=1714970430","width":2000},{"alt":null,"id":23896366940259,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/239f59e615c1b4c4d166dcc558bd3d6de7fd7425_bf153bf8-f9a7-4a60-976f-e2065b5449a9.webp?v=1714970433"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/239f59e615c1b4c4d166dcc558bd3d6de7fd7425_bf153bf8-f9a7-4a60-976f-e2065b5449a9.webp?v=1714970433","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41916387393635,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-B071","requires_shipping":true,"taxable":true,"featured_image":{"id":31490958360675,"product_id":7416001429603,"position":7,"created_at":"2024-05-06T12:40:25+08:00","updated_at":"2024-05-06T12:40:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3633e02d1f11ea8d4e9477aa385e48eb573164b8_46afaa3c-9420-416e-89fa-ddbfc28b475d.webp?v=1714970425","variant_ids":[41916387393635]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【獨家設計款】 - 春夏犬の時裝週 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108624-B071","featured_media":{"alt":null,"id":23896365498467,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3633e02d1f11ea8d4e9477aa385e48eb573164b8_46afaa3c-9420-416e-89fa-ddbfc28b475d.webp?v=1714970425"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41916387393635,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-B071","requires_shipping":true,"taxable":true,"featured_image":{"id":31490958360675,"product_id":7416001429603,"position":7,"created_at":"2024-05-06T12:40:25+08:00","updated_at":"2024-05-06T12:40:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3633e02d1f11ea8d4e9477aa385e48eb573164b8_46afaa3c-9420-416e-89fa-ddbfc28b475d.webp?v=1714970425","variant_ids":[41916387393635]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【獨家設計款】 - 春夏犬の時裝週 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108624-B071","featured_media":{"alt":null,"id":23896365498467,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3633e02d1f11ea8d4e9477aa385e48eb573164b8_46afaa3c-9420-416e-89fa-ddbfc28b475d.webp?v=1714970425"}},"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: "停產" }