$product = {"id":7415085695075,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Care Bears - Good Luck Bear","handle":"iphone-12-mini-mod-nx-magsafe-printable-yb05","description":null,"published_at":"2024-06-11T17:57:35+08:00","created_at":"2024-05-05T20:20: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":41911719133283,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-YB05","requires_shipping":true,"taxable":true,"featured_image":{"id":31488125304931,"product_id":7415085695075,"position":11,"created_at":"2024-05-05T20:20:32+08:00","updated_at":"2024-05-05T20:20:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aed4d389a8f353372a3d2570879650905702d0d4_b1ae85e5-f6b2-417c-a249-3277223753eb.webp?v=1714911632","variant_ids":[41911719133283]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Care Bears - Good Luck Bear - 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-YB05","featured_media":{"alt":null,"id":23893469921379,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aed4d389a8f353372a3d2570879650905702d0d4_b1ae85e5-f6b2-417c-a249-3277223753eb.webp?v=1714911632"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba27adc6cf5235166786401639b3c78891eced94_a5a2e131-1e05-4ca8-a73e-412a7e645d6c.webp?v=1714911608","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/82fe0eaa3c56147d4f55845dfc598b6d6bb57fd5_788cd52e-2e4b-4c04-b223-d4ba56d881e9.webp?v=1714911610","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4599492bfe4659c1eae1c7ea728b705a57adf43c_3da70293-95d9-4884-90ac-8c0812d75b2a.webp?v=1714911613","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f91269e2d83983d52a361a855a7dea98ae461a9b_71b62068-a2bc-4021-81d2-d083574a6326.webp?v=1714911615","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c75f9b068fa9d23d53116871d79abaa627235cdf_95033e31-091b-4b98-b489-7c61035cbb8e.webp?v=1714911618","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5cfd67d4a887fd88e7d2e45db5aa205f63e3bf4_f905041e-e500-407b-a755-49b4c3472197.webp?v=1714911620","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86b0474b04adaf1ace6d0fead83cdc5e9e41afa5_f0551dd1-4e90-4d67-a624-9651ad8e1c0c.webp?v=1714911623","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a6e9ae44511c066a203ce462a1acb26d171247d_822c12fa-4ccd-400e-943c-1b3f971612ab.webp?v=1714911625","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7367cdb803724a6d37d243318fa41736c1a0b665_2db34cce-c9e0-4df5-888e-68c197b43c14.webp?v=1714911627","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5776093ec853da73159971052bebec5fadcf36b4_f0856992-7e73-4f57-80b1-c3e5bbd73ea9.webp?v=1714911630","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aed4d389a8f353372a3d2570879650905702d0d4_b1ae85e5-f6b2-417c-a249-3277223753eb.webp?v=1714911632"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba27adc6cf5235166786401639b3c78891eced94_a5a2e131-1e05-4ca8-a73e-412a7e645d6c.webp?v=1714911608","options":["color"],"media":[{"alt":null,"id":23893464416355,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba27adc6cf5235166786401639b3c78891eced94_a5a2e131-1e05-4ca8-a73e-412a7e645d6c.webp?v=1714911608"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba27adc6cf5235166786401639b3c78891eced94_a5a2e131-1e05-4ca8-a73e-412a7e645d6c.webp?v=1714911608","width":2000},{"alt":null,"id":23893465038947,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/82fe0eaa3c56147d4f55845dfc598b6d6bb57fd5_788cd52e-2e4b-4c04-b223-d4ba56d881e9.webp?v=1714911610"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/82fe0eaa3c56147d4f55845dfc598b6d6bb57fd5_788cd52e-2e4b-4c04-b223-d4ba56d881e9.webp?v=1714911610","width":2000},{"alt":null,"id":23893465464931,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4599492bfe4659c1eae1c7ea728b705a57adf43c_3da70293-95d9-4884-90ac-8c0812d75b2a.webp?v=1714911613"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4599492bfe4659c1eae1c7ea728b705a57adf43c_3da70293-95d9-4884-90ac-8c0812d75b2a.webp?v=1714911613","width":2000},{"alt":null,"id":23893466480739,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f91269e2d83983d52a361a855a7dea98ae461a9b_71b62068-a2bc-4021-81d2-d083574a6326.webp?v=1714911615"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f91269e2d83983d52a361a855a7dea98ae461a9b_71b62068-a2bc-4021-81d2-d083574a6326.webp?v=1714911615","width":2000},{"alt":null,"id":23893466775651,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c75f9b068fa9d23d53116871d79abaa627235cdf_95033e31-091b-4b98-b489-7c61035cbb8e.webp?v=1714911618"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c75f9b068fa9d23d53116871d79abaa627235cdf_95033e31-091b-4b98-b489-7c61035cbb8e.webp?v=1714911618","width":2000},{"alt":null,"id":23893467234403,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5cfd67d4a887fd88e7d2e45db5aa205f63e3bf4_f905041e-e500-407b-a755-49b4c3472197.webp?v=1714911620"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5cfd67d4a887fd88e7d2e45db5aa205f63e3bf4_f905041e-e500-407b-a755-49b4c3472197.webp?v=1714911620","width":2000},{"alt":null,"id":23893467660387,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86b0474b04adaf1ace6d0fead83cdc5e9e41afa5_f0551dd1-4e90-4d67-a624-9651ad8e1c0c.webp?v=1714911623"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86b0474b04adaf1ace6d0fead83cdc5e9e41afa5_f0551dd1-4e90-4d67-a624-9651ad8e1c0c.webp?v=1714911623","width":2000},{"alt":null,"id":23893468381283,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a6e9ae44511c066a203ce462a1acb26d171247d_822c12fa-4ccd-400e-943c-1b3f971612ab.webp?v=1714911625"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a6e9ae44511c066a203ce462a1acb26d171247d_822c12fa-4ccd-400e-943c-1b3f971612ab.webp?v=1714911625","width":2000},{"alt":null,"id":23893468905571,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7367cdb803724a6d37d243318fa41736c1a0b665_2db34cce-c9e0-4df5-888e-68c197b43c14.webp?v=1714911627"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7367cdb803724a6d37d243318fa41736c1a0b665_2db34cce-c9e0-4df5-888e-68c197b43c14.webp?v=1714911627","width":2000},{"alt":null,"id":23893469397091,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5776093ec853da73159971052bebec5fadcf36b4_f0856992-7e73-4f57-80b1-c3e5bbd73ea9.webp?v=1714911630"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5776093ec853da73159971052bebec5fadcf36b4_f0856992-7e73-4f57-80b1-c3e5bbd73ea9.webp?v=1714911630","width":2000},{"alt":null,"id":23893469921379,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aed4d389a8f353372a3d2570879650905702d0d4_b1ae85e5-f6b2-417c-a249-3277223753eb.webp?v=1714911632"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aed4d389a8f353372a3d2570879650905702d0d4_b1ae85e5-f6b2-417c-a249-3277223753eb.webp?v=1714911632","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911719133283,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-YB05","requires_shipping":true,"taxable":true,"featured_image":{"id":31488125304931,"product_id":7415085695075,"position":11,"created_at":"2024-05-05T20:20:32+08:00","updated_at":"2024-05-05T20:20:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aed4d389a8f353372a3d2570879650905702d0d4_b1ae85e5-f6b2-417c-a249-3277223753eb.webp?v=1714911632","variant_ids":[41911719133283]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Care Bears - Good Luck Bear - 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-YB05","featured_media":{"alt":null,"id":23893469921379,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aed4d389a8f353372a3d2570879650905702d0d4_b1ae85e5-f6b2-417c-a249-3277223753eb.webp?v=1714911632"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911719133283,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-YB05","requires_shipping":true,"taxable":true,"featured_image":{"id":31488125304931,"product_id":7415085695075,"position":11,"created_at":"2024-05-05T20:20:32+08:00","updated_at":"2024-05-05T20:20:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aed4d389a8f353372a3d2570879650905702d0d4_b1ae85e5-f6b2-417c-a249-3277223753eb.webp?v=1714911632","variant_ids":[41911719133283]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Care Bears - Good Luck Bear - 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-YB05","featured_media":{"alt":null,"id":23893469921379,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aed4d389a8f353372a3d2570879650905702d0d4_b1ae85e5-f6b2-417c-a249-3277223753eb.webp?v=1714911632"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null; $brand_handle = null; $type = ""; var sellingStatus // 只有設計款(SKU 含 '-')才需要合圖 if ($isMerge && $defaultVariant.sku.includes('-')) { $(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: "停產" }