$product = {"id":7415886250083,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士-噴漆白","handle":"iphone-xs-max-mod-nx-printable-pb04","description":null,"published_at":"2024-06-11T16:47:04+08:00","created_at":"2024-05-06T12:18:22+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":41915199717475,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB04","requires_shipping":true,"taxable":true,"featured_image":{"id":31490657910883,"product_id":7415886250083,"position":8,"created_at":"2024-05-06T12:18:42+08:00","updated_at":"2024-05-06T12:18:42+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/318c00cf3e5afab3d4660c740161031b7d3a8ef2_fdb50b1e-e7bf-4913-99a6-3af0dbeb6507.webp?v=1714969122","variant_ids":[41915199717475]},"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-PB04","featured_media":{"alt":null,"id":23896064458851,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/318c00cf3e5afab3d4660c740161031b7d3a8ef2_fdb50b1e-e7bf-4913-99a6-3af0dbeb6507.webp?v=1714969122"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e504d69da50c5ebf8b1f79800292456c8092f86f_7732f58a-7003-43b8-9856-0bed2011704d.webp?v=1714969105","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6ecf5ea5432b3eb8f812157066d65ab0d1b0bc7_25400857-3d8a-4e1b-af0a-67539f0e0c86.webp?v=1714969107","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6da05a0138caaa5c554c073fe7c198d954a38f73_4b8e52d6-7d42-4138-8fe0-6c7a7969c534.webp?v=1714969109","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bdc37c2de9fee667ec83028f323414777502a167_8395c59c-f4b0-4cd9-88af-3f1dc0e6717d.webp?v=1714969112","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eda15ca5425c5b84c16bfa7a2ba3195f8cfa2843_28234c92-28f3-4b4d-be43-e6f7605b9e81.webp?v=1714969114","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a6f214e61c06bf9741b69b35b4f25135fd9cad3e_94a615b9-006f-413c-9480-d068b0f58315.webp?v=1714969116","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/519c8b1a41f958cacfb388fc9d343c6fb751db9b_9daffa5c-da84-41a9-9e93-9a91556b4eba.webp?v=1714969120","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/318c00cf3e5afab3d4660c740161031b7d3a8ef2_fdb50b1e-e7bf-4913-99a6-3af0dbeb6507.webp?v=1714969122","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cab8889d90ef590ecb3411dff3e77b063ae61ae6_9060beee-6001-42f2-8aae-8a76ae5597e4.webp?v=1714969124","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da021824e8111ad38ac4aafdca9d5e2a405727ce_55deda3f-f81b-4377-8c19-2bc8ad547bed.webp?v=1714969127"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e504d69da50c5ebf8b1f79800292456c8092f86f_7732f58a-7003-43b8-9856-0bed2011704d.webp?v=1714969105","options":["color"],"media":[{"alt":null,"id":23896060821603,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e504d69da50c5ebf8b1f79800292456c8092f86f_7732f58a-7003-43b8-9856-0bed2011704d.webp?v=1714969105"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e504d69da50c5ebf8b1f79800292456c8092f86f_7732f58a-7003-43b8-9856-0bed2011704d.webp?v=1714969105","width":2000},{"alt":null,"id":23896061608035,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6ecf5ea5432b3eb8f812157066d65ab0d1b0bc7_25400857-3d8a-4e1b-af0a-67539f0e0c86.webp?v=1714969107"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6ecf5ea5432b3eb8f812157066d65ab0d1b0bc7_25400857-3d8a-4e1b-af0a-67539f0e0c86.webp?v=1714969107","width":2000},{"alt":null,"id":23896061968483,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6da05a0138caaa5c554c073fe7c198d954a38f73_4b8e52d6-7d42-4138-8fe0-6c7a7969c534.webp?v=1714969109"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6da05a0138caaa5c554c073fe7c198d954a38f73_4b8e52d6-7d42-4138-8fe0-6c7a7969c534.webp?v=1714969109","width":2000},{"alt":null,"id":23896062361699,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bdc37c2de9fee667ec83028f323414777502a167_8395c59c-f4b0-4cd9-88af-3f1dc0e6717d.webp?v=1714969112"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bdc37c2de9fee667ec83028f323414777502a167_8395c59c-f4b0-4cd9-88af-3f1dc0e6717d.webp?v=1714969112","width":2000},{"alt":null,"id":23896063017059,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eda15ca5425c5b84c16bfa7a2ba3195f8cfa2843_28234c92-28f3-4b4d-be43-e6f7605b9e81.webp?v=1714969114"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eda15ca5425c5b84c16bfa7a2ba3195f8cfa2843_28234c92-28f3-4b4d-be43-e6f7605b9e81.webp?v=1714969114","width":2000},{"alt":null,"id":23896063377507,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a6f214e61c06bf9741b69b35b4f25135fd9cad3e_94a615b9-006f-413c-9480-d068b0f58315.webp?v=1714969116"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a6f214e61c06bf9741b69b35b4f25135fd9cad3e_94a615b9-006f-413c-9480-d068b0f58315.webp?v=1714969116","width":2000},{"alt":null,"id":23896064065635,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/519c8b1a41f958cacfb388fc9d343c6fb751db9b_9daffa5c-da84-41a9-9e93-9a91556b4eba.webp?v=1714969120"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/519c8b1a41f958cacfb388fc9d343c6fb751db9b_9daffa5c-da84-41a9-9e93-9a91556b4eba.webp?v=1714969120","width":2000},{"alt":null,"id":23896064458851,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/318c00cf3e5afab3d4660c740161031b7d3a8ef2_fdb50b1e-e7bf-4913-99a6-3af0dbeb6507.webp?v=1714969122"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/318c00cf3e5afab3d4660c740161031b7d3a8ef2_fdb50b1e-e7bf-4913-99a6-3af0dbeb6507.webp?v=1714969122","width":2000},{"alt":null,"id":23896064917603,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cab8889d90ef590ecb3411dff3e77b063ae61ae6_9060beee-6001-42f2-8aae-8a76ae5597e4.webp?v=1714969124"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cab8889d90ef590ecb3411dff3e77b063ae61ae6_9060beee-6001-42f2-8aae-8a76ae5597e4.webp?v=1714969124","width":2000},{"alt":null,"id":23896065474659,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da021824e8111ad38ac4aafdca9d5e2a405727ce_55deda3f-f81b-4377-8c19-2bc8ad547bed.webp?v=1714969127"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da021824e8111ad38ac4aafdca9d5e2a405727ce_55deda3f-f81b-4377-8c19-2bc8ad547bed.webp?v=1714969127","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41915199717475,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB04","requires_shipping":true,"taxable":true,"featured_image":{"id":31490657910883,"product_id":7415886250083,"position":8,"created_at":"2024-05-06T12:18:42+08:00","updated_at":"2024-05-06T12:18:42+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/318c00cf3e5afab3d4660c740161031b7d3a8ef2_fdb50b1e-e7bf-4913-99a6-3af0dbeb6507.webp?v=1714969122","variant_ids":[41915199717475]},"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-PB04","featured_media":{"alt":null,"id":23896064458851,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/318c00cf3e5afab3d4660c740161031b7d3a8ef2_fdb50b1e-e7bf-4913-99a6-3af0dbeb6507.webp?v=1714969122"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41915199717475,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB04","requires_shipping":true,"taxable":true,"featured_image":{"id":31490657910883,"product_id":7415886250083,"position":8,"created_at":"2024-05-06T12:18:42+08:00","updated_at":"2024-05-06T12:18:42+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/318c00cf3e5afab3d4660c740161031b7d3a8ef2_fdb50b1e-e7bf-4913-99a6-3af0dbeb6507.webp?v=1714969122","variant_ids":[41915199717475]},"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-PB04","featured_media":{"alt":null,"id":23896064458851,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/318c00cf3e5afab3d4660c740161031b7d3a8ef2_fdb50b1e-e7bf-4913-99a6-3af0dbeb6507.webp?v=1714969122"}},"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: "停產" }