$product = {"id":7415069245539,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - POP千年鷹","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb27","description":null,"published_at":"2024-06-11T17:57:08+08:00","created_at":"2024-05-05T20:16:53+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":41911541956707,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB27","requires_shipping":true,"taxable":true,"featured_image":{"id":31488073203811,"product_id":7415069245539,"position":2,"created_at":"2024-05-05T20:16:58+08:00","updated_at":"2024-05-05T20:16:58+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00cf1ea1d9378f2420d382086f699b2a049cd218_35eb8c13-c5dc-4687-9bb3-19788585c4d1.webp?v=1714911418","variant_ids":[41911541956707]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - POP千年鷹 - 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-PB27","featured_media":{"alt":null,"id":23893417656419,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00cf1ea1d9378f2420d382086f699b2a049cd218_35eb8c13-c5dc-4687-9bb3-19788585c4d1.webp?v=1714911418"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d7591d3be4fac3d1556c32bbc0ab78b953309d1_4080a7c9-a9c8-495f-abd7-bd3e9df397d9.webp?v=1714911415","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00cf1ea1d9378f2420d382086f699b2a049cd218_35eb8c13-c5dc-4687-9bb3-19788585c4d1.webp?v=1714911418","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4d4d509f96373ebbaa2459d2dff211527940a54_3ad720bf-e3e9-43a1-ade1-cd23c2da01f4.webp?v=1714911420","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/143bb4cdf98031c8edbd9fcfb7abf04445d3563a_a411ade7-0d3f-4bad-b266-b2284ff09e30.webp?v=1714911422","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c46e471d39fd19cb96928f6c34f831ebed5f8918_007acf0c-bac7-461b-abca-99ffcf6caaec.webp?v=1714911425","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/028ac35ee2fb13402372420dce8170ef60930c33_85657411-f1ad-46b8-b024-abbcc8bcd3aa.webp?v=1714911427","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba164a6d5820fb0f6103b2a7eadc095d26f20216_0f372f63-fdb8-44f6-a5fb-dd50f93e8321.webp?v=1714911430","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f5eab4ea8aa61acd109ef2d25513b7045d98dc7_0ea5efc1-f6b6-46b2-8201-5ec357c366d5.webp?v=1714911432","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a6c65b56909d998147e204f01dd0be91bcf1331_99522082-c97e-4c2b-b3f6-31c5436390ec.webp?v=1714911435","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b0128b66aa55c143182c135a67c4f2080b40d47_607581a4-0b47-4d0d-9820-e5c84d26169a.webp?v=1714911437","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e24086403405c59400d346aea24338e5c87b1f27_1a223efb-93c0-4cf2-8880-7b7a0c21e2a4.webp?v=1714911440"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d7591d3be4fac3d1556c32bbc0ab78b953309d1_4080a7c9-a9c8-495f-abd7-bd3e9df397d9.webp?v=1714911415","options":["color"],"media":[{"alt":null,"id":23893416738915,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d7591d3be4fac3d1556c32bbc0ab78b953309d1_4080a7c9-a9c8-495f-abd7-bd3e9df397d9.webp?v=1714911415"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d7591d3be4fac3d1556c32bbc0ab78b953309d1_4080a7c9-a9c8-495f-abd7-bd3e9df397d9.webp?v=1714911415","width":2000},{"alt":null,"id":23893417656419,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00cf1ea1d9378f2420d382086f699b2a049cd218_35eb8c13-c5dc-4687-9bb3-19788585c4d1.webp?v=1714911418"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00cf1ea1d9378f2420d382086f699b2a049cd218_35eb8c13-c5dc-4687-9bb3-19788585c4d1.webp?v=1714911418","width":2000},{"alt":null,"id":23893418246243,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4d4d509f96373ebbaa2459d2dff211527940a54_3ad720bf-e3e9-43a1-ade1-cd23c2da01f4.webp?v=1714911420"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4d4d509f96373ebbaa2459d2dff211527940a54_3ad720bf-e3e9-43a1-ade1-cd23c2da01f4.webp?v=1714911420","width":2000},{"alt":null,"id":23893418803299,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/143bb4cdf98031c8edbd9fcfb7abf04445d3563a_a411ade7-0d3f-4bad-b266-b2284ff09e30.webp?v=1714911422"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/143bb4cdf98031c8edbd9fcfb7abf04445d3563a_a411ade7-0d3f-4bad-b266-b2284ff09e30.webp?v=1714911422","width":2000},{"alt":null,"id":23893419196515,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c46e471d39fd19cb96928f6c34f831ebed5f8918_007acf0c-bac7-461b-abca-99ffcf6caaec.webp?v=1714911425"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c46e471d39fd19cb96928f6c34f831ebed5f8918_007acf0c-bac7-461b-abca-99ffcf6caaec.webp?v=1714911425","width":2000},{"alt":null,"id":23893420015715,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/028ac35ee2fb13402372420dce8170ef60930c33_85657411-f1ad-46b8-b024-abbcc8bcd3aa.webp?v=1714911427"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/028ac35ee2fb13402372420dce8170ef60930c33_85657411-f1ad-46b8-b024-abbcc8bcd3aa.webp?v=1714911427","width":2000},{"alt":null,"id":23893420998755,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba164a6d5820fb0f6103b2a7eadc095d26f20216_0f372f63-fdb8-44f6-a5fb-dd50f93e8321.webp?v=1714911430"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba164a6d5820fb0f6103b2a7eadc095d26f20216_0f372f63-fdb8-44f6-a5fb-dd50f93e8321.webp?v=1714911430","width":2000},{"alt":null,"id":23893421555811,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f5eab4ea8aa61acd109ef2d25513b7045d98dc7_0ea5efc1-f6b6-46b2-8201-5ec357c366d5.webp?v=1714911432"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f5eab4ea8aa61acd109ef2d25513b7045d98dc7_0ea5efc1-f6b6-46b2-8201-5ec357c366d5.webp?v=1714911432","width":2000},{"alt":null,"id":23893422014563,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a6c65b56909d998147e204f01dd0be91bcf1331_99522082-c97e-4c2b-b3f6-31c5436390ec.webp?v=1714911435"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a6c65b56909d998147e204f01dd0be91bcf1331_99522082-c97e-4c2b-b3f6-31c5436390ec.webp?v=1714911435","width":2000},{"alt":null,"id":23893422833763,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b0128b66aa55c143182c135a67c4f2080b40d47_607581a4-0b47-4d0d-9820-e5c84d26169a.webp?v=1714911437"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b0128b66aa55c143182c135a67c4f2080b40d47_607581a4-0b47-4d0d-9820-e5c84d26169a.webp?v=1714911437","width":2000},{"alt":null,"id":23893423259747,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e24086403405c59400d346aea24338e5c87b1f27_1a223efb-93c0-4cf2-8880-7b7a0c21e2a4.webp?v=1714911440"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e24086403405c59400d346aea24338e5c87b1f27_1a223efb-93c0-4cf2-8880-7b7a0c21e2a4.webp?v=1714911440","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911541956707,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB27","requires_shipping":true,"taxable":true,"featured_image":{"id":31488073203811,"product_id":7415069245539,"position":2,"created_at":"2024-05-05T20:16:58+08:00","updated_at":"2024-05-05T20:16:58+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00cf1ea1d9378f2420d382086f699b2a049cd218_35eb8c13-c5dc-4687-9bb3-19788585c4d1.webp?v=1714911418","variant_ids":[41911541956707]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - POP千年鷹 - 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-PB27","featured_media":{"alt":null,"id":23893417656419,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00cf1ea1d9378f2420d382086f699b2a049cd218_35eb8c13-c5dc-4687-9bb3-19788585c4d1.webp?v=1714911418"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911541956707,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB27","requires_shipping":true,"taxable":true,"featured_image":{"id":31488073203811,"product_id":7415069245539,"position":2,"created_at":"2024-05-05T20:16:58+08:00","updated_at":"2024-05-05T20:16:58+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00cf1ea1d9378f2420d382086f699b2a049cd218_35eb8c13-c5dc-4687-9bb3-19788585c4d1.webp?v=1714911418","variant_ids":[41911541956707]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - POP千年鷹 - 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-PB27","featured_media":{"alt":null,"id":23893417656419,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00cf1ea1d9378f2420d382086f699b2a049cd218_35eb8c13-c5dc-4687-9bb3-19788585c4d1.webp?v=1714911418"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null; $type = ""; var sellingStatus if ($isMerge) { $(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: "停產" }