$product = {"id":7416333369443,"title":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 星戰Logo黑武士款","handle":"iphone-8-mod-nx-printable-pb45","description":null,"published_at":"2024-06-11T16:56:10+08:00","created_at":"2024-05-06T14:36:19+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 8","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":41918595137635,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB45","requires_shipping":true,"taxable":true,"featured_image":{"id":31491869442147,"product_id":7416333369443,"position":10,"created_at":"2024-05-06T14:36:42+08:00","updated_at":"2024-05-06T14:36:42+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee44dcc22f00d6b97bd94283844945d31afd0717_8712d4bf-5fe6-4579-a001-cd8ed7d477e6.webp?v=1714977402","variant_ids":[41918595137635]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 星戰Logo黑武士款 - 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":"NPB0105424-PB45","featured_media":{"alt":null,"id":23897282314339,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee44dcc22f00d6b97bd94283844945d31afd0717_8712d4bf-5fe6-4579-a001-cd8ed7d477e6.webp?v=1714977402"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa183307a72cf6f1d2c7a14e8ed9df09ad62316d_70f83c31-acc6-47d6-816c-bd100e58db5d.webp?v=1714977382","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b48884952fc2001d3220b98670325fabbfb142fc_97f47425-3db9-4a18-ac75-27887d1d42bf.webp?v=1714977384","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0856b94e562b9fce55d9cf26565f63fdea81a77d_3e356388-8883-4095-a6ae-edee2a8cc512.webp?v=1714977386","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8293b338f88159de47cfb1c51ee66ceb1e51bb5f_7501b41b-115b-498e-be99-3f02f9f21d69.webp?v=1714977389","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a1e0cc42c9c7791bab3048d25dbae599cd088394_c92cea40-683a-4996-95c7-ecbfc6bffb7a.webp?v=1714977391","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aaf44b4554164fa4517e2360220b92823abd4379_99c62e27-400b-465f-8a2c-c9ecf0f59c3b.webp?v=1714977393","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5946e342629a4d605a833caa38f99d30193253cf_5d77af07-4138-446d-afa9-46a209086c5d.webp?v=1714977395","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ab1de59b3f3ae59afe06b4c92f6a6873facb69c_abcd264b-6a97-43c0-abde-a031d4b17335.webp?v=1714977398","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e421d187a154ac17558684fd41665f8a0b58b21e_2363fdb6-6cca-46aa-b93b-007ae60e8f40.webp?v=1714977400","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee44dcc22f00d6b97bd94283844945d31afd0717_8712d4bf-5fe6-4579-a001-cd8ed7d477e6.webp?v=1714977402"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa183307a72cf6f1d2c7a14e8ed9df09ad62316d_70f83c31-acc6-47d6-816c-bd100e58db5d.webp?v=1714977382","options":["color"],"media":[{"alt":null,"id":23897277694051,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa183307a72cf6f1d2c7a14e8ed9df09ad62316d_70f83c31-acc6-47d6-816c-bd100e58db5d.webp?v=1714977382"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa183307a72cf6f1d2c7a14e8ed9df09ad62316d_70f83c31-acc6-47d6-816c-bd100e58db5d.webp?v=1714977382","width":2000},{"alt":null,"id":23897278021731,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b48884952fc2001d3220b98670325fabbfb142fc_97f47425-3db9-4a18-ac75-27887d1d42bf.webp?v=1714977384"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b48884952fc2001d3220b98670325fabbfb142fc_97f47425-3db9-4a18-ac75-27887d1d42bf.webp?v=1714977384","width":2000},{"alt":null,"id":23897278677091,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0856b94e562b9fce55d9cf26565f63fdea81a77d_3e356388-8883-4095-a6ae-edee2a8cc512.webp?v=1714977386"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0856b94e562b9fce55d9cf26565f63fdea81a77d_3e356388-8883-4095-a6ae-edee2a8cc512.webp?v=1714977386","width":2000},{"alt":null,"id":23897279266915,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8293b338f88159de47cfb1c51ee66ceb1e51bb5f_7501b41b-115b-498e-be99-3f02f9f21d69.webp?v=1714977389"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8293b338f88159de47cfb1c51ee66ceb1e51bb5f_7501b41b-115b-498e-be99-3f02f9f21d69.webp?v=1714977389","width":2000},{"alt":null,"id":23897279823971,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a1e0cc42c9c7791bab3048d25dbae599cd088394_c92cea40-683a-4996-95c7-ecbfc6bffb7a.webp?v=1714977391"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a1e0cc42c9c7791bab3048d25dbae599cd088394_c92cea40-683a-4996-95c7-ecbfc6bffb7a.webp?v=1714977391","width":2000},{"alt":null,"id":23897280282723,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aaf44b4554164fa4517e2360220b92823abd4379_99c62e27-400b-465f-8a2c-c9ecf0f59c3b.webp?v=1714977393"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aaf44b4554164fa4517e2360220b92823abd4379_99c62e27-400b-465f-8a2c-c9ecf0f59c3b.webp?v=1714977393","width":2000},{"alt":null,"id":23897280708707,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5946e342629a4d605a833caa38f99d30193253cf_5d77af07-4138-446d-afa9-46a209086c5d.webp?v=1714977395"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5946e342629a4d605a833caa38f99d30193253cf_5d77af07-4138-446d-afa9-46a209086c5d.webp?v=1714977395","width":2000},{"alt":null,"id":23897281265763,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ab1de59b3f3ae59afe06b4c92f6a6873facb69c_abcd264b-6a97-43c0-abde-a031d4b17335.webp?v=1714977398"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ab1de59b3f3ae59afe06b4c92f6a6873facb69c_abcd264b-6a97-43c0-abde-a031d4b17335.webp?v=1714977398","width":2000},{"alt":null,"id":23897281691747,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e421d187a154ac17558684fd41665f8a0b58b21e_2363fdb6-6cca-46aa-b93b-007ae60e8f40.webp?v=1714977400"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e421d187a154ac17558684fd41665f8a0b58b21e_2363fdb6-6cca-46aa-b93b-007ae60e8f40.webp?v=1714977400","width":2000},{"alt":null,"id":23897282314339,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee44dcc22f00d6b97bd94283844945d31afd0717_8712d4bf-5fe6-4579-a001-cd8ed7d477e6.webp?v=1714977402"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee44dcc22f00d6b97bd94283844945d31afd0717_8712d4bf-5fe6-4579-a001-cd8ed7d477e6.webp?v=1714977402","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41918595137635,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB45","requires_shipping":true,"taxable":true,"featured_image":{"id":31491869442147,"product_id":7416333369443,"position":10,"created_at":"2024-05-06T14:36:42+08:00","updated_at":"2024-05-06T14:36:42+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee44dcc22f00d6b97bd94283844945d31afd0717_8712d4bf-5fe6-4579-a001-cd8ed7d477e6.webp?v=1714977402","variant_ids":[41918595137635]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 星戰Logo黑武士款 - 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":"NPB0105424-PB45","featured_media":{"alt":null,"id":23897282314339,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee44dcc22f00d6b97bd94283844945d31afd0717_8712d4bf-5fe6-4579-a001-cd8ed7d477e6.webp?v=1714977402"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41918595137635,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB45","requires_shipping":true,"taxable":true,"featured_image":{"id":31491869442147,"product_id":7416333369443,"position":10,"created_at":"2024-05-06T14:36:42+08:00","updated_at":"2024-05-06T14:36:42+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee44dcc22f00d6b97bd94283844945d31afd0717_8712d4bf-5fe6-4579-a001-cd8ed7d477e6.webp?v=1714977402","variant_ids":[41918595137635]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 星戰Logo黑武士款 - 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":"NPB0105424-PB45","featured_media":{"alt":null,"id":23897282314339,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee44dcc22f00d6b97bd94283844945d31afd0717_8712d4bf-5fe6-4579-a001-cd8ed7d477e6.webp?v=1714977402"}},"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: "停產" }