$product = {"id":7415030120547,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 史迪奇 - 經典系列-Ohana是家人","handle":"iphone-12-mini-mod-nx-magsafe-printable-yf10","description":null,"published_at":"2024-06-11T17:56:05+08:00","created_at":"2024-05-05T20:09:38+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區史迪奇","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-stitch","device-iPhone 12 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-stitch","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":41911118987363,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-YF10","requires_shipping":true,"taxable":true,"featured_image":{"id":31487972048995,"product_id":7415030120547,"position":5,"created_at":"2024-05-05T20:09:51+08:00","updated_at":"2024-05-05T20:09:51+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/243d8121cf760ebe8f3a062222d117a30ce23de4_3d09084a-d5e0-4e09-8fd3-857a63299f89.webp?v=1714910991","variant_ids":[41911118987363]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 史迪奇 - 經典系列-Ohana是家人 - 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-YF10","featured_media":{"alt":null,"id":23893316337763,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/243d8121cf760ebe8f3a062222d117a30ce23de4_3d09084a-d5e0-4e09-8fd3-857a63299f89.webp?v=1714910991"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f57871232a3241c409162773261c057813e99e2_0dd8622f-8e45-4fe0-bce5-c988e68bde01.webp?v=1714910981","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37b8e2677012bfd30b5d79342dd4229e5404523e_4fc650d5-286a-42aa-9c7a-5bf94ad73dcf.webp?v=1714910983","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef46b68e5e1095030259e6884ba11722a7c7dbeb_6e73d07c-a497-44a8-9174-d16df3446e4f.webp?v=1714910986","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/197e4e9a254e2eae2a780ca1d2df8f303bbfea71_8ce79385-c812-4345-9d17-867bf4ba96e4.webp?v=1714910988","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/243d8121cf760ebe8f3a062222d117a30ce23de4_3d09084a-d5e0-4e09-8fd3-857a63299f89.webp?v=1714910991","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f7391c7d777df01fd78a274bf308e0c105152779_887eb587-24e7-4bab-a0b5-a900acd72553.webp?v=1714910993","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c04b0e68fb48bc410e621498baa0dd45ceb6c9b6_1680b8d1-3ad5-4322-9fe0-5a4842fe5473.webp?v=1714910995","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9cddcda8e29a47ccefe697c447807ce18dc04f9_f250f947-e6d5-4c4b-8142-7f0558009d85.webp?v=1714910998","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df0463bfc4cf991425c249345c99f24dd8ca848c_9a855399-a856-4718-88db-b87dfbd4b3bb.webp?v=1714911000","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b72a720642b1e56c23b6c54dbe38ae4aeb8bb30_3786ac6b-7973-46e0-b1c8-bceffeabea06.webp?v=1714911002","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8752c7872ee7b8b6163e71bd107e9f1a110c8485_9ca2a88c-0fa6-42b9-8eec-b859cea10e12.webp?v=1714911005"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f57871232a3241c409162773261c057813e99e2_0dd8622f-8e45-4fe0-bce5-c988e68bde01.webp?v=1714910981","options":["color"],"media":[{"alt":null,"id":23893313912931,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f57871232a3241c409162773261c057813e99e2_0dd8622f-8e45-4fe0-bce5-c988e68bde01.webp?v=1714910981"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f57871232a3241c409162773261c057813e99e2_0dd8622f-8e45-4fe0-bce5-c988e68bde01.webp?v=1714910981","width":2000},{"alt":null,"id":23893314371683,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37b8e2677012bfd30b5d79342dd4229e5404523e_4fc650d5-286a-42aa-9c7a-5bf94ad73dcf.webp?v=1714910983"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37b8e2677012bfd30b5d79342dd4229e5404523e_4fc650d5-286a-42aa-9c7a-5bf94ad73dcf.webp?v=1714910983","width":2000},{"alt":null,"id":23893315387491,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef46b68e5e1095030259e6884ba11722a7c7dbeb_6e73d07c-a497-44a8-9174-d16df3446e4f.webp?v=1714910986"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef46b68e5e1095030259e6884ba11722a7c7dbeb_6e73d07c-a497-44a8-9174-d16df3446e4f.webp?v=1714910986","width":2000},{"alt":null,"id":23893315911779,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/197e4e9a254e2eae2a780ca1d2df8f303bbfea71_8ce79385-c812-4345-9d17-867bf4ba96e4.webp?v=1714910988"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/197e4e9a254e2eae2a780ca1d2df8f303bbfea71_8ce79385-c812-4345-9d17-867bf4ba96e4.webp?v=1714910988","width":2000},{"alt":null,"id":23893316337763,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/243d8121cf760ebe8f3a062222d117a30ce23de4_3d09084a-d5e0-4e09-8fd3-857a63299f89.webp?v=1714910991"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/243d8121cf760ebe8f3a062222d117a30ce23de4_3d09084a-d5e0-4e09-8fd3-857a63299f89.webp?v=1714910991","width":2000},{"alt":null,"id":23893317255267,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f7391c7d777df01fd78a274bf308e0c105152779_887eb587-24e7-4bab-a0b5-a900acd72553.webp?v=1714910993"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f7391c7d777df01fd78a274bf308e0c105152779_887eb587-24e7-4bab-a0b5-a900acd72553.webp?v=1714910993","width":2000},{"alt":null,"id":23893317714019,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c04b0e68fb48bc410e621498baa0dd45ceb6c9b6_1680b8d1-3ad5-4322-9fe0-5a4842fe5473.webp?v=1714910995"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c04b0e68fb48bc410e621498baa0dd45ceb6c9b6_1680b8d1-3ad5-4322-9fe0-5a4842fe5473.webp?v=1714910995","width":2000},{"alt":null,"id":23893318205539,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9cddcda8e29a47ccefe697c447807ce18dc04f9_f250f947-e6d5-4c4b-8142-7f0558009d85.webp?v=1714910998"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9cddcda8e29a47ccefe697c447807ce18dc04f9_f250f947-e6d5-4c4b-8142-7f0558009d85.webp?v=1714910998","width":2000},{"alt":null,"id":23893319024739,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df0463bfc4cf991425c249345c99f24dd8ca848c_9a855399-a856-4718-88db-b87dfbd4b3bb.webp?v=1714911000"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df0463bfc4cf991425c249345c99f24dd8ca848c_9a855399-a856-4718-88db-b87dfbd4b3bb.webp?v=1714911000","width":2000},{"alt":null,"id":23893319778403,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b72a720642b1e56c23b6c54dbe38ae4aeb8bb30_3786ac6b-7973-46e0-b1c8-bceffeabea06.webp?v=1714911002"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b72a720642b1e56c23b6c54dbe38ae4aeb8bb30_3786ac6b-7973-46e0-b1c8-bceffeabea06.webp?v=1714911002","width":2000},{"alt":null,"id":23893320237155,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8752c7872ee7b8b6163e71bd107e9f1a110c8485_9ca2a88c-0fa6-42b9-8eec-b859cea10e12.webp?v=1714911005"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8752c7872ee7b8b6163e71bd107e9f1a110c8485_9ca2a88c-0fa6-42b9-8eec-b859cea10e12.webp?v=1714911005","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911118987363,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-YF10","requires_shipping":true,"taxable":true,"featured_image":{"id":31487972048995,"product_id":7415030120547,"position":5,"created_at":"2024-05-05T20:09:51+08:00","updated_at":"2024-05-05T20:09:51+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/243d8121cf760ebe8f3a062222d117a30ce23de4_3d09084a-d5e0-4e09-8fd3-857a63299f89.webp?v=1714910991","variant_ids":[41911118987363]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 史迪奇 - 經典系列-Ohana是家人 - 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-YF10","featured_media":{"alt":null,"id":23893316337763,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/243d8121cf760ebe8f3a062222d117a30ce23de4_3d09084a-d5e0-4e09-8fd3-857a63299f89.webp?v=1714910991"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911118987363,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-YF10","requires_shipping":true,"taxable":true,"featured_image":{"id":31487972048995,"product_id":7415030120547,"position":5,"created_at":"2024-05-05T20:09:51+08:00","updated_at":"2024-05-05T20:09:51+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/243d8121cf760ebe8f3a062222d117a30ce23de4_3d09084a-d5e0-4e09-8fd3-857a63299f89.webp?v=1714910991","variant_ids":[41911118987363]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 史迪奇 - 經典系列-Ohana是家人 - 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-YF10","featured_media":{"alt":null,"id":23893316337763,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/243d8121cf760ebe8f3a062222d117a30ce23de4_3d09084a-d5e0-4e09-8fd3-857a63299f89.webp?v=1714910991"}},"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: "停產" }