$product = {"id":7408398139491,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 星戰漫畫-貼紙系列","handle":"iphone-12-mini-mod-nx-printable-pb83","description":null,"published_at":"2024-06-11T16:36:08+08:00","created_at":"2024-05-03T15:18:40+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":41885031301219,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB83","requires_shipping":true,"taxable":true,"featured_image":{"id":31472160440419,"product_id":7408398139491,"position":8,"created_at":"2024-05-03T15:18:59+08:00","updated_at":"2024-05-03T15:18:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06bbf419a80dc7deb847ea6c182517404e03f7c9_74dcd07d-dfa6-4723-95e6-ae88fed42bf9.webp?v=1714720739","variant_ids":[41885031301219]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0118424-PB83","featured_media":{"alt":null,"id":23877076058211,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06bbf419a80dc7deb847ea6c182517404e03f7c9_74dcd07d-dfa6-4723-95e6-ae88fed42bf9.webp?v=1714720739"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67c205725e06868587d0bae12b216f99eaf5a3a5_c4ca6f84-33b6-40e6-95ed-612aedc2bc9c.webp?v=1714720722","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40bd2b4b9d95f30bcb30daa4cfffc9b885b47eb0_399e4561-6900-4d68-bd5b-1e47aa6f1754.webp?v=1714720725","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be742886cbde257f10390f0550c19977f634cc73_d76e32a2-3e90-4869-bec8-ec7fc22ffdee.webp?v=1714720727","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4c2a09692ce2a16281c4879d369b43630815411a_54312327-7f5f-4992-8d92-afe4658bb10a.webp?v=1714720730","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f3a1ee504e417482b8fb4abb2252dd755ada701_d621d743-a6ce-4109-b04a-16202990986b.webp?v=1714720732","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d4a9fdc7de0f0bf70c40072c128f5efd268bfd1_d9ae8918-c099-4739-83da-5b8e1f8e60b4.webp?v=1714720734","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a879b87162e27cb30e5a7e746cb3760dde9baf6f_9c13de72-dc22-428c-8502-6089582c648c.webp?v=1714720737","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06bbf419a80dc7deb847ea6c182517404e03f7c9_74dcd07d-dfa6-4723-95e6-ae88fed42bf9.webp?v=1714720739","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b15bbb4eba3a4b8cf6731f275bc1feda2559b1c6_e191201f-ae7b-4c16-ad24-34027079a639.webp?v=1714720741","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f2e907e3b2de8b25b618ac91a61b447aa5a03b5_d326e199-ad42-41ee-b453-1a9b9c30b7e4.webp?v=1714720744","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7872601b1986bf80ef19fdd28a075af9aa1cad78_984596f8-1ea1-478e-8c69-8310e8c0e873.webp?v=1714720746"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67c205725e06868587d0bae12b216f99eaf5a3a5_c4ca6f84-33b6-40e6-95ed-612aedc2bc9c.webp?v=1714720722","options":["color"],"media":[{"alt":null,"id":23877072060515,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67c205725e06868587d0bae12b216f99eaf5a3a5_c4ca6f84-33b6-40e6-95ed-612aedc2bc9c.webp?v=1714720722"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67c205725e06868587d0bae12b216f99eaf5a3a5_c4ca6f84-33b6-40e6-95ed-612aedc2bc9c.webp?v=1714720722","width":2000},{"alt":null,"id":23877072650339,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40bd2b4b9d95f30bcb30daa4cfffc9b885b47eb0_399e4561-6900-4d68-bd5b-1e47aa6f1754.webp?v=1714720725"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40bd2b4b9d95f30bcb30daa4cfffc9b885b47eb0_399e4561-6900-4d68-bd5b-1e47aa6f1754.webp?v=1714720725","width":2000},{"alt":null,"id":23877073076323,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be742886cbde257f10390f0550c19977f634cc73_d76e32a2-3e90-4869-bec8-ec7fc22ffdee.webp?v=1714720727"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be742886cbde257f10390f0550c19977f634cc73_d76e32a2-3e90-4869-bec8-ec7fc22ffdee.webp?v=1714720727","width":2000},{"alt":null,"id":23877073928291,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4c2a09692ce2a16281c4879d369b43630815411a_54312327-7f5f-4992-8d92-afe4658bb10a.webp?v=1714720730"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4c2a09692ce2a16281c4879d369b43630815411a_54312327-7f5f-4992-8d92-afe4658bb10a.webp?v=1714720730","width":2000},{"alt":null,"id":23877074321507,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f3a1ee504e417482b8fb4abb2252dd755ada701_d621d743-a6ce-4109-b04a-16202990986b.webp?v=1714720732"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f3a1ee504e417482b8fb4abb2252dd755ada701_d621d743-a6ce-4109-b04a-16202990986b.webp?v=1714720732","width":2000},{"alt":null,"id":23877074944099,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d4a9fdc7de0f0bf70c40072c128f5efd268bfd1_d9ae8918-c099-4739-83da-5b8e1f8e60b4.webp?v=1714720734"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d4a9fdc7de0f0bf70c40072c128f5efd268bfd1_d9ae8918-c099-4739-83da-5b8e1f8e60b4.webp?v=1714720734","width":2000},{"alt":null,"id":23877075435619,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a879b87162e27cb30e5a7e746cb3760dde9baf6f_9c13de72-dc22-428c-8502-6089582c648c.webp?v=1714720737"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a879b87162e27cb30e5a7e746cb3760dde9baf6f_9c13de72-dc22-428c-8502-6089582c648c.webp?v=1714720737","width":2000},{"alt":null,"id":23877076058211,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06bbf419a80dc7deb847ea6c182517404e03f7c9_74dcd07d-dfa6-4723-95e6-ae88fed42bf9.webp?v=1714720739"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06bbf419a80dc7deb847ea6c182517404e03f7c9_74dcd07d-dfa6-4723-95e6-ae88fed42bf9.webp?v=1714720739","width":2000},{"alt":null,"id":23877076615267,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b15bbb4eba3a4b8cf6731f275bc1feda2559b1c6_e191201f-ae7b-4c16-ad24-34027079a639.webp?v=1714720741"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b15bbb4eba3a4b8cf6731f275bc1feda2559b1c6_e191201f-ae7b-4c16-ad24-34027079a639.webp?v=1714720741","width":2000},{"alt":null,"id":23877077631075,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f2e907e3b2de8b25b618ac91a61b447aa5a03b5_d326e199-ad42-41ee-b453-1a9b9c30b7e4.webp?v=1714720744"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f2e907e3b2de8b25b618ac91a61b447aa5a03b5_d326e199-ad42-41ee-b453-1a9b9c30b7e4.webp?v=1714720744","width":2000},{"alt":null,"id":23877078286435,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7872601b1986bf80ef19fdd28a075af9aa1cad78_984596f8-1ea1-478e-8c69-8310e8c0e873.webp?v=1714720746"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7872601b1986bf80ef19fdd28a075af9aa1cad78_984596f8-1ea1-478e-8c69-8310e8c0e873.webp?v=1714720746","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41885031301219,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB83","requires_shipping":true,"taxable":true,"featured_image":{"id":31472160440419,"product_id":7408398139491,"position":8,"created_at":"2024-05-03T15:18:59+08:00","updated_at":"2024-05-03T15:18:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06bbf419a80dc7deb847ea6c182517404e03f7c9_74dcd07d-dfa6-4723-95e6-ae88fed42bf9.webp?v=1714720739","variant_ids":[41885031301219]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0118424-PB83","featured_media":{"alt":null,"id":23877076058211,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06bbf419a80dc7deb847ea6c182517404e03f7c9_74dcd07d-dfa6-4723-95e6-ae88fed42bf9.webp?v=1714720739"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41885031301219,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB83","requires_shipping":true,"taxable":true,"featured_image":{"id":31472160440419,"product_id":7408398139491,"position":8,"created_at":"2024-05-03T15:18:59+08:00","updated_at":"2024-05-03T15:18:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06bbf419a80dc7deb847ea6c182517404e03f7c9_74dcd07d-dfa6-4723-95e6-ae88fed42bf9.webp?v=1714720739","variant_ids":[41885031301219]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0118424-PB83","featured_media":{"alt":null,"id":23877076058211,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06bbf419a80dc7deb847ea6c182517404e03f7c9_74dcd07d-dfa6-4723-95e6-ae88fed42bf9.webp?v=1714720739"}},"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: "停產" }