$product = {"id":7414975660131,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Care Bears - 抱一個","handle":"iphone-12-mini-mod-nx-magsafe-printable-yb01","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專區Care Bears","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-carebears","device-iPhone 12 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-carebears","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":41910533947491,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-YB01","requires_shipping":true,"taxable":true,"featured_image":{"id":31487822889059,"product_id":7414975660131,"position":3,"created_at":"2024-05-05T19:59:13+08:00","updated_at":"2024-05-05T19:59:13+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a6224be50629a29239fd55ff52ace35f78411834_3ea2c6b7-efe2-4933-b8b5-ea8f88276ce0.webp?v=1714910353","variant_ids":[41910533947491]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Care Bears - 抱一個 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-YB01","featured_media":{"alt":null,"id":23893166686307,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a6224be50629a29239fd55ff52ace35f78411834_3ea2c6b7-efe2-4933-b8b5-ea8f88276ce0.webp?v=1714910353"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab619cacbf0dafe94996df6e0cade988d0df42ea_a7416e50-c936-4f1b-9882-ca7604fa5614.webp?v=1714910348","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e248a31455b1f85e195740c15a5b5c0d300aba3_ae1d2f88-22c0-4c4c-806b-8f693f638172.webp?v=1714910350","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a6224be50629a29239fd55ff52ace35f78411834_3ea2c6b7-efe2-4933-b8b5-ea8f88276ce0.webp?v=1714910353","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bce8e004c40f6a0e76fb4b71c6dd23e272c73d0f_ad69c60a-f75d-45ff-8b0e-82a7ed2c3f7a.webp?v=1714910356","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8ac47cb972cca13deaeec8491f51e3fb41b79e2_0a4f70b6-d638-44e9-b689-b01de93d1c32.webp?v=1714910358","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b8c69432a41a5ebc1e295668b7ac3d5f0e66672_47634136-6271-4cb8-ab80-7d0b6e56a054.webp?v=1714910360","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/07998e36dabc068117cd59d68c39c9252566c89f_ad1491d4-0f94-4997-b2b9-6544602f9739.webp?v=1714910362","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c712cd3fdf0626abc7e839f39bfca92278ea408a_075e5361-733d-40aa-8bac-d633f9bb3ea9.webp?v=1714910365","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/463303a4ed96cf438de79924d695d44f735a361d_20803de7-d402-4fa8-af7b-90bc783f489e.webp?v=1714910367","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec82e75c3bd36fef9af4d720a13bb6397b2cba82_22d5dd97-eeaa-4a8e-9cca-0ee9dba972c0.webp?v=1714910369","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/884d29f08862b7e68c2118e933feeb4a07e505d9_4a535fd6-25ac-40e8-a949-fb18a3b8a841.webp?v=1714910372"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab619cacbf0dafe94996df6e0cade988d0df42ea_a7416e50-c936-4f1b-9882-ca7604fa5614.webp?v=1714910348","options":["color"],"media":[{"alt":null,"id":23893165572195,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab619cacbf0dafe94996df6e0cade988d0df42ea_a7416e50-c936-4f1b-9882-ca7604fa5614.webp?v=1714910348"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab619cacbf0dafe94996df6e0cade988d0df42ea_a7416e50-c936-4f1b-9882-ca7604fa5614.webp?v=1714910348","width":2000},{"alt":null,"id":23893166096483,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e248a31455b1f85e195740c15a5b5c0d300aba3_ae1d2f88-22c0-4c4c-806b-8f693f638172.webp?v=1714910350"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e248a31455b1f85e195740c15a5b5c0d300aba3_ae1d2f88-22c0-4c4c-806b-8f693f638172.webp?v=1714910350","width":2000},{"alt":null,"id":23893166686307,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a6224be50629a29239fd55ff52ace35f78411834_3ea2c6b7-efe2-4933-b8b5-ea8f88276ce0.webp?v=1714910353"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a6224be50629a29239fd55ff52ace35f78411834_3ea2c6b7-efe2-4933-b8b5-ea8f88276ce0.webp?v=1714910353","width":2000},{"alt":null,"id":23893167538275,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bce8e004c40f6a0e76fb4b71c6dd23e272c73d0f_ad69c60a-f75d-45ff-8b0e-82a7ed2c3f7a.webp?v=1714910356"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bce8e004c40f6a0e76fb4b71c6dd23e272c73d0f_ad69c60a-f75d-45ff-8b0e-82a7ed2c3f7a.webp?v=1714910356","width":2000},{"alt":null,"id":23893167931491,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8ac47cb972cca13deaeec8491f51e3fb41b79e2_0a4f70b6-d638-44e9-b689-b01de93d1c32.webp?v=1714910358"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8ac47cb972cca13deaeec8491f51e3fb41b79e2_0a4f70b6-d638-44e9-b689-b01de93d1c32.webp?v=1714910358","width":2000},{"alt":null,"id":23893168947299,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b8c69432a41a5ebc1e295668b7ac3d5f0e66672_47634136-6271-4cb8-ab80-7d0b6e56a054.webp?v=1714910360"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b8c69432a41a5ebc1e295668b7ac3d5f0e66672_47634136-6271-4cb8-ab80-7d0b6e56a054.webp?v=1714910360","width":2000},{"alt":null,"id":23893169274979,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/07998e36dabc068117cd59d68c39c9252566c89f_ad1491d4-0f94-4997-b2b9-6544602f9739.webp?v=1714910362"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/07998e36dabc068117cd59d68c39c9252566c89f_ad1491d4-0f94-4997-b2b9-6544602f9739.webp?v=1714910362","width":2000},{"alt":null,"id":23893169766499,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c712cd3fdf0626abc7e839f39bfca92278ea408a_075e5361-733d-40aa-8bac-d633f9bb3ea9.webp?v=1714910365"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c712cd3fdf0626abc7e839f39bfca92278ea408a_075e5361-733d-40aa-8bac-d633f9bb3ea9.webp?v=1714910365","width":2000},{"alt":null,"id":23893170389091,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/463303a4ed96cf438de79924d695d44f735a361d_20803de7-d402-4fa8-af7b-90bc783f489e.webp?v=1714910367"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/463303a4ed96cf438de79924d695d44f735a361d_20803de7-d402-4fa8-af7b-90bc783f489e.webp?v=1714910367","width":2000},{"alt":null,"id":23893170782307,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec82e75c3bd36fef9af4d720a13bb6397b2cba82_22d5dd97-eeaa-4a8e-9cca-0ee9dba972c0.webp?v=1714910369"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec82e75c3bd36fef9af4d720a13bb6397b2cba82_22d5dd97-eeaa-4a8e-9cca-0ee9dba972c0.webp?v=1714910369","width":2000},{"alt":null,"id":23893171273827,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/884d29f08862b7e68c2118e933feeb4a07e505d9_4a535fd6-25ac-40e8-a949-fb18a3b8a841.webp?v=1714910372"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/884d29f08862b7e68c2118e933feeb4a07e505d9_4a535fd6-25ac-40e8-a949-fb18a3b8a841.webp?v=1714910372","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910533947491,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-YB01","requires_shipping":true,"taxable":true,"featured_image":{"id":31487822889059,"product_id":7414975660131,"position":3,"created_at":"2024-05-05T19:59:13+08:00","updated_at":"2024-05-05T19:59:13+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a6224be50629a29239fd55ff52ace35f78411834_3ea2c6b7-efe2-4933-b8b5-ea8f88276ce0.webp?v=1714910353","variant_ids":[41910533947491]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Care Bears - 抱一個 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-YB01","featured_media":{"alt":null,"id":23893166686307,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a6224be50629a29239fd55ff52ace35f78411834_3ea2c6b7-efe2-4933-b8b5-ea8f88276ce0.webp?v=1714910353"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910533947491,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-YB01","requires_shipping":true,"taxable":true,"featured_image":{"id":31487822889059,"product_id":7414975660131,"position":3,"created_at":"2024-05-05T19:59:13+08:00","updated_at":"2024-05-05T19:59:13+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a6224be50629a29239fd55ff52ace35f78411834_3ea2c6b7-efe2-4933-b8b5-ea8f88276ce0.webp?v=1714910353","variant_ids":[41910533947491]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Care Bears - 抱一個 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-YB01","featured_media":{"alt":null,"id":23893166686307,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a6224be50629a29239fd55ff52ace35f78411834_3ea2c6b7-efe2-4933-b8b5-ea8f88276ce0.webp?v=1714910353"}},"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: "停產" }