$product = {"id":7415941202019,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 伊沃克人1-塗鴉藝術","handle":"iphone-xs-max-mod-nx-printable-pb37","description":null,"published_at":"2024-06-11T16:48:29+08:00","created_at":"2024-05-06T12:28:53+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 XS Max","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":41915752546403,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB37","requires_shipping":true,"taxable":true,"featured_image":{"id":31490791374947,"product_id":7415941202019,"position":3,"created_at":"2024-05-06T12:29:00+08:00","updated_at":"2024-05-06T12:29:00+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5c7ecd375031937596548339f15254031d8e3d0_77edff95-db63-453a-b307-ef0d43b92fa2.webp?v=1714969740","variant_ids":[41915752546403]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 伊沃克人1-塗鴉藝術 - 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-PB37","featured_media":{"alt":null,"id":23896198185059,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5c7ecd375031937596548339f15254031d8e3d0_77edff95-db63-453a-b307-ef0d43b92fa2.webp?v=1714969740"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8d8396ca4d6ecda425be25e5823188fd339af1f_c2d5b81b-caa3-4adc-acba-775a37b8405e.webp?v=1714969735","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/060fc0a28a640ae47375dd285900c8c98d13a66f_41771ead-86ba-494f-a098-591cf18c938a.webp?v=1714969737","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5c7ecd375031937596548339f15254031d8e3d0_77edff95-db63-453a-b307-ef0d43b92fa2.webp?v=1714969740","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d75cf3a039d93baacf6eec2dcb2e54a0410599aa_7d0fcc19-07c6-4f95-9ba2-77015fb96ab7.webp?v=1714969742","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9581d0de6b269235a07f2666b03afbc0b99e04b_9f5e0be0-a9b8-4367-9b02-6eb65602af7e.webp?v=1714969745","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/97b3e324c248f280433827c83304136cdf7ab6b1_fc377e9d-5b71-415a-93e9-09a45f958913.webp?v=1714969747","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eca32cf21a03b325aed7addd633e39a3235183fc_37fe2c69-aa3b-4a55-9532-978287e032dd.webp?v=1714969749","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd21280b9f06d50f2b043e46ed04099c6cb902d5_c9a8b019-12cc-4e41-a23d-404d8ca221c7.webp?v=1714969751","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9cad3b3d1e8d26deeda596d271f3f22267fcbf5_575e30bd-cd96-4834-bf1d-a61950609138.webp?v=1714969754","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3a5a75c54ec2e0e19844a8c919c0d4fb9672fb0_041def9b-0ae5-4641-8ffc-765b012a3dff.webp?v=1714969756"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8d8396ca4d6ecda425be25e5823188fd339af1f_c2d5b81b-caa3-4adc-acba-775a37b8405e.webp?v=1714969735","options":["color"],"media":[{"alt":null,"id":23896197202019,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8d8396ca4d6ecda425be25e5823188fd339af1f_c2d5b81b-caa3-4adc-acba-775a37b8405e.webp?v=1714969735"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8d8396ca4d6ecda425be25e5823188fd339af1f_c2d5b81b-caa3-4adc-acba-775a37b8405e.webp?v=1714969735","width":2000},{"alt":null,"id":23896197628003,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/060fc0a28a640ae47375dd285900c8c98d13a66f_41771ead-86ba-494f-a098-591cf18c938a.webp?v=1714969737"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/060fc0a28a640ae47375dd285900c8c98d13a66f_41771ead-86ba-494f-a098-591cf18c938a.webp?v=1714969737","width":2000},{"alt":null,"id":23896198185059,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5c7ecd375031937596548339f15254031d8e3d0_77edff95-db63-453a-b307-ef0d43b92fa2.webp?v=1714969740"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5c7ecd375031937596548339f15254031d8e3d0_77edff95-db63-453a-b307-ef0d43b92fa2.webp?v=1714969740","width":2000},{"alt":null,"id":23896198578275,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d75cf3a039d93baacf6eec2dcb2e54a0410599aa_7d0fcc19-07c6-4f95-9ba2-77015fb96ab7.webp?v=1714969742"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d75cf3a039d93baacf6eec2dcb2e54a0410599aa_7d0fcc19-07c6-4f95-9ba2-77015fb96ab7.webp?v=1714969742","width":2000},{"alt":null,"id":23896199168099,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9581d0de6b269235a07f2666b03afbc0b99e04b_9f5e0be0-a9b8-4367-9b02-6eb65602af7e.webp?v=1714969745"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9581d0de6b269235a07f2666b03afbc0b99e04b_9f5e0be0-a9b8-4367-9b02-6eb65602af7e.webp?v=1714969745","width":2000},{"alt":null,"id":23896199659619,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/97b3e324c248f280433827c83304136cdf7ab6b1_fc377e9d-5b71-415a-93e9-09a45f958913.webp?v=1714969747"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/97b3e324c248f280433827c83304136cdf7ab6b1_fc377e9d-5b71-415a-93e9-09a45f958913.webp?v=1714969747","width":2000},{"alt":null,"id":23896200052835,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eca32cf21a03b325aed7addd633e39a3235183fc_37fe2c69-aa3b-4a55-9532-978287e032dd.webp?v=1714969749"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eca32cf21a03b325aed7addd633e39a3235183fc_37fe2c69-aa3b-4a55-9532-978287e032dd.webp?v=1714969749","width":2000},{"alt":null,"id":23896200970339,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd21280b9f06d50f2b043e46ed04099c6cb902d5_c9a8b019-12cc-4e41-a23d-404d8ca221c7.webp?v=1714969751"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd21280b9f06d50f2b043e46ed04099c6cb902d5_c9a8b019-12cc-4e41-a23d-404d8ca221c7.webp?v=1714969751","width":2000},{"alt":null,"id":23896201298019,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9cad3b3d1e8d26deeda596d271f3f22267fcbf5_575e30bd-cd96-4834-bf1d-a61950609138.webp?v=1714969754"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9cad3b3d1e8d26deeda596d271f3f22267fcbf5_575e30bd-cd96-4834-bf1d-a61950609138.webp?v=1714969754","width":2000},{"alt":null,"id":23896201920611,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3a5a75c54ec2e0e19844a8c919c0d4fb9672fb0_041def9b-0ae5-4641-8ffc-765b012a3dff.webp?v=1714969756"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3a5a75c54ec2e0e19844a8c919c0d4fb9672fb0_041def9b-0ae5-4641-8ffc-765b012a3dff.webp?v=1714969756","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41915752546403,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB37","requires_shipping":true,"taxable":true,"featured_image":{"id":31490791374947,"product_id":7415941202019,"position":3,"created_at":"2024-05-06T12:29:00+08:00","updated_at":"2024-05-06T12:29:00+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5c7ecd375031937596548339f15254031d8e3d0_77edff95-db63-453a-b307-ef0d43b92fa2.webp?v=1714969740","variant_ids":[41915752546403]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 伊沃克人1-塗鴉藝術 - 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-PB37","featured_media":{"alt":null,"id":23896198185059,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5c7ecd375031937596548339f15254031d8e3d0_77edff95-db63-453a-b307-ef0d43b92fa2.webp?v=1714969740"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41915752546403,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB37","requires_shipping":true,"taxable":true,"featured_image":{"id":31490791374947,"product_id":7415941202019,"position":3,"created_at":"2024-05-06T12:29:00+08:00","updated_at":"2024-05-06T12:29:00+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5c7ecd375031937596548339f15254031d8e3d0_77edff95-db63-453a-b307-ef0d43b92fa2.webp?v=1714969740","variant_ids":[41915752546403]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 伊沃克人1-塗鴉藝術 - 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-PB37","featured_media":{"alt":null,"id":23896198185059,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5c7ecd375031937596548339f15254031d8e3d0_77edff95-db63-453a-b307-ef0d43b92fa2.webp?v=1714969740"}},"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: "停產" }