$product = {"id":7415113646179,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 風暴兵-剪紙系列","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb56","description":null,"published_at":"2024-06-11T17:58:19+08:00","created_at":"2024-05-05T20:25:25+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":41912021745763,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB56","requires_shipping":true,"taxable":true,"featured_image":{"id":31488196149347,"product_id":7415113646179,"position":5,"created_at":"2024-05-05T20:25:37+08:00","updated_at":"2024-05-05T20:25:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/942fb328393e7985308cd40d3eb3f492b806231b_eb5d06d6-afb8-4724-bb3b-3965ef0236ab.webp?v=1714911937","variant_ids":[41912021745763]},"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-PB56","featured_media":{"alt":null,"id":23893540929635,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/942fb328393e7985308cd40d3eb3f492b806231b_eb5d06d6-afb8-4724-bb3b-3965ef0236ab.webp?v=1714911937"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/692abcb5d712a7e644b59ecf84f80a789c662d5b_b06b3aa1-7741-4dfb-b4cf-a8efc4b7390c.webp?v=1714911927","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa4be0895d8d270ce77a53a5ee1e01845d12d392_64eef565-9827-4dc9-bae4-b56f7e98b8f6.webp?v=1714911930","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e5e94b06b1af9f3b8f5c358d80b0c398a06bf17_88640aa9-5d10-4d75-a8a1-241bb5148b86.webp?v=1714911932","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a154578aba5ef33a0da711c24b660876863f0966_3d653167-0e78-4f5a-961f-409539224030.webp?v=1714911935","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/942fb328393e7985308cd40d3eb3f492b806231b_eb5d06d6-afb8-4724-bb3b-3965ef0236ab.webp?v=1714911937","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/851535a02906c8ca94aec8e4918dd3aff9621af2_3b5ab9bb-8317-4cb7-8a1e-e71f3757ca6d.webp?v=1714911940","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2add74984107fd7a9a48844db09804643d725ece_ece27696-a658-4d54-8e47-269cfa2611e6.webp?v=1714911942","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/828e23f89c57bc9bd7f19e423c66e847d1333ef3_594c93a0-9312-49a3-a4ef-86f381912519.webp?v=1714911945","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/993f35e6bf31c5fd03d1b2918f55116e2011b085_d928caa4-1e49-472b-8e61-f4df9e02cfb6.webp?v=1714911947","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d61556cf779288ea771b5214efe5c195a42ee6ad_d1b185fb-b810-4e97-b859-98f82966e5cd.webp?v=1714911950","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/073222ddf0c41d8152e406812c6089b56611216d_dc790277-2f39-4801-9e5c-bce908f22b87.webp?v=1714911952"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/692abcb5d712a7e644b59ecf84f80a789c662d5b_b06b3aa1-7741-4dfb-b4cf-a8efc4b7390c.webp?v=1714911927","options":["color"],"media":[{"alt":null,"id":23893538570339,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/692abcb5d712a7e644b59ecf84f80a789c662d5b_b06b3aa1-7741-4dfb-b4cf-a8efc4b7390c.webp?v=1714911927"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/692abcb5d712a7e644b59ecf84f80a789c662d5b_b06b3aa1-7741-4dfb-b4cf-a8efc4b7390c.webp?v=1714911927","width":2000},{"alt":null,"id":23893538996323,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa4be0895d8d270ce77a53a5ee1e01845d12d392_64eef565-9827-4dc9-bae4-b56f7e98b8f6.webp?v=1714911930"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa4be0895d8d270ce77a53a5ee1e01845d12d392_64eef565-9827-4dc9-bae4-b56f7e98b8f6.webp?v=1714911930","width":2000},{"alt":null,"id":23893539815523,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e5e94b06b1af9f3b8f5c358d80b0c398a06bf17_88640aa9-5d10-4d75-a8a1-241bb5148b86.webp?v=1714911932"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e5e94b06b1af9f3b8f5c358d80b0c398a06bf17_88640aa9-5d10-4d75-a8a1-241bb5148b86.webp?v=1714911932","width":2000},{"alt":null,"id":23893540208739,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a154578aba5ef33a0da711c24b660876863f0966_3d653167-0e78-4f5a-961f-409539224030.webp?v=1714911935"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a154578aba5ef33a0da711c24b660876863f0966_3d653167-0e78-4f5a-961f-409539224030.webp?v=1714911935","width":2000},{"alt":null,"id":23893540929635,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/942fb328393e7985308cd40d3eb3f492b806231b_eb5d06d6-afb8-4724-bb3b-3965ef0236ab.webp?v=1714911937"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/942fb328393e7985308cd40d3eb3f492b806231b_eb5d06d6-afb8-4724-bb3b-3965ef0236ab.webp?v=1714911937","width":2000},{"alt":null,"id":23893541355619,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/851535a02906c8ca94aec8e4918dd3aff9621af2_3b5ab9bb-8317-4cb7-8a1e-e71f3757ca6d.webp?v=1714911940"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/851535a02906c8ca94aec8e4918dd3aff9621af2_3b5ab9bb-8317-4cb7-8a1e-e71f3757ca6d.webp?v=1714911940","width":2000},{"alt":null,"id":23893541814371,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2add74984107fd7a9a48844db09804643d725ece_ece27696-a658-4d54-8e47-269cfa2611e6.webp?v=1714911942"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2add74984107fd7a9a48844db09804643d725ece_ece27696-a658-4d54-8e47-269cfa2611e6.webp?v=1714911942","width":2000},{"alt":null,"id":23893542273123,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/828e23f89c57bc9bd7f19e423c66e847d1333ef3_594c93a0-9312-49a3-a4ef-86f381912519.webp?v=1714911945"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/828e23f89c57bc9bd7f19e423c66e847d1333ef3_594c93a0-9312-49a3-a4ef-86f381912519.webp?v=1714911945","width":2000},{"alt":null,"id":23893542797411,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/993f35e6bf31c5fd03d1b2918f55116e2011b085_d928caa4-1e49-472b-8e61-f4df9e02cfb6.webp?v=1714911947"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/993f35e6bf31c5fd03d1b2918f55116e2011b085_d928caa4-1e49-472b-8e61-f4df9e02cfb6.webp?v=1714911947","width":2000},{"alt":null,"id":23893543485539,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d61556cf779288ea771b5214efe5c195a42ee6ad_d1b185fb-b810-4e97-b859-98f82966e5cd.webp?v=1714911950"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d61556cf779288ea771b5214efe5c195a42ee6ad_d1b185fb-b810-4e97-b859-98f82966e5cd.webp?v=1714911950","width":2000},{"alt":null,"id":23893544108131,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/073222ddf0c41d8152e406812c6089b56611216d_dc790277-2f39-4801-9e5c-bce908f22b87.webp?v=1714911952"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/073222ddf0c41d8152e406812c6089b56611216d_dc790277-2f39-4801-9e5c-bce908f22b87.webp?v=1714911952","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41912021745763,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB56","requires_shipping":true,"taxable":true,"featured_image":{"id":31488196149347,"product_id":7415113646179,"position":5,"created_at":"2024-05-05T20:25:37+08:00","updated_at":"2024-05-05T20:25:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/942fb328393e7985308cd40d3eb3f492b806231b_eb5d06d6-afb8-4724-bb3b-3965ef0236ab.webp?v=1714911937","variant_ids":[41912021745763]},"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-PB56","featured_media":{"alt":null,"id":23893540929635,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/942fb328393e7985308cd40d3eb3f492b806231b_eb5d06d6-afb8-4724-bb3b-3965ef0236ab.webp?v=1714911937"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41912021745763,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB56","requires_shipping":true,"taxable":true,"featured_image":{"id":31488196149347,"product_id":7415113646179,"position":5,"created_at":"2024-05-05T20:25:37+08:00","updated_at":"2024-05-05T20:25:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/942fb328393e7985308cd40d3eb3f492b806231b_eb5d06d6-afb8-4724-bb3b-3965ef0236ab.webp?v=1714911937","variant_ids":[41912021745763]},"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-PB56","featured_media":{"alt":null,"id":23893540929635,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/942fb328393e7985308cd40d3eb3f492b806231b_eb5d06d6-afb8-4724-bb3b-3965ef0236ab.webp?v=1714911937"}},"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: "停產" }