$product = {"id":7415015768163,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - POP全載具2-白","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb12","description":null,"published_at":"2024-06-11T17:55:42+08:00","created_at":"2024-05-05T20:06:48+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":41910965567587,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB12","requires_shipping":true,"taxable":true,"featured_image":{"id":31487928795235,"product_id":7415015768163,"position":3,"created_at":"2024-05-05T20:06:55+08:00","updated_at":"2024-05-05T20:06:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b4f054696b11f851282635450ed9f55c99cdc76_708c3c93-a4c6-48d6-9eee-f8a6acfa53bc.webp?v=1714910815","variant_ids":[41910965567587]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - POP全載具2-白 - 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-PB12","featured_media":{"alt":null,"id":23893272887395,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b4f054696b11f851282635450ed9f55c99cdc76_708c3c93-a4c6-48d6-9eee-f8a6acfa53bc.webp?v=1714910815"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c171b598aece468600cb25e17c56bcede0c0d4c9_64f5333f-992b-4685-840b-200365638647.webp?v=1714910810","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c78b248a5029209a386dcdcbe822b91852d9dfbd_087fe2c1-9b5b-48b8-aa7d-bcddad4e8080.webp?v=1714910813","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b4f054696b11f851282635450ed9f55c99cdc76_708c3c93-a4c6-48d6-9eee-f8a6acfa53bc.webp?v=1714910815","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ebd74dbae8ed0e91358b17df59c5ecb8c3f63a80_e090e0a3-78f9-439f-ac03-548f0c34f5de.webp?v=1714910818","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a2aa519535be602a8d943977156d110910f4ff3_62de1c74-b3f3-442b-a758-487f1435960d.webp?v=1714910820","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/372bc3a6f79fb9a40440980412e1527a77df7809_d2ab16a6-0b3b-4c47-9b7e-a819244a1e66.webp?v=1714910822","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4adfc8bed9301da5b58dc0c38595fe1b21d845df_e09b636f-ec1f-4077-bc3f-f7891bcf486a.webp?v=1714910825","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/05ed588fc4db90066286c7cff24d7ff7dc488a83_faba83d9-8219-4916-a4b1-e8f58ee80bde.webp?v=1714910827","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3eee65e99e0c6c2477c5c9ee089a4470601c0bf6_fc8f9f38-8fc2-46d6-be36-eb45f1010f00.webp?v=1714910830","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b3217648c0f14e8e3baef5a30c3243b803d05c3d_c548a351-9aee-40a8-9f45-9f47ef43edbd.webp?v=1714910832","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d7dbe42b770133378a725fc1dc825b2bcb16af79_e6c36d2c-8109-45cc-9ea2-8be3beb95f96.webp?v=1714910835"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c171b598aece468600cb25e17c56bcede0c0d4c9_64f5333f-992b-4685-840b-200365638647.webp?v=1714910810","options":["color"],"media":[{"alt":null,"id":23893272002659,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c171b598aece468600cb25e17c56bcede0c0d4c9_64f5333f-992b-4685-840b-200365638647.webp?v=1714910810"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c171b598aece468600cb25e17c56bcede0c0d4c9_64f5333f-992b-4685-840b-200365638647.webp?v=1714910810","width":2000},{"alt":null,"id":23893272428643,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c78b248a5029209a386dcdcbe822b91852d9dfbd_087fe2c1-9b5b-48b8-aa7d-bcddad4e8080.webp?v=1714910813"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c78b248a5029209a386dcdcbe822b91852d9dfbd_087fe2c1-9b5b-48b8-aa7d-bcddad4e8080.webp?v=1714910813","width":2000},{"alt":null,"id":23893272887395,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b4f054696b11f851282635450ed9f55c99cdc76_708c3c93-a4c6-48d6-9eee-f8a6acfa53bc.webp?v=1714910815"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b4f054696b11f851282635450ed9f55c99cdc76_708c3c93-a4c6-48d6-9eee-f8a6acfa53bc.webp?v=1714910815","width":2000},{"alt":null,"id":23893273575523,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ebd74dbae8ed0e91358b17df59c5ecb8c3f63a80_e090e0a3-78f9-439f-ac03-548f0c34f5de.webp?v=1714910818"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ebd74dbae8ed0e91358b17df59c5ecb8c3f63a80_e090e0a3-78f9-439f-ac03-548f0c34f5de.webp?v=1714910818","width":2000},{"alt":null,"id":23893274198115,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a2aa519535be602a8d943977156d110910f4ff3_62de1c74-b3f3-442b-a758-487f1435960d.webp?v=1714910820"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a2aa519535be602a8d943977156d110910f4ff3_62de1c74-b3f3-442b-a758-487f1435960d.webp?v=1714910820","width":2000},{"alt":null,"id":23893274558563,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/372bc3a6f79fb9a40440980412e1527a77df7809_d2ab16a6-0b3b-4c47-9b7e-a819244a1e66.webp?v=1714910822"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/372bc3a6f79fb9a40440980412e1527a77df7809_d2ab16a6-0b3b-4c47-9b7e-a819244a1e66.webp?v=1714910822","width":2000},{"alt":null,"id":23893275410531,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4adfc8bed9301da5b58dc0c38595fe1b21d845df_e09b636f-ec1f-4077-bc3f-f7891bcf486a.webp?v=1714910825"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4adfc8bed9301da5b58dc0c38595fe1b21d845df_e09b636f-ec1f-4077-bc3f-f7891bcf486a.webp?v=1714910825","width":2000},{"alt":null,"id":23893275836515,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/05ed588fc4db90066286c7cff24d7ff7dc488a83_faba83d9-8219-4916-a4b1-e8f58ee80bde.webp?v=1714910827"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/05ed588fc4db90066286c7cff24d7ff7dc488a83_faba83d9-8219-4916-a4b1-e8f58ee80bde.webp?v=1714910827","width":2000},{"alt":null,"id":23893276491875,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3eee65e99e0c6c2477c5c9ee089a4470601c0bf6_fc8f9f38-8fc2-46d6-be36-eb45f1010f00.webp?v=1714910830"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3eee65e99e0c6c2477c5c9ee089a4470601c0bf6_fc8f9f38-8fc2-46d6-be36-eb45f1010f00.webp?v=1714910830","width":2000},{"alt":null,"id":23893277114467,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b3217648c0f14e8e3baef5a30c3243b803d05c3d_c548a351-9aee-40a8-9f45-9f47ef43edbd.webp?v=1714910832"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b3217648c0f14e8e3baef5a30c3243b803d05c3d_c548a351-9aee-40a8-9f45-9f47ef43edbd.webp?v=1714910832","width":2000},{"alt":null,"id":23893277966435,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d7dbe42b770133378a725fc1dc825b2bcb16af79_e6c36d2c-8109-45cc-9ea2-8be3beb95f96.webp?v=1714910835"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d7dbe42b770133378a725fc1dc825b2bcb16af79_e6c36d2c-8109-45cc-9ea2-8be3beb95f96.webp?v=1714910835","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910965567587,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB12","requires_shipping":true,"taxable":true,"featured_image":{"id":31487928795235,"product_id":7415015768163,"position":3,"created_at":"2024-05-05T20:06:55+08:00","updated_at":"2024-05-05T20:06:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b4f054696b11f851282635450ed9f55c99cdc76_708c3c93-a4c6-48d6-9eee-f8a6acfa53bc.webp?v=1714910815","variant_ids":[41910965567587]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - POP全載具2-白 - 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-PB12","featured_media":{"alt":null,"id":23893272887395,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b4f054696b11f851282635450ed9f55c99cdc76_708c3c93-a4c6-48d6-9eee-f8a6acfa53bc.webp?v=1714910815"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910965567587,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB12","requires_shipping":true,"taxable":true,"featured_image":{"id":31487928795235,"product_id":7415015768163,"position":3,"created_at":"2024-05-05T20:06:55+08:00","updated_at":"2024-05-05T20:06:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b4f054696b11f851282635450ed9f55c99cdc76_708c3c93-a4c6-48d6-9eee-f8a6acfa53bc.webp?v=1714910815","variant_ids":[41910965567587]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - POP全載具2-白 - 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-PB12","featured_media":{"alt":null,"id":23893272887395,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b4f054696b11f851282635450ed9f55c99cdc76_708c3c93-a4c6-48d6-9eee-f8a6acfa53bc.webp?v=1714910815"}},"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: "停產" }