$product = {"id":7415943004259,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Pattern BB8-Galaxy","handle":"iphone-xs-max-mod-nx-printable-pb59","description":null,"published_at":"2024-06-11T16:48:32+08:00","created_at":"2024-05-06T12:29:13+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":41915776565347,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB59","requires_shipping":true,"taxable":true,"featured_image":{"id":31490798944355,"product_id":7415943004259,"position":6,"created_at":"2024-05-06T12:29:29+08:00","updated_at":"2024-05-06T12:29:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f43bd2ef9bbb6c28596b243cf92f46f45a711cc_21a77cf4-4612-468d-8769-33edd89eac11.webp?v=1714969769","variant_ids":[41915776565347]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Pattern BB8-Galaxy - 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-PB59","featured_media":{"alt":null,"id":23896205820003,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f43bd2ef9bbb6c28596b243cf92f46f45a711cc_21a77cf4-4612-468d-8769-33edd89eac11.webp?v=1714969769"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/41a86aef459ab22f3ade3e184e3a89f809b69f99_d63ee3ed-2443-4a76-8074-8c8273238bea.webp?v=1714969756","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/07db04c9cb1f46b450d29067a621cb8de0fa7578_e98a8a62-ca77-48e3-93d0-d921ba150368.webp?v=1714969759","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f4e735ffd44fdda068eceaae32900aa84ca17cb_8579b27d-3d14-441c-b39c-f60a15f0e031.webp?v=1714969762","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4ab96541e64b80b58e0a23cf4d8d3330f7bd2f69_55ca1a61-4d6f-4a00-b2bf-9f640c12c46b.webp?v=1714969764","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/224aefc997720a3224a4c5aac5623133a1a58a5d_ea1323b7-333f-4cca-ab41-bc99531aaaf0.webp?v=1714969766","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f43bd2ef9bbb6c28596b243cf92f46f45a711cc_21a77cf4-4612-468d-8769-33edd89eac11.webp?v=1714969769","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af81129c1509a70b6caee219dadd9f7998c4eada_6b3fb854-b2a2-4a7c-93e9-2ff133699350.webp?v=1714969771","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/486126300e91aba53c3ce6982a8a416dc70a128e_4da731d5-6a58-4ae5-baa5-edabeaa446b5.webp?v=1714969774","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e923f40d9902ba637521e3bba96e4c35abdb020a_54e991fc-5a44-4806-80ba-c13827a08a7e.webp?v=1714969777","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d41ff41858485472b9736a98028bee47d6ed7025_1ae38877-1128-4d98-8451-58981c811e82.webp?v=1714969779"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/41a86aef459ab22f3ade3e184e3a89f809b69f99_d63ee3ed-2443-4a76-8074-8c8273238bea.webp?v=1714969756","options":["color"],"media":[{"alt":null,"id":23896201953379,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/41a86aef459ab22f3ade3e184e3a89f809b69f99_d63ee3ed-2443-4a76-8074-8c8273238bea.webp?v=1714969756"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/41a86aef459ab22f3ade3e184e3a89f809b69f99_d63ee3ed-2443-4a76-8074-8c8273238bea.webp?v=1714969756","width":2000},{"alt":null,"id":23896202510435,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/07db04c9cb1f46b450d29067a621cb8de0fa7578_e98a8a62-ca77-48e3-93d0-d921ba150368.webp?v=1714969759"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/07db04c9cb1f46b450d29067a621cb8de0fa7578_e98a8a62-ca77-48e3-93d0-d921ba150368.webp?v=1714969759","width":2000},{"alt":null,"id":23896204083299,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f4e735ffd44fdda068eceaae32900aa84ca17cb_8579b27d-3d14-441c-b39c-f60a15f0e031.webp?v=1714969762"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f4e735ffd44fdda068eceaae32900aa84ca17cb_8579b27d-3d14-441c-b39c-f60a15f0e031.webp?v=1714969762","width":2000},{"alt":null,"id":23896204902499,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4ab96541e64b80b58e0a23cf4d8d3330f7bd2f69_55ca1a61-4d6f-4a00-b2bf-9f640c12c46b.webp?v=1714969764"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4ab96541e64b80b58e0a23cf4d8d3330f7bd2f69_55ca1a61-4d6f-4a00-b2bf-9f640c12c46b.webp?v=1714969764","width":2000},{"alt":null,"id":23896205394019,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/224aefc997720a3224a4c5aac5623133a1a58a5d_ea1323b7-333f-4cca-ab41-bc99531aaaf0.webp?v=1714969766"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/224aefc997720a3224a4c5aac5623133a1a58a5d_ea1323b7-333f-4cca-ab41-bc99531aaaf0.webp?v=1714969766","width":2000},{"alt":null,"id":23896205820003,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f43bd2ef9bbb6c28596b243cf92f46f45a711cc_21a77cf4-4612-468d-8769-33edd89eac11.webp?v=1714969769"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f43bd2ef9bbb6c28596b243cf92f46f45a711cc_21a77cf4-4612-468d-8769-33edd89eac11.webp?v=1714969769","width":2000},{"alt":null,"id":23896206671971,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af81129c1509a70b6caee219dadd9f7998c4eada_6b3fb854-b2a2-4a7c-93e9-2ff133699350.webp?v=1714969771"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af81129c1509a70b6caee219dadd9f7998c4eada_6b3fb854-b2a2-4a7c-93e9-2ff133699350.webp?v=1714969771","width":2000},{"alt":null,"id":23896207163491,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/486126300e91aba53c3ce6982a8a416dc70a128e_4da731d5-6a58-4ae5-baa5-edabeaa446b5.webp?v=1714969774"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/486126300e91aba53c3ce6982a8a416dc70a128e_4da731d5-6a58-4ae5-baa5-edabeaa446b5.webp?v=1714969774","width":2000},{"alt":null,"id":23896207687779,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e923f40d9902ba637521e3bba96e4c35abdb020a_54e991fc-5a44-4806-80ba-c13827a08a7e.webp?v=1714969777"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e923f40d9902ba637521e3bba96e4c35abdb020a_54e991fc-5a44-4806-80ba-c13827a08a7e.webp?v=1714969777","width":2000},{"alt":null,"id":23896208277603,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d41ff41858485472b9736a98028bee47d6ed7025_1ae38877-1128-4d98-8451-58981c811e82.webp?v=1714969779"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d41ff41858485472b9736a98028bee47d6ed7025_1ae38877-1128-4d98-8451-58981c811e82.webp?v=1714969779","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41915776565347,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB59","requires_shipping":true,"taxable":true,"featured_image":{"id":31490798944355,"product_id":7415943004259,"position":6,"created_at":"2024-05-06T12:29:29+08:00","updated_at":"2024-05-06T12:29:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f43bd2ef9bbb6c28596b243cf92f46f45a711cc_21a77cf4-4612-468d-8769-33edd89eac11.webp?v=1714969769","variant_ids":[41915776565347]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Pattern BB8-Galaxy - 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-PB59","featured_media":{"alt":null,"id":23896205820003,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f43bd2ef9bbb6c28596b243cf92f46f45a711cc_21a77cf4-4612-468d-8769-33edd89eac11.webp?v=1714969769"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41915776565347,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB59","requires_shipping":true,"taxable":true,"featured_image":{"id":31490798944355,"product_id":7415943004259,"position":6,"created_at":"2024-05-06T12:29:29+08:00","updated_at":"2024-05-06T12:29:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f43bd2ef9bbb6c28596b243cf92f46f45a711cc_21a77cf4-4612-468d-8769-33edd89eac11.webp?v=1714969769","variant_ids":[41915776565347]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Pattern BB8-Galaxy - 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-PB59","featured_media":{"alt":null,"id":23896205820003,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f43bd2ef9bbb6c28596b243cf92f46f45a711cc_21a77cf4-4612-468d-8769-33edd89eac11.webp?v=1714969769"}},"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: "停產" }