$product = {"id":7415102701667,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 星際大戰徽章-潮流系列","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb50","description":null,"published_at":"2024-06-11T17:58:02+08:00","created_at":"2024-05-05T20:23:15+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 12 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-star-wars","Top50","type-Mod NX Printable MagSafe Printable"],"price":110000,"price_min":110000,"price_max":110000,"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":41911891198051,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB50","requires_shipping":true,"taxable":true,"featured_image":{"id":31488166920291,"product_id":7415102701667,"position":4,"created_at":"2024-05-05T20:23:25+08:00","updated_at":"2024-05-05T20:23:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d407577fd56c4cc100ef39af3d948fb786f85430_2173a3bd-0134-4c1f-afe3-82708634a0c9.webp?v=1714911805","variant_ids":[41911891198051]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 星際大戰徽章-潮流系列 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-PB50","featured_media":{"alt":null,"id":23893511602275,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d407577fd56c4cc100ef39af3d948fb786f85430_2173a3bd-0134-4c1f-afe3-82708634a0c9.webp?v=1714911805"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fa97219e2481ef05e4fb7af6f4008bf1c5ce97d_8306b26c-4533-482a-9785-eb0938a6fcd9.webp?v=1714911797","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef3e03ca22122b66950611fde8a584c71985dd1d_b01d6e8f-2d1c-4a4a-b0e2-f395b1739d4f.webp?v=1714911800","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c3cda95d75258d292071708c6d2edacf7ae3df0c_62c38df5-d33e-4054-80b5-10f20732a7ee.webp?v=1714911802","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d407577fd56c4cc100ef39af3d948fb786f85430_2173a3bd-0134-4c1f-afe3-82708634a0c9.webp?v=1714911805","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2dae75f660bf47ae18f9149af28829efd77b876d_c61326fa-2c02-42d2-a72b-952424e9e72d.webp?v=1714911807","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2dec4bbdac67c3d71c85cea9ce8b82d18f66f022_2765a4ee-da24-446d-abde-714ce898ab06.webp?v=1714911809","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c2de6a3bc24a9af4a0f002d24fcc9dc3025c283_4a6b5a75-b5e3-4b0b-bfb9-a27c05c41f36.webp?v=1714911812","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44074616713d95aa37d8678a86e5cb8f9b0f6065_6d0ab291-86ad-40de-b3bf-f21f3218e3c0.webp?v=1714911815","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88ff81ae8c610a79203baf904fdb44f82b5cbb1a_1c8dfe5a-1fb8-4c11-8418-ffde235d39b0.webp?v=1714911817","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a30034521faeb38e9351604175acbfed5ab9088_73e3a86a-7ecf-48ba-9c64-00dc84df68d7.webp?v=1714911819","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6df0fdf55084715483195f60b9dd2794391e03f_52a94f33-3169-4518-b25e-513b7b132bad.webp?v=1714911822"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fa97219e2481ef05e4fb7af6f4008bf1c5ce97d_8306b26c-4533-482a-9785-eb0938a6fcd9.webp?v=1714911797","options":["color"],"media":[{"alt":null,"id":23893509439587,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fa97219e2481ef05e4fb7af6f4008bf1c5ce97d_8306b26c-4533-482a-9785-eb0938a6fcd9.webp?v=1714911797"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fa97219e2481ef05e4fb7af6f4008bf1c5ce97d_8306b26c-4533-482a-9785-eb0938a6fcd9.webp?v=1714911797","width":2000},{"alt":null,"id":23893509931107,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef3e03ca22122b66950611fde8a584c71985dd1d_b01d6e8f-2d1c-4a4a-b0e2-f395b1739d4f.webp?v=1714911800"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef3e03ca22122b66950611fde8a584c71985dd1d_b01d6e8f-2d1c-4a4a-b0e2-f395b1739d4f.webp?v=1714911800","width":2000},{"alt":null,"id":23893510488163,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c3cda95d75258d292071708c6d2edacf7ae3df0c_62c38df5-d33e-4054-80b5-10f20732a7ee.webp?v=1714911802"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c3cda95d75258d292071708c6d2edacf7ae3df0c_62c38df5-d33e-4054-80b5-10f20732a7ee.webp?v=1714911802","width":2000},{"alt":null,"id":23893511602275,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d407577fd56c4cc100ef39af3d948fb786f85430_2173a3bd-0134-4c1f-afe3-82708634a0c9.webp?v=1714911805"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d407577fd56c4cc100ef39af3d948fb786f85430_2173a3bd-0134-4c1f-afe3-82708634a0c9.webp?v=1714911805","width":2000},{"alt":null,"id":23893512061027,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2dae75f660bf47ae18f9149af28829efd77b876d_c61326fa-2c02-42d2-a72b-952424e9e72d.webp?v=1714911807"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2dae75f660bf47ae18f9149af28829efd77b876d_c61326fa-2c02-42d2-a72b-952424e9e72d.webp?v=1714911807","width":2000},{"alt":null,"id":23893512880227,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2dec4bbdac67c3d71c85cea9ce8b82d18f66f022_2765a4ee-da24-446d-abde-714ce898ab06.webp?v=1714911809"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2dec4bbdac67c3d71c85cea9ce8b82d18f66f022_2765a4ee-da24-446d-abde-714ce898ab06.webp?v=1714911809","width":2000},{"alt":null,"id":23893513764963,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c2de6a3bc24a9af4a0f002d24fcc9dc3025c283_4a6b5a75-b5e3-4b0b-bfb9-a27c05c41f36.webp?v=1714911812"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c2de6a3bc24a9af4a0f002d24fcc9dc3025c283_4a6b5a75-b5e3-4b0b-bfb9-a27c05c41f36.webp?v=1714911812","width":2000},{"alt":null,"id":23893514092643,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44074616713d95aa37d8678a86e5cb8f9b0f6065_6d0ab291-86ad-40de-b3bf-f21f3218e3c0.webp?v=1714911815"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44074616713d95aa37d8678a86e5cb8f9b0f6065_6d0ab291-86ad-40de-b3bf-f21f3218e3c0.webp?v=1714911815","width":2000},{"alt":null,"id":23893514420323,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88ff81ae8c610a79203baf904fdb44f82b5cbb1a_1c8dfe5a-1fb8-4c11-8418-ffde235d39b0.webp?v=1714911817"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88ff81ae8c610a79203baf904fdb44f82b5cbb1a_1c8dfe5a-1fb8-4c11-8418-ffde235d39b0.webp?v=1714911817","width":2000},{"alt":null,"id":23893514616931,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a30034521faeb38e9351604175acbfed5ab9088_73e3a86a-7ecf-48ba-9c64-00dc84df68d7.webp?v=1714911819"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a30034521faeb38e9351604175acbfed5ab9088_73e3a86a-7ecf-48ba-9c64-00dc84df68d7.webp?v=1714911819","width":2000},{"alt":null,"id":23893515206755,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6df0fdf55084715483195f60b9dd2794391e03f_52a94f33-3169-4518-b25e-513b7b132bad.webp?v=1714911822"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6df0fdf55084715483195f60b9dd2794391e03f_52a94f33-3169-4518-b25e-513b7b132bad.webp?v=1714911822","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911891198051,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB50","requires_shipping":true,"taxable":true,"featured_image":{"id":31488166920291,"product_id":7415102701667,"position":4,"created_at":"2024-05-05T20:23:25+08:00","updated_at":"2024-05-05T20:23:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d407577fd56c4cc100ef39af3d948fb786f85430_2173a3bd-0134-4c1f-afe3-82708634a0c9.webp?v=1714911805","variant_ids":[41911891198051]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 星際大戰徽章-潮流系列 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-PB50","featured_media":{"alt":null,"id":23893511602275,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d407577fd56c4cc100ef39af3d948fb786f85430_2173a3bd-0134-4c1f-afe3-82708634a0c9.webp?v=1714911805"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911891198051,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB50","requires_shipping":true,"taxable":true,"featured_image":{"id":31488166920291,"product_id":7415102701667,"position":4,"created_at":"2024-05-05T20:23:25+08:00","updated_at":"2024-05-05T20:23:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d407577fd56c4cc100ef39af3d948fb786f85430_2173a3bd-0134-4c1f-afe3-82708634a0c9.webp?v=1714911805","variant_ids":[41911891198051]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 星際大戰徽章-潮流系列 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-PB50","featured_media":{"alt":null,"id":23893511602275,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d407577fd56c4cc100ef39af3d948fb786f85430_2173a3bd-0134-4c1f-afe3-82708634a0c9.webp?v=1714911805"}},"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: "停產" }