$product = {"id":7414975725667,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 死星-黑白條紋","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb21","description":null,"published_at":"2024-06-11T17:54:37+08:00","created_at":"2024-05-05T19:59:05+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":41910535684195,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB21","requires_shipping":true,"taxable":true,"featured_image":{"id":31487822037091,"product_id":7414975725667,"position":2,"created_at":"2024-05-05T19:59:10+08:00","updated_at":"2024-05-05T19:59:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/186581094581904a60cf75192c5d45120cd3e959_6c95c57a-9b71-4314-834f-5941ea191f89.webp?v=1714910350","variant_ids":[41910535684195]},"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-PB21","featured_media":{"alt":null,"id":23893166063715,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/186581094581904a60cf75192c5d45120cd3e959_6c95c57a-9b71-4314-834f-5941ea191f89.webp?v=1714910350"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4ce17a9a7ec6fadb9a279ab7da47f596045d986b_d69f9335-9194-4558-b451-6a44864f264a.webp?v=1714910348","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/186581094581904a60cf75192c5d45120cd3e959_6c95c57a-9b71-4314-834f-5941ea191f89.webp?v=1714910350","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/537791a35179fa92cf9d78f656a733f6fb8467f2_0bcd9e42-3b92-4718-b597-7764eeab33d9.webp?v=1714910353","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5cb8ec36878f731f22aa28b83e2eba4b641e79ff_ec71b2c2-1e59-42ff-82c4-679680caab6e.webp?v=1714910356","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8941b086126642847ae5613f91c0b65a1dce2581_522ab817-5485-4c82-8cb3-a6fbcffb8c8a.webp?v=1714910358","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a511ceab44acb28ae140a2928912f2657d73c555_10fa2231-5ab5-44ae-a997-a9c1580118df.webp?v=1714910361","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d18047e5d3cb6beac6dd864284ff458c50254ae_3cfe05c2-de6b-4548-b274-0d42fec7f5de.webp?v=1714910363","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c02f871f7c0be2affcbb9f42eebd01dffcaa0e6c_056b759d-fffe-485b-95b3-0a6a3669f544.webp?v=1714910366","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/843e643b168e7251a12a65ec955ae9d58abdb984_33a243ca-28a9-42b5-9198-fd9683f1b40f.webp?v=1714910369","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4faaf234a526298c0bdbe0bd1e64791691fdefe2_84c83b69-0d1d-4d25-80b2-c23025a7c860.webp?v=1714910371","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d40efc5ed228337ea97bc7d9e4fb29a57ae22418_96663eb4-1118-4ae2-8d6b-cee7a2374dc2.webp?v=1714910374"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4ce17a9a7ec6fadb9a279ab7da47f596045d986b_d69f9335-9194-4558-b451-6a44864f264a.webp?v=1714910348","options":["color"],"media":[{"alt":null,"id":23893165441123,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4ce17a9a7ec6fadb9a279ab7da47f596045d986b_d69f9335-9194-4558-b451-6a44864f264a.webp?v=1714910348"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4ce17a9a7ec6fadb9a279ab7da47f596045d986b_d69f9335-9194-4558-b451-6a44864f264a.webp?v=1714910348","width":2000},{"alt":null,"id":23893166063715,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/186581094581904a60cf75192c5d45120cd3e959_6c95c57a-9b71-4314-834f-5941ea191f89.webp?v=1714910350"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/186581094581904a60cf75192c5d45120cd3e959_6c95c57a-9b71-4314-834f-5941ea191f89.webp?v=1714910350","width":2000},{"alt":null,"id":23893166751843,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/537791a35179fa92cf9d78f656a733f6fb8467f2_0bcd9e42-3b92-4718-b597-7764eeab33d9.webp?v=1714910353"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/537791a35179fa92cf9d78f656a733f6fb8467f2_0bcd9e42-3b92-4718-b597-7764eeab33d9.webp?v=1714910353","width":2000},{"alt":null,"id":23893167571043,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5cb8ec36878f731f22aa28b83e2eba4b641e79ff_ec71b2c2-1e59-42ff-82c4-679680caab6e.webp?v=1714910356"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5cb8ec36878f731f22aa28b83e2eba4b641e79ff_ec71b2c2-1e59-42ff-82c4-679680caab6e.webp?v=1714910356","width":2000},{"alt":null,"id":23893168029795,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8941b086126642847ae5613f91c0b65a1dce2581_522ab817-5485-4c82-8cb3-a6fbcffb8c8a.webp?v=1714910358"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8941b086126642847ae5613f91c0b65a1dce2581_522ab817-5485-4c82-8cb3-a6fbcffb8c8a.webp?v=1714910358","width":2000},{"alt":null,"id":23893169045603,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a511ceab44acb28ae140a2928912f2657d73c555_10fa2231-5ab5-44ae-a997-a9c1580118df.webp?v=1714910361"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a511ceab44acb28ae140a2928912f2657d73c555_10fa2231-5ab5-44ae-a997-a9c1580118df.webp?v=1714910361","width":2000},{"alt":null,"id":23893169438819,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d18047e5d3cb6beac6dd864284ff458c50254ae_3cfe05c2-de6b-4548-b274-0d42fec7f5de.webp?v=1714910363"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d18047e5d3cb6beac6dd864284ff458c50254ae_3cfe05c2-de6b-4548-b274-0d42fec7f5de.webp?v=1714910363","width":2000},{"alt":null,"id":23893170225251,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c02f871f7c0be2affcbb9f42eebd01dffcaa0e6c_056b759d-fffe-485b-95b3-0a6a3669f544.webp?v=1714910366"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c02f871f7c0be2affcbb9f42eebd01dffcaa0e6c_056b759d-fffe-485b-95b3-0a6a3669f544.webp?v=1714910366","width":2000},{"alt":null,"id":23893170716771,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/843e643b168e7251a12a65ec955ae9d58abdb984_33a243ca-28a9-42b5-9198-fd9683f1b40f.webp?v=1714910369"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/843e643b168e7251a12a65ec955ae9d58abdb984_33a243ca-28a9-42b5-9198-fd9683f1b40f.webp?v=1714910369","width":2000},{"alt":null,"id":23893171109987,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4faaf234a526298c0bdbe0bd1e64791691fdefe2_84c83b69-0d1d-4d25-80b2-c23025a7c860.webp?v=1714910371"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4faaf234a526298c0bdbe0bd1e64791691fdefe2_84c83b69-0d1d-4d25-80b2-c23025a7c860.webp?v=1714910371","width":2000},{"alt":null,"id":23893171568739,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d40efc5ed228337ea97bc7d9e4fb29a57ae22418_96663eb4-1118-4ae2-8d6b-cee7a2374dc2.webp?v=1714910374"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d40efc5ed228337ea97bc7d9e4fb29a57ae22418_96663eb4-1118-4ae2-8d6b-cee7a2374dc2.webp?v=1714910374","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910535684195,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB21","requires_shipping":true,"taxable":true,"featured_image":{"id":31487822037091,"product_id":7414975725667,"position":2,"created_at":"2024-05-05T19:59:10+08:00","updated_at":"2024-05-05T19:59:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/186581094581904a60cf75192c5d45120cd3e959_6c95c57a-9b71-4314-834f-5941ea191f89.webp?v=1714910350","variant_ids":[41910535684195]},"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-PB21","featured_media":{"alt":null,"id":23893166063715,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/186581094581904a60cf75192c5d45120cd3e959_6c95c57a-9b71-4314-834f-5941ea191f89.webp?v=1714910350"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910535684195,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB21","requires_shipping":true,"taxable":true,"featured_image":{"id":31487822037091,"product_id":7414975725667,"position":2,"created_at":"2024-05-05T19:59:10+08:00","updated_at":"2024-05-05T19:59:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/186581094581904a60cf75192c5d45120cd3e959_6c95c57a-9b71-4314-834f-5941ea191f89.webp?v=1714910350","variant_ids":[41910535684195]},"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-PB21","featured_media":{"alt":null,"id":23893166063715,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/186581094581904a60cf75192c5d45120cd3e959_6c95c57a-9b71-4314-834f-5941ea191f89.webp?v=1714910350"}},"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: "停產" }