$product = {"id":7408503324771,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 路克\u0026莉亞公主-電影海報","handle":"iphone-12-mini-mod-nx-printable-pb102","description":null,"published_at":"2024-06-11T16:39:04+08:00","created_at":"2024-05-03T15:39:26+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 12 mini","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":41886221467747,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB102","requires_shipping":true,"taxable":true,"featured_image":{"id":31472445358179,"product_id":7408503324771,"position":6,"created_at":"2024-05-03T15:39:40+08:00","updated_at":"2024-05-03T15:39:40+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa34496f8e308e233c13ea87f1f5b16eb695fe0a_b84a1122-5979-410e-9306-04cda2650e56.webp?v=1714721980","variant_ids":[41886221467747]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 路克\u0026莉亞公主-電影海報 - 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":"NPB0118424-PB102","featured_media":{"alt":null,"id":23877362352227,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa34496f8e308e233c13ea87f1f5b16eb695fe0a_b84a1122-5979-410e-9306-04cda2650e56.webp?v=1714721980"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ad192c322566e6141a4d44773e23c0f10a2beb9_ede36fca-6500-48cb-8ba5-83638bef2b20.webp?v=1714721968","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c0ec78ed6e341db0140a718ce2ebefef86b032c4_47c37a70-df78-4302-aaf8-ec61c5da3e06.webp?v=1714721971","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/159cfc0856d638e247d7d39e1faba60cc1a9f537_067f1493-4c4f-4f2a-b848-7f69a4a144c8.webp?v=1714721973","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f93b2027ca6109dc426644e99939dc9adcf66178_81c795c4-abe3-4010-9278-58e6413502b8.webp?v=1714721975","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cab4754b5d201f08b748cefc6b1b0b8e815f3c33_504afc36-c00d-4f87-91a6-e5e0365c3775.webp?v=1714721978","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa34496f8e308e233c13ea87f1f5b16eb695fe0a_b84a1122-5979-410e-9306-04cda2650e56.webp?v=1714721980","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1bcc271c853447669d1584ae811fc2e77be1064b_45295a2b-06df-495a-a813-4f83e3748a3d.webp?v=1714721982","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b8602207c0f83f6ca0ca7462b6693a9d642fabd_00e85e97-dbc9-4765-8806-91bfc0cff771.webp?v=1714721985","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3c8331bdf130d61804373a74bb04582d6085d6a_bdf0eadf-85d1-452f-9175-0e9ac24d6d93.webp?v=1714721987","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a681d7457db9ef4d42cf828bd47d6103ebd1d8cd_99332c59-dd7f-408b-97c3-bf59250552ea.webp?v=1714721989","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2ae738baaaf9b79c3bd7f0940adc72df7cac4ae_8dfa7d5a-d7e9-406d-a717-14146ab7fecf.webp?v=1714721992"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ad192c322566e6141a4d44773e23c0f10a2beb9_ede36fca-6500-48cb-8ba5-83638bef2b20.webp?v=1714721968","options":["color"],"media":[{"alt":null,"id":23877359632483,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ad192c322566e6141a4d44773e23c0f10a2beb9_ede36fca-6500-48cb-8ba5-83638bef2b20.webp?v=1714721968"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ad192c322566e6141a4d44773e23c0f10a2beb9_ede36fca-6500-48cb-8ba5-83638bef2b20.webp?v=1714721968","width":2000},{"alt":null,"id":23877360222307,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c0ec78ed6e341db0140a718ce2ebefef86b032c4_47c37a70-df78-4302-aaf8-ec61c5da3e06.webp?v=1714721971"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c0ec78ed6e341db0140a718ce2ebefef86b032c4_47c37a70-df78-4302-aaf8-ec61c5da3e06.webp?v=1714721971","width":2000},{"alt":null,"id":23877360615523,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/159cfc0856d638e247d7d39e1faba60cc1a9f537_067f1493-4c4f-4f2a-b848-7f69a4a144c8.webp?v=1714721973"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/159cfc0856d638e247d7d39e1faba60cc1a9f537_067f1493-4c4f-4f2a-b848-7f69a4a144c8.webp?v=1714721973","width":2000},{"alt":null,"id":23877361205347,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f93b2027ca6109dc426644e99939dc9adcf66178_81c795c4-abe3-4010-9278-58e6413502b8.webp?v=1714721975"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f93b2027ca6109dc426644e99939dc9adcf66178_81c795c4-abe3-4010-9278-58e6413502b8.webp?v=1714721975","width":2000},{"alt":null,"id":23877361827939,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cab4754b5d201f08b748cefc6b1b0b8e815f3c33_504afc36-c00d-4f87-91a6-e5e0365c3775.webp?v=1714721978"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cab4754b5d201f08b748cefc6b1b0b8e815f3c33_504afc36-c00d-4f87-91a6-e5e0365c3775.webp?v=1714721978","width":2000},{"alt":null,"id":23877362352227,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa34496f8e308e233c13ea87f1f5b16eb695fe0a_b84a1122-5979-410e-9306-04cda2650e56.webp?v=1714721980"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa34496f8e308e233c13ea87f1f5b16eb695fe0a_b84a1122-5979-410e-9306-04cda2650e56.webp?v=1714721980","width":2000},{"alt":null,"id":23877362942051,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1bcc271c853447669d1584ae811fc2e77be1064b_45295a2b-06df-495a-a813-4f83e3748a3d.webp?v=1714721982"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1bcc271c853447669d1584ae811fc2e77be1064b_45295a2b-06df-495a-a813-4f83e3748a3d.webp?v=1714721982","width":2000},{"alt":null,"id":23877363531875,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b8602207c0f83f6ca0ca7462b6693a9d642fabd_00e85e97-dbc9-4765-8806-91bfc0cff771.webp?v=1714721985"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b8602207c0f83f6ca0ca7462b6693a9d642fabd_00e85e97-dbc9-4765-8806-91bfc0cff771.webp?v=1714721985","width":2000},{"alt":null,"id":23877364088931,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3c8331bdf130d61804373a74bb04582d6085d6a_bdf0eadf-85d1-452f-9175-0e9ac24d6d93.webp?v=1714721987"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3c8331bdf130d61804373a74bb04582d6085d6a_bdf0eadf-85d1-452f-9175-0e9ac24d6d93.webp?v=1714721987","width":2000},{"alt":null,"id":23877364711523,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a681d7457db9ef4d42cf828bd47d6103ebd1d8cd_99332c59-dd7f-408b-97c3-bf59250552ea.webp?v=1714721989"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a681d7457db9ef4d42cf828bd47d6103ebd1d8cd_99332c59-dd7f-408b-97c3-bf59250552ea.webp?v=1714721989","width":2000},{"alt":null,"id":23877365235811,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2ae738baaaf9b79c3bd7f0940adc72df7cac4ae_8dfa7d5a-d7e9-406d-a717-14146ab7fecf.webp?v=1714721992"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2ae738baaaf9b79c3bd7f0940adc72df7cac4ae_8dfa7d5a-d7e9-406d-a717-14146ab7fecf.webp?v=1714721992","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41886221467747,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB102","requires_shipping":true,"taxable":true,"featured_image":{"id":31472445358179,"product_id":7408503324771,"position":6,"created_at":"2024-05-03T15:39:40+08:00","updated_at":"2024-05-03T15:39:40+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa34496f8e308e233c13ea87f1f5b16eb695fe0a_b84a1122-5979-410e-9306-04cda2650e56.webp?v=1714721980","variant_ids":[41886221467747]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 路克\u0026莉亞公主-電影海報 - 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":"NPB0118424-PB102","featured_media":{"alt":null,"id":23877362352227,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa34496f8e308e233c13ea87f1f5b16eb695fe0a_b84a1122-5979-410e-9306-04cda2650e56.webp?v=1714721980"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41886221467747,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB102","requires_shipping":true,"taxable":true,"featured_image":{"id":31472445358179,"product_id":7408503324771,"position":6,"created_at":"2024-05-03T15:39:40+08:00","updated_at":"2024-05-03T15:39:40+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa34496f8e308e233c13ea87f1f5b16eb695fe0a_b84a1122-5979-410e-9306-04cda2650e56.webp?v=1714721980","variant_ids":[41886221467747]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 路克\u0026莉亞公主-電影海報 - 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":"NPB0118424-PB102","featured_media":{"alt":null,"id":23877362352227,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa34496f8e308e233c13ea87f1f5b16eb695fe0a_b84a1122-5979-410e-9306-04cda2650e56.webp?v=1714721980"}},"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: "停產" }