$product = {"id":7415924260963,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 星際大戰-開場字幕","handle":"iphone-xs-max-mod-nx-printable-pb70","description":null,"published_at":"2024-06-11T16:48:03+08:00","created_at":"2024-05-06T12:25:48+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":41915578482787,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB70","requires_shipping":true,"taxable":true,"featured_image":{"id":31490751234147,"product_id":7415924260963,"position":8,"created_at":"2024-05-06T12:26:11+08:00","updated_at":"2024-05-06T12:26:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28379ceb8a6982505c3a1b7e2f7b5258e5ca1c47_9193820d-d343-4549-a52d-277fb53e6814.webp?v=1714969571","variant_ids":[41915578482787]},"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-PB70","featured_media":{"alt":null,"id":23896157978723,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28379ceb8a6982505c3a1b7e2f7b5258e5ca1c47_9193820d-d343-4549-a52d-277fb53e6814.webp?v=1714969571"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ffffa49a4314b8ecc88860fd64db4ffdc0cff2d_c6c51e14-c5bf-46d1-a297-d8936343b1a7.webp?v=1714969551","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e4ca09f4acb360a4b832f30987517495587152f7_5fc95b42-4574-4452-835b-a83d84529e7d.webp?v=1714969553","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40c70dabe5fa9a29a155d8597dbdd0113389cce7_0450a440-12d3-4363-b592-7a8f63bba4c0.webp?v=1714969557","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6df4df348ca26b2c5e081d3f8538fa7bbad7f06e_7398cc88-872d-4204-87be-899a3d95ac73.webp?v=1714969560","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26674829b2a115269e759a8f4dbee939677c5d73_e3e3d916-3a1a-4ec4-a106-b163b437364f.webp?v=1714969562","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e125e06fbc29d4a68bdd83149ff3e8508923e9bf_b6ce6b71-763e-4a69-8270-73fa04a9e164.webp?v=1714969566","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/411fc784816495bfd78ee3d57cb9b799c5ab1bae_b3ceaf30-7efc-4183-b00d-6403c362554d.webp?v=1714969569","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28379ceb8a6982505c3a1b7e2f7b5258e5ca1c47_9193820d-d343-4549-a52d-277fb53e6814.webp?v=1714969571","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81ba9f6c8d13378c2163a57640f7d5d306b9959a_c0ef6c2f-76f3-490c-9116-a1d5352ba84a.webp?v=1714969576"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ffffa49a4314b8ecc88860fd64db4ffdc0cff2d_c6c51e14-c5bf-46d1-a297-d8936343b1a7.webp?v=1714969551","options":["color"],"media":[{"alt":null,"id":23896152768611,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ffffa49a4314b8ecc88860fd64db4ffdc0cff2d_c6c51e14-c5bf-46d1-a297-d8936343b1a7.webp?v=1714969551"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ffffa49a4314b8ecc88860fd64db4ffdc0cff2d_c6c51e14-c5bf-46d1-a297-d8936343b1a7.webp?v=1714969551","width":2000},{"alt":null,"id":23896153456739,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e4ca09f4acb360a4b832f30987517495587152f7_5fc95b42-4574-4452-835b-a83d84529e7d.webp?v=1714969553"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e4ca09f4acb360a4b832f30987517495587152f7_5fc95b42-4574-4452-835b-a83d84529e7d.webp?v=1714969553","width":2000},{"alt":null,"id":23896154439779,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40c70dabe5fa9a29a155d8597dbdd0113389cce7_0450a440-12d3-4363-b592-7a8f63bba4c0.webp?v=1714969557"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40c70dabe5fa9a29a155d8597dbdd0113389cce7_0450a440-12d3-4363-b592-7a8f63bba4c0.webp?v=1714969557","width":2000},{"alt":null,"id":23896154996835,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6df4df348ca26b2c5e081d3f8538fa7bbad7f06e_7398cc88-872d-4204-87be-899a3d95ac73.webp?v=1714969560"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6df4df348ca26b2c5e081d3f8538fa7bbad7f06e_7398cc88-872d-4204-87be-899a3d95ac73.webp?v=1714969560","width":2000},{"alt":null,"id":23896155619427,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26674829b2a115269e759a8f4dbee939677c5d73_e3e3d916-3a1a-4ec4-a106-b163b437364f.webp?v=1714969562"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26674829b2a115269e759a8f4dbee939677c5d73_e3e3d916-3a1a-4ec4-a106-b163b437364f.webp?v=1714969562","width":2000},{"alt":null,"id":23896156274787,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e125e06fbc29d4a68bdd83149ff3e8508923e9bf_b6ce6b71-763e-4a69-8270-73fa04a9e164.webp?v=1714969566"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e125e06fbc29d4a68bdd83149ff3e8508923e9bf_b6ce6b71-763e-4a69-8270-73fa04a9e164.webp?v=1714969566","width":2000},{"alt":null,"id":23896157454435,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/411fc784816495bfd78ee3d57cb9b799c5ab1bae_b3ceaf30-7efc-4183-b00d-6403c362554d.webp?v=1714969569"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/411fc784816495bfd78ee3d57cb9b799c5ab1bae_b3ceaf30-7efc-4183-b00d-6403c362554d.webp?v=1714969569","width":2000},{"alt":null,"id":23896157978723,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28379ceb8a6982505c3a1b7e2f7b5258e5ca1c47_9193820d-d343-4549-a52d-277fb53e6814.webp?v=1714969571"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28379ceb8a6982505c3a1b7e2f7b5258e5ca1c47_9193820d-d343-4549-a52d-277fb53e6814.webp?v=1714969571","width":2000},{"alt":null,"id":23896159617123,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81ba9f6c8d13378c2163a57640f7d5d306b9959a_c0ef6c2f-76f3-490c-9116-a1d5352ba84a.webp?v=1714969576"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81ba9f6c8d13378c2163a57640f7d5d306b9959a_c0ef6c2f-76f3-490c-9116-a1d5352ba84a.webp?v=1714969576","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41915578482787,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB70","requires_shipping":true,"taxable":true,"featured_image":{"id":31490751234147,"product_id":7415924260963,"position":8,"created_at":"2024-05-06T12:26:11+08:00","updated_at":"2024-05-06T12:26:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28379ceb8a6982505c3a1b7e2f7b5258e5ca1c47_9193820d-d343-4549-a52d-277fb53e6814.webp?v=1714969571","variant_ids":[41915578482787]},"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-PB70","featured_media":{"alt":null,"id":23896157978723,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28379ceb8a6982505c3a1b7e2f7b5258e5ca1c47_9193820d-d343-4549-a52d-277fb53e6814.webp?v=1714969571"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41915578482787,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB70","requires_shipping":true,"taxable":true,"featured_image":{"id":31490751234147,"product_id":7415924260963,"position":8,"created_at":"2024-05-06T12:26:11+08:00","updated_at":"2024-05-06T12:26:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28379ceb8a6982505c3a1b7e2f7b5258e5ca1c47_9193820d-d343-4549-a52d-277fb53e6814.webp?v=1714969571","variant_ids":[41915578482787]},"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-PB70","featured_media":{"alt":null,"id":23896157978723,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28379ceb8a6982505c3a1b7e2f7b5258e5ca1c47_9193820d-d343-4549-a52d-277fb53e6814.webp?v=1714969571"}},"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: "停產" }