$product = {"id":7408507388003,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-黑白條紋","handle":"iphone-12-mini-mod-nx-printable-pb19","description":null,"published_at":"2024-06-11T16:39:11+08:00","created_at":"2024-05-03T15:40:16+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":41886274322531,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB19","requires_shipping":true,"taxable":true,"featured_image":{"id":31472455581795,"product_id":7408507388003,"position":4,"created_at":"2024-05-03T15:40:26+08:00","updated_at":"2024-05-03T15:40:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b452b589a1ea9dd21f50aa1aa11ed5ebbacfe906_72b420c9-2300-4df4-abf8-b48d164f2f5d.webp?v=1714722026","variant_ids":[41886274322531]},"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-PB19","featured_media":{"alt":null,"id":23877372641379,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b452b589a1ea9dd21f50aa1aa11ed5ebbacfe906_72b420c9-2300-4df4-abf8-b48d164f2f5d.webp?v=1714722026"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e84971e93a6b3cdb6a90c76f6ece4051cc3b07a_98f10893-731e-4fe5-b3c2-e146e0573cbf.webp?v=1714722019","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ccfe21050a88416f82d0bb31e603330582b8e5c_aa79aa5a-3d78-425a-abce-6b0d78b6da3b.webp?v=1714722021","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2277b8f85c2e08f644fe5756ec87f908d8c02e1d_c1c2361c-0fba-4638-ad1b-3337a5c923fc.webp?v=1714722023","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b452b589a1ea9dd21f50aa1aa11ed5ebbacfe906_72b420c9-2300-4df4-abf8-b48d164f2f5d.webp?v=1714722026","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a504abe036347e48468bf18d06b3caa9fc238b5f_672b7db0-3930-42a2-a311-bcf8695cd903.webp?v=1714722028","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df7fc422fad5ffbe7f62dcb30a1bc8fe4f51f99c_9faf1712-6a06-47ed-b671-b838675fa15c.webp?v=1714722030","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b318db37ee576343a7dbb9d75f6905d17519771f_3a425e49-b57c-4e9c-a6dc-0a8454a3458d.webp?v=1714722033","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5f998ab7b429366cd1787cf69fdb555761ad963_6391d6cd-2174-40ef-b7ed-77065b7fe5ca.webp?v=1714722035","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cbc9980a7cb9247d448272b10c5a4768904322ed_d681c82c-faf3-434e-a8b0-2777a3248606.webp?v=1714722038","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0882b7f2b59f0de910a6578b8531039f999bb6cc_ef7b17c6-1c92-42e1-8401-83ab5ce17338.webp?v=1714722040","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69388dee06168f26e6ef62823a5341658c8fe80d_7b2b86bb-5c3c-4d6b-b395-249f5dea5355.webp?v=1714722042"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e84971e93a6b3cdb6a90c76f6ece4051cc3b07a_98f10893-731e-4fe5-b3c2-e146e0573cbf.webp?v=1714722019","options":["color"],"media":[{"alt":null,"id":23877371134051,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e84971e93a6b3cdb6a90c76f6ece4051cc3b07a_98f10893-731e-4fe5-b3c2-e146e0573cbf.webp?v=1714722019"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e84971e93a6b3cdb6a90c76f6ece4051cc3b07a_98f10893-731e-4fe5-b3c2-e146e0573cbf.webp?v=1714722019","width":2000},{"alt":null,"id":23877371625571,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ccfe21050a88416f82d0bb31e603330582b8e5c_aa79aa5a-3d78-425a-abce-6b0d78b6da3b.webp?v=1714722021"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ccfe21050a88416f82d0bb31e603330582b8e5c_aa79aa5a-3d78-425a-abce-6b0d78b6da3b.webp?v=1714722021","width":2000},{"alt":null,"id":23877372051555,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2277b8f85c2e08f644fe5756ec87f908d8c02e1d_c1c2361c-0fba-4638-ad1b-3337a5c923fc.webp?v=1714722023"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2277b8f85c2e08f644fe5756ec87f908d8c02e1d_c1c2361c-0fba-4638-ad1b-3337a5c923fc.webp?v=1714722023","width":2000},{"alt":null,"id":23877372641379,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b452b589a1ea9dd21f50aa1aa11ed5ebbacfe906_72b420c9-2300-4df4-abf8-b48d164f2f5d.webp?v=1714722026"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b452b589a1ea9dd21f50aa1aa11ed5ebbacfe906_72b420c9-2300-4df4-abf8-b48d164f2f5d.webp?v=1714722026","width":2000},{"alt":null,"id":23877373526115,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a504abe036347e48468bf18d06b3caa9fc238b5f_672b7db0-3930-42a2-a311-bcf8695cd903.webp?v=1714722028"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a504abe036347e48468bf18d06b3caa9fc238b5f_672b7db0-3930-42a2-a311-bcf8695cd903.webp?v=1714722028","width":2000},{"alt":null,"id":23877374017635,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df7fc422fad5ffbe7f62dcb30a1bc8fe4f51f99c_9faf1712-6a06-47ed-b671-b838675fa15c.webp?v=1714722030"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df7fc422fad5ffbe7f62dcb30a1bc8fe4f51f99c_9faf1712-6a06-47ed-b671-b838675fa15c.webp?v=1714722030","width":2000},{"alt":null,"id":23877374574691,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b318db37ee576343a7dbb9d75f6905d17519771f_3a425e49-b57c-4e9c-a6dc-0a8454a3458d.webp?v=1714722033"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b318db37ee576343a7dbb9d75f6905d17519771f_3a425e49-b57c-4e9c-a6dc-0a8454a3458d.webp?v=1714722033","width":2000},{"alt":null,"id":23877375033443,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5f998ab7b429366cd1787cf69fdb555761ad963_6391d6cd-2174-40ef-b7ed-77065b7fe5ca.webp?v=1714722035"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5f998ab7b429366cd1787cf69fdb555761ad963_6391d6cd-2174-40ef-b7ed-77065b7fe5ca.webp?v=1714722035","width":2000},{"alt":null,"id":23877375557731,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cbc9980a7cb9247d448272b10c5a4768904322ed_d681c82c-faf3-434e-a8b0-2777a3248606.webp?v=1714722038"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cbc9980a7cb9247d448272b10c5a4768904322ed_d681c82c-faf3-434e-a8b0-2777a3248606.webp?v=1714722038","width":2000},{"alt":null,"id":23877375950947,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0882b7f2b59f0de910a6578b8531039f999bb6cc_ef7b17c6-1c92-42e1-8401-83ab5ce17338.webp?v=1714722040"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0882b7f2b59f0de910a6578b8531039f999bb6cc_ef7b17c6-1c92-42e1-8401-83ab5ce17338.webp?v=1714722040","width":2000},{"alt":null,"id":23877376540771,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69388dee06168f26e6ef62823a5341658c8fe80d_7b2b86bb-5c3c-4d6b-b395-249f5dea5355.webp?v=1714722042"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69388dee06168f26e6ef62823a5341658c8fe80d_7b2b86bb-5c3c-4d6b-b395-249f5dea5355.webp?v=1714722042","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41886274322531,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB19","requires_shipping":true,"taxable":true,"featured_image":{"id":31472455581795,"product_id":7408507388003,"position":4,"created_at":"2024-05-03T15:40:26+08:00","updated_at":"2024-05-03T15:40:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b452b589a1ea9dd21f50aa1aa11ed5ebbacfe906_72b420c9-2300-4df4-abf8-b48d164f2f5d.webp?v=1714722026","variant_ids":[41886274322531]},"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-PB19","featured_media":{"alt":null,"id":23877372641379,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b452b589a1ea9dd21f50aa1aa11ed5ebbacfe906_72b420c9-2300-4df4-abf8-b48d164f2f5d.webp?v=1714722026"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41886274322531,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB19","requires_shipping":true,"taxable":true,"featured_image":{"id":31472455581795,"product_id":7408507388003,"position":4,"created_at":"2024-05-03T15:40:26+08:00","updated_at":"2024-05-03T15:40:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b452b589a1ea9dd21f50aa1aa11ed5ebbacfe906_72b420c9-2300-4df4-abf8-b48d164f2f5d.webp?v=1714722026","variant_ids":[41886274322531]},"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-PB19","featured_media":{"alt":null,"id":23877372641379,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b452b589a1ea9dd21f50aa1aa11ed5ebbacfe906_72b420c9-2300-4df4-abf8-b48d164f2f5d.webp?v=1714722026"}},"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: "停產" }