$product = {"id":7416001822819,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具2-黑","handle":"iphone-xs-max-mod-nx-printable-pb11","description":null,"published_at":"2024-06-11T16:50:06+08:00","created_at":"2024-05-06T12:40: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":41916391293027,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB11","requires_shipping":true,"taxable":true,"featured_image":{"id":31490961145955,"product_id":7416001822819,"position":9,"created_at":"2024-05-06T12:40:38+08:00","updated_at":"2024-05-06T12:40:38+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4823af4c64a573af3358c2e26ec937b828d3c2bd_e5a83307-da59-429a-95c5-5cf9aa6b0669.webp?v=1714970438","variant_ids":[41916391293027]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具2-黑 - 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-PB11","featured_media":{"alt":null,"id":23896368218211,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4823af4c64a573af3358c2e26ec937b828d3c2bd_e5a83307-da59-429a-95c5-5cf9aa6b0669.webp?v=1714970438"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee01adb2d17c2d8668d70a94d8314552f822b861_25d283d3-ba45-4145-a2e4-1747fbf62ed4.webp?v=1714970416","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1f6429bcb21a05854e3725ee2ccb33b90a862cc_43db9109-7195-4cc9-9997-05046ac7dad6.webp?v=1714970418","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/358fb9f43147f1447763614966dde86238219c24_d4e4f816-106b-4c1b-af03-e1bc1c81eea2.webp?v=1714970421","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28e5ea617792dd44edb3dd072f6098141234a8b3_5e852ad4-8d5f-4ca1-922b-8efb69152e1f.webp?v=1714970424","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efbb967e3682b02790149b03daa39d648f84f953_9781679c-982e-4dfb-92c0-2f7045da9074.webp?v=1714970426","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc47a6108e435eee3326a0d0d34fe057d5abdcd0_c6c35ebb-48f2-48b8-8594-a1d9b7f3ec7e.webp?v=1714970428","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4c10d1991bbe0137249c7545823f166fdcf99b7f_2c2adae0-d7b8-495c-be4b-ff4a1b784eba.webp?v=1714970431","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f8911bceae15c57b822c64f2a9f24148432f5cb_29a89572-3903-4727-8b4c-799e57d58bea.webp?v=1714970433","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4823af4c64a573af3358c2e26ec937b828d3c2bd_e5a83307-da59-429a-95c5-5cf9aa6b0669.webp?v=1714970438"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee01adb2d17c2d8668d70a94d8314552f822b861_25d283d3-ba45-4145-a2e4-1747fbf62ed4.webp?v=1714970416","options":["color"],"media":[{"alt":null,"id":23896363073635,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee01adb2d17c2d8668d70a94d8314552f822b861_25d283d3-ba45-4145-a2e4-1747fbf62ed4.webp?v=1714970416"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee01adb2d17c2d8668d70a94d8314552f822b861_25d283d3-ba45-4145-a2e4-1747fbf62ed4.webp?v=1714970416","width":2000},{"alt":null,"id":23896363597923,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1f6429bcb21a05854e3725ee2ccb33b90a862cc_43db9109-7195-4cc9-9997-05046ac7dad6.webp?v=1714970418"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1f6429bcb21a05854e3725ee2ccb33b90a862cc_43db9109-7195-4cc9-9997-05046ac7dad6.webp?v=1714970418","width":2000},{"alt":null,"id":23896364023907,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/358fb9f43147f1447763614966dde86238219c24_d4e4f816-106b-4c1b-af03-e1bc1c81eea2.webp?v=1714970421"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/358fb9f43147f1447763614966dde86238219c24_d4e4f816-106b-4c1b-af03-e1bc1c81eea2.webp?v=1714970421","width":2000},{"alt":null,"id":23896364843107,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28e5ea617792dd44edb3dd072f6098141234a8b3_5e852ad4-8d5f-4ca1-922b-8efb69152e1f.webp?v=1714970424"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28e5ea617792dd44edb3dd072f6098141234a8b3_5e852ad4-8d5f-4ca1-922b-8efb69152e1f.webp?v=1714970424","width":2000},{"alt":null,"id":23896365629539,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efbb967e3682b02790149b03daa39d648f84f953_9781679c-982e-4dfb-92c0-2f7045da9074.webp?v=1714970426"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efbb967e3682b02790149b03daa39d648f84f953_9781679c-982e-4dfb-92c0-2f7045da9074.webp?v=1714970426","width":2000},{"alt":null,"id":23896366088291,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc47a6108e435eee3326a0d0d34fe057d5abdcd0_c6c35ebb-48f2-48b8-8594-a1d9b7f3ec7e.webp?v=1714970428"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc47a6108e435eee3326a0d0d34fe057d5abdcd0_c6c35ebb-48f2-48b8-8594-a1d9b7f3ec7e.webp?v=1714970428","width":2000},{"alt":null,"id":23896366612579,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4c10d1991bbe0137249c7545823f166fdcf99b7f_2c2adae0-d7b8-495c-be4b-ff4a1b784eba.webp?v=1714970431"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4c10d1991bbe0137249c7545823f166fdcf99b7f_2c2adae0-d7b8-495c-be4b-ff4a1b784eba.webp?v=1714970431","width":2000},{"alt":null,"id":23896367071331,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f8911bceae15c57b822c64f2a9f24148432f5cb_29a89572-3903-4727-8b4c-799e57d58bea.webp?v=1714970433"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f8911bceae15c57b822c64f2a9f24148432f5cb_29a89572-3903-4727-8b4c-799e57d58bea.webp?v=1714970433","width":2000},{"alt":null,"id":23896368218211,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4823af4c64a573af3358c2e26ec937b828d3c2bd_e5a83307-da59-429a-95c5-5cf9aa6b0669.webp?v=1714970438"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4823af4c64a573af3358c2e26ec937b828d3c2bd_e5a83307-da59-429a-95c5-5cf9aa6b0669.webp?v=1714970438","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41916391293027,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB11","requires_shipping":true,"taxable":true,"featured_image":{"id":31490961145955,"product_id":7416001822819,"position":9,"created_at":"2024-05-06T12:40:38+08:00","updated_at":"2024-05-06T12:40:38+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4823af4c64a573af3358c2e26ec937b828d3c2bd_e5a83307-da59-429a-95c5-5cf9aa6b0669.webp?v=1714970438","variant_ids":[41916391293027]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具2-黑 - 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-PB11","featured_media":{"alt":null,"id":23896368218211,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4823af4c64a573af3358c2e26ec937b828d3c2bd_e5a83307-da59-429a-95c5-5cf9aa6b0669.webp?v=1714970438"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41916391293027,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB11","requires_shipping":true,"taxable":true,"featured_image":{"id":31490961145955,"product_id":7416001822819,"position":9,"created_at":"2024-05-06T12:40:38+08:00","updated_at":"2024-05-06T12:40:38+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4823af4c64a573af3358c2e26ec937b828d3c2bd_e5a83307-da59-429a-95c5-5cf9aa6b0669.webp?v=1714970438","variant_ids":[41916391293027]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具2-黑 - 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-PB11","featured_media":{"alt":null,"id":23896368218211,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4823af4c64a573af3358c2e26ec937b828d3c2bd_e5a83307-da59-429a-95c5-5cf9aa6b0669.webp?v=1714970438"}},"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: "停產" }