$product = {"id":7415904469091,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士-線稿風格","handle":"iphone-xs-max-mod-nx-printable-pb51","description":null,"published_at":"2024-06-11T16:47:33+08:00","created_at":"2024-05-06T12:22:06+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":41915385872483,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB51","requires_shipping":true,"taxable":true,"featured_image":{"id":31490701361251,"product_id":7415904469091,"position":7,"created_at":"2024-05-06T12:22:25+08:00","updated_at":"2024-05-06T12:22:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eeebc410cc1fd1a6e7d5051065e9e583697d46a0_72deeb8e-9384-42f9-b400-ebe265d3aed7.webp?v=1714969345","variant_ids":[41915385872483]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0108624-PB51","featured_media":{"alt":null,"id":23896108073059,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eeebc410cc1fd1a6e7d5051065e9e583697d46a0_72deeb8e-9384-42f9-b400-ebe265d3aed7.webp?v=1714969345"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b28a92f55fd47cd6ffb464e1c933558bbaee0919_e17e61e6-bb8a-494c-93e3-a1194e36be44.webp?v=1714969328","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72c0e38f16c8669c8e02784fb5a55abae4834a97_f10ff9f3-2c4f-4dd3-bc86-f949ccc01bfb.webp?v=1714969331","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dce68481278a2606e179d35d98b6ea8ba8105c3a_01bff1cf-f1e5-401d-b95b-b17deba211d3.webp?v=1714969335","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59139f7efe1f45c9052606a7bd12fe90d4d8a39d_81fd0b91-5be5-44b5-8da0-1f17c83988b1.webp?v=1714969338","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3baa5a0b0c2ad149c55f2781ad91c7dbeaf7260a_855cc75c-bc8c-4281-bca4-f359fa851d40.webp?v=1714969340","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66800319b6b8465bc040503ca03b8cc2c3469045_e44256e6-3a10-4538-a708-aa32be02c374.webp?v=1714969343","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eeebc410cc1fd1a6e7d5051065e9e583697d46a0_72deeb8e-9384-42f9-b400-ebe265d3aed7.webp?v=1714969345","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca0ced82989fc39ea262cf74f64622556a980aea_9d5b2b2c-a5e4-478a-b614-6b0b762adfe2.webp?v=1714969347","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c777680d44fb42a2e02394d8ecedab373c2a4298_215d49de-fda2-49da-90d4-b5908f41647c.webp?v=1714969349"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b28a92f55fd47cd6ffb464e1c933558bbaee0919_e17e61e6-bb8a-494c-93e3-a1194e36be44.webp?v=1714969328","options":["color"],"media":[{"alt":null,"id":23896104370275,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b28a92f55fd47cd6ffb464e1c933558bbaee0919_e17e61e6-bb8a-494c-93e3-a1194e36be44.webp?v=1714969328"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b28a92f55fd47cd6ffb464e1c933558bbaee0919_e17e61e6-bb8a-494c-93e3-a1194e36be44.webp?v=1714969328","width":2000},{"alt":null,"id":23896104894563,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72c0e38f16c8669c8e02784fb5a55abae4834a97_f10ff9f3-2c4f-4dd3-bc86-f949ccc01bfb.webp?v=1714969331"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72c0e38f16c8669c8e02784fb5a55abae4834a97_f10ff9f3-2c4f-4dd3-bc86-f949ccc01bfb.webp?v=1714969331","width":2000},{"alt":null,"id":23896105746531,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dce68481278a2606e179d35d98b6ea8ba8105c3a_01bff1cf-f1e5-401d-b95b-b17deba211d3.webp?v=1714969335"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dce68481278a2606e179d35d98b6ea8ba8105c3a_01bff1cf-f1e5-401d-b95b-b17deba211d3.webp?v=1714969335","width":2000},{"alt":null,"id":23896106401891,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59139f7efe1f45c9052606a7bd12fe90d4d8a39d_81fd0b91-5be5-44b5-8da0-1f17c83988b1.webp?v=1714969338"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59139f7efe1f45c9052606a7bd12fe90d4d8a39d_81fd0b91-5be5-44b5-8da0-1f17c83988b1.webp?v=1714969338","width":2000},{"alt":null,"id":23896107024483,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3baa5a0b0c2ad149c55f2781ad91c7dbeaf7260a_855cc75c-bc8c-4281-bca4-f359fa851d40.webp?v=1714969340"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3baa5a0b0c2ad149c55f2781ad91c7dbeaf7260a_855cc75c-bc8c-4281-bca4-f359fa851d40.webp?v=1714969340","width":2000},{"alt":null,"id":23896107581539,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66800319b6b8465bc040503ca03b8cc2c3469045_e44256e6-3a10-4538-a708-aa32be02c374.webp?v=1714969343"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66800319b6b8465bc040503ca03b8cc2c3469045_e44256e6-3a10-4538-a708-aa32be02c374.webp?v=1714969343","width":2000},{"alt":null,"id":23896108073059,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eeebc410cc1fd1a6e7d5051065e9e583697d46a0_72deeb8e-9384-42f9-b400-ebe265d3aed7.webp?v=1714969345"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eeebc410cc1fd1a6e7d5051065e9e583697d46a0_72deeb8e-9384-42f9-b400-ebe265d3aed7.webp?v=1714969345","width":2000},{"alt":null,"id":23896108466275,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca0ced82989fc39ea262cf74f64622556a980aea_9d5b2b2c-a5e4-478a-b614-6b0b762adfe2.webp?v=1714969347"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca0ced82989fc39ea262cf74f64622556a980aea_9d5b2b2c-a5e4-478a-b614-6b0b762adfe2.webp?v=1714969347","width":2000},{"alt":null,"id":23896108957795,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c777680d44fb42a2e02394d8ecedab373c2a4298_215d49de-fda2-49da-90d4-b5908f41647c.webp?v=1714969349"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c777680d44fb42a2e02394d8ecedab373c2a4298_215d49de-fda2-49da-90d4-b5908f41647c.webp?v=1714969349","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41915385872483,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB51","requires_shipping":true,"taxable":true,"featured_image":{"id":31490701361251,"product_id":7415904469091,"position":7,"created_at":"2024-05-06T12:22:25+08:00","updated_at":"2024-05-06T12:22:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eeebc410cc1fd1a6e7d5051065e9e583697d46a0_72deeb8e-9384-42f9-b400-ebe265d3aed7.webp?v=1714969345","variant_ids":[41915385872483]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0108624-PB51","featured_media":{"alt":null,"id":23896108073059,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eeebc410cc1fd1a6e7d5051065e9e583697d46a0_72deeb8e-9384-42f9-b400-ebe265d3aed7.webp?v=1714969345"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41915385872483,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB51","requires_shipping":true,"taxable":true,"featured_image":{"id":31490701361251,"product_id":7415904469091,"position":7,"created_at":"2024-05-06T12:22:25+08:00","updated_at":"2024-05-06T12:22:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eeebc410cc1fd1a6e7d5051065e9e583697d46a0_72deeb8e-9384-42f9-b400-ebe265d3aed7.webp?v=1714969345","variant_ids":[41915385872483]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0108624-PB51","featured_media":{"alt":null,"id":23896108073059,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eeebc410cc1fd1a6e7d5051065e9e583697d46a0_72deeb8e-9384-42f9-b400-ebe265d3aed7.webp?v=1714969345"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null; $type = ""; var sellingStatus if ($isMerge) { $(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: "停產" }