$product = {"id":7369170255971,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Snoopy 史努比 - 愛心墨鏡","handle":"iphone-xs-max-mod-nx-printable-pl64","description":null,"published_at":"2024-06-11T16:13:43+08:00","created_at":"2024-04-23T15:37:23+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Snoopy 史努比","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-snoopy","device-iPhone XS Max","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-snoopy","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":41793241284707,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PL64","requires_shipping":true,"taxable":true,"featured_image":{"id":31386970128483,"product_id":7369170255971,"position":3,"created_at":"2024-04-23T15:37:33+08:00","updated_at":"2024-04-23T15:37:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d512e98928fe8fc7eccdff7a170b84131b3775a_40b699a0-bcbc-4230-9b26-8099b26817d1.webp?v=1713857853","variant_ids":[41793241284707]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Snoopy 史努比 - 愛心墨鏡 - 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":"NPB0108624-PL64","featured_media":{"alt":null,"id":23789208305763,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d512e98928fe8fc7eccdff7a170b84131b3775a_40b699a0-bcbc-4230-9b26-8099b26817d1.webp?v=1713857853"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e98154021e2787f04879fec4e287e65065834b1c_75f53ae6-a95f-467d-bfe9-53a7f4e44252.webp?v=1713857846","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d1a938602bcd648727bbc824d6948aa0b071245_52b50c36-c1fc-4223-b57b-33de375665e8.webp?v=1713857848","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d512e98928fe8fc7eccdff7a170b84131b3775a_40b699a0-bcbc-4230-9b26-8099b26817d1.webp?v=1713857853","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79a383eb3d2732fd9b82f00417add0c643788586_3cfd8d17-e81d-4275-8b67-d2df23f63007.webp?v=1713857856","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f389b0e120974deee4136646b9dbe69bb29e6399_4875db41-0432-41b1-b7d0-62ae6ab96467.webp?v=1713857858","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c02a5397e21f888b84c9de7385204a054aecae0d_8037374d-32a4-412a-93ed-8c4015ed1147.webp?v=1713857860","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bceb40b3315b8abfc66f6f680566e058e5bc2f34_a7307de2-b697-4331-bf2a-274b0cfe6720.webp?v=1713857863","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3aff471b33c4db116bff464b9d12f9c0ab0ac1a4_8c657ff2-42bd-4846-8de1-dc9000f533b7.webp?v=1713857865","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d0fdd2c6580c3bb3864134bea81b4cb827924fe_0a04dd7b-8a66-448f-b11b-d84b4465e7bb.webp?v=1713857868"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e98154021e2787f04879fec4e287e65065834b1c_75f53ae6-a95f-467d-bfe9-53a7f4e44252.webp?v=1713857846","options":["color"],"media":[{"alt":null,"id":23789206306915,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e98154021e2787f04879fec4e287e65065834b1c_75f53ae6-a95f-467d-bfe9-53a7f4e44252.webp?v=1713857846"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e98154021e2787f04879fec4e287e65065834b1c_75f53ae6-a95f-467d-bfe9-53a7f4e44252.webp?v=1713857846","width":2000},{"alt":null,"id":23789207060579,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d1a938602bcd648727bbc824d6948aa0b071245_52b50c36-c1fc-4223-b57b-33de375665e8.webp?v=1713857848"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d1a938602bcd648727bbc824d6948aa0b071245_52b50c36-c1fc-4223-b57b-33de375665e8.webp?v=1713857848","width":2000},{"alt":null,"id":23789208305763,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d512e98928fe8fc7eccdff7a170b84131b3775a_40b699a0-bcbc-4230-9b26-8099b26817d1.webp?v=1713857853"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d512e98928fe8fc7eccdff7a170b84131b3775a_40b699a0-bcbc-4230-9b26-8099b26817d1.webp?v=1713857853","width":2000},{"alt":null,"id":23789208862819,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79a383eb3d2732fd9b82f00417add0c643788586_3cfd8d17-e81d-4275-8b67-d2df23f63007.webp?v=1713857856"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79a383eb3d2732fd9b82f00417add0c643788586_3cfd8d17-e81d-4275-8b67-d2df23f63007.webp?v=1713857856","width":2000},{"alt":null,"id":23789209485411,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f389b0e120974deee4136646b9dbe69bb29e6399_4875db41-0432-41b1-b7d0-62ae6ab96467.webp?v=1713857858"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f389b0e120974deee4136646b9dbe69bb29e6399_4875db41-0432-41b1-b7d0-62ae6ab96467.webp?v=1713857858","width":2000},{"alt":null,"id":23789210042467,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c02a5397e21f888b84c9de7385204a054aecae0d_8037374d-32a4-412a-93ed-8c4015ed1147.webp?v=1713857860"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c02a5397e21f888b84c9de7385204a054aecae0d_8037374d-32a4-412a-93ed-8c4015ed1147.webp?v=1713857860","width":2000},{"alt":null,"id":23789210665059,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bceb40b3315b8abfc66f6f680566e058e5bc2f34_a7307de2-b697-4331-bf2a-274b0cfe6720.webp?v=1713857863"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bceb40b3315b8abfc66f6f680566e058e5bc2f34_a7307de2-b697-4331-bf2a-274b0cfe6720.webp?v=1713857863","width":2000},{"alt":null,"id":23789211123811,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3aff471b33c4db116bff464b9d12f9c0ab0ac1a4_8c657ff2-42bd-4846-8de1-dc9000f533b7.webp?v=1713857865"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3aff471b33c4db116bff464b9d12f9c0ab0ac1a4_8c657ff2-42bd-4846-8de1-dc9000f533b7.webp?v=1713857865","width":2000},{"alt":null,"id":23789211746403,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d0fdd2c6580c3bb3864134bea81b4cb827924fe_0a04dd7b-8a66-448f-b11b-d84b4465e7bb.webp?v=1713857868"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d0fdd2c6580c3bb3864134bea81b4cb827924fe_0a04dd7b-8a66-448f-b11b-d84b4465e7bb.webp?v=1713857868","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41793241284707,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PL64","requires_shipping":true,"taxable":true,"featured_image":{"id":31386970128483,"product_id":7369170255971,"position":3,"created_at":"2024-04-23T15:37:33+08:00","updated_at":"2024-04-23T15:37:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d512e98928fe8fc7eccdff7a170b84131b3775a_40b699a0-bcbc-4230-9b26-8099b26817d1.webp?v=1713857853","variant_ids":[41793241284707]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Snoopy 史努比 - 愛心墨鏡 - 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":"NPB0108624-PL64","featured_media":{"alt":null,"id":23789208305763,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d512e98928fe8fc7eccdff7a170b84131b3775a_40b699a0-bcbc-4230-9b26-8099b26817d1.webp?v=1713857853"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41793241284707,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PL64","requires_shipping":true,"taxable":true,"featured_image":{"id":31386970128483,"product_id":7369170255971,"position":3,"created_at":"2024-04-23T15:37:33+08:00","updated_at":"2024-04-23T15:37:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d512e98928fe8fc7eccdff7a170b84131b3775a_40b699a0-bcbc-4230-9b26-8099b26817d1.webp?v=1713857853","variant_ids":[41793241284707]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Snoopy 史努比 - 愛心墨鏡 - 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":"NPB0108624-PL64","featured_media":{"alt":null,"id":23789208305763,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d512e98928fe8fc7eccdff7a170b84131b3775a_40b699a0-bcbc-4230-9b26-8099b26817d1.webp?v=1713857853"}},"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: "停產" }