$product = {"id":7415018618979,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Batman - 復古漫畫插圖","handle":"iphone-12-mini-mod-nx-magsafe-printable-sb08","description":null,"published_at":"2024-06-11T17:55:46+08:00","created_at":"2024-05-05T20:07:25+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Batman","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-batman","device-iPhone 12 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-batman","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":41910995845219,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-SB08","requires_shipping":true,"taxable":true,"featured_image":{"id":31487941541987,"product_id":7415018618979,"position":8,"created_at":"2024-05-05T20:07:45+08:00","updated_at":"2024-05-05T20:07:45+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e0fb123f28999f50cd793264e0e61f6bc1d9c78_89b36745-29ac-4fa6-a2cc-344afb5d7783.webp?v=1714910865","variant_ids":[41910995845219]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Batman - 復古漫畫插圖 - 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-SB08","featured_media":{"alt":null,"id":23893285732451,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e0fb123f28999f50cd793264e0e61f6bc1d9c78_89b36745-29ac-4fa6-a2cc-344afb5d7783.webp?v=1714910865"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10d16ab2a5d42de4225fdfaa3211902ca51ee309_92786858-bdfd-48aa-9a55-8edb7657a7f3.webp?v=1714910848","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ad56d91935c91d018b61cf78cf2878fe6ec9989_668224b1-bb41-4652-b299-79b5a0179c5d.webp?v=1714910850","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f29d16d9898050ff1824f0c40cad51c4c963a79b_288bd436-f98a-4c03-9fcb-2d8e25fdd911.webp?v=1714910852","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2c7dd858a2bf440ce25abbb181ebd3e716ca1df_efc13362-1fe7-4461-aaa2-0e15c62186b0.webp?v=1714910855","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4c7aea273643f09fd3cd5274ec744d5232890fd3_4e7bd3f3-047b-478a-9107-35a3095e9ce9.webp?v=1714910857","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/15b175892052dfec179dd8c3292b3022e93e5ccf_946a0a0f-e88c-4879-a8b3-b0b5a57fec74.webp?v=1714910860","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f908efec08f9ae74e86a9f67866a73aaa63a4b8_17e2b15a-721d-48a3-a094-263cf918a3a3.webp?v=1714910862","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e0fb123f28999f50cd793264e0e61f6bc1d9c78_89b36745-29ac-4fa6-a2cc-344afb5d7783.webp?v=1714910865","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90e1c54896c14e8f22e63f85bc2762e2c4e8c4d3_71b6a037-7a08-4ffa-a3aa-1a09015a00ab.webp?v=1714910867","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/362c62bcdff066d3553c5b4f7bf29a8a478b7814_b040ed58-b398-46cb-b6b6-08019a14028f.webp?v=1714910869","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a80a926aea149c7355cb8b20ac70ed30d887810_64c58135-4795-4d5d-8338-73a75e3086c8.webp?v=1714910872"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10d16ab2a5d42de4225fdfaa3211902ca51ee309_92786858-bdfd-48aa-9a55-8edb7657a7f3.webp?v=1714910848","options":["color"],"media":[{"alt":null,"id":23893280882787,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10d16ab2a5d42de4225fdfaa3211902ca51ee309_92786858-bdfd-48aa-9a55-8edb7657a7f3.webp?v=1714910848"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10d16ab2a5d42de4225fdfaa3211902ca51ee309_92786858-bdfd-48aa-9a55-8edb7657a7f3.webp?v=1714910848","width":2000},{"alt":null,"id":23893281505379,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ad56d91935c91d018b61cf78cf2878fe6ec9989_668224b1-bb41-4652-b299-79b5a0179c5d.webp?v=1714910850"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ad56d91935c91d018b61cf78cf2878fe6ec9989_668224b1-bb41-4652-b299-79b5a0179c5d.webp?v=1714910850","width":2000},{"alt":null,"id":23893281898595,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f29d16d9898050ff1824f0c40cad51c4c963a79b_288bd436-f98a-4c03-9fcb-2d8e25fdd911.webp?v=1714910852"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f29d16d9898050ff1824f0c40cad51c4c963a79b_288bd436-f98a-4c03-9fcb-2d8e25fdd911.webp?v=1714910852","width":2000},{"alt":null,"id":23893282553955,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2c7dd858a2bf440ce25abbb181ebd3e716ca1df_efc13362-1fe7-4461-aaa2-0e15c62186b0.webp?v=1714910855"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2c7dd858a2bf440ce25abbb181ebd3e716ca1df_efc13362-1fe7-4461-aaa2-0e15c62186b0.webp?v=1714910855","width":2000},{"alt":null,"id":23893283602531,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4c7aea273643f09fd3cd5274ec744d5232890fd3_4e7bd3f3-047b-478a-9107-35a3095e9ce9.webp?v=1714910857"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4c7aea273643f09fd3cd5274ec744d5232890fd3_4e7bd3f3-047b-478a-9107-35a3095e9ce9.webp?v=1714910857","width":2000},{"alt":null,"id":23893284388963,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/15b175892052dfec179dd8c3292b3022e93e5ccf_946a0a0f-e88c-4879-a8b3-b0b5a57fec74.webp?v=1714910860"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/15b175892052dfec179dd8c3292b3022e93e5ccf_946a0a0f-e88c-4879-a8b3-b0b5a57fec74.webp?v=1714910860","width":2000},{"alt":null,"id":23893285142627,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f908efec08f9ae74e86a9f67866a73aaa63a4b8_17e2b15a-721d-48a3-a094-263cf918a3a3.webp?v=1714910862"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f908efec08f9ae74e86a9f67866a73aaa63a4b8_17e2b15a-721d-48a3-a094-263cf918a3a3.webp?v=1714910862","width":2000},{"alt":null,"id":23893285732451,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e0fb123f28999f50cd793264e0e61f6bc1d9c78_89b36745-29ac-4fa6-a2cc-344afb5d7783.webp?v=1714910865"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e0fb123f28999f50cd793264e0e61f6bc1d9c78_89b36745-29ac-4fa6-a2cc-344afb5d7783.webp?v=1714910865","width":2000},{"alt":null,"id":23893286191203,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90e1c54896c14e8f22e63f85bc2762e2c4e8c4d3_71b6a037-7a08-4ffa-a3aa-1a09015a00ab.webp?v=1714910867"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90e1c54896c14e8f22e63f85bc2762e2c4e8c4d3_71b6a037-7a08-4ffa-a3aa-1a09015a00ab.webp?v=1714910867","width":2000},{"alt":null,"id":23893286748259,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/362c62bcdff066d3553c5b4f7bf29a8a478b7814_b040ed58-b398-46cb-b6b6-08019a14028f.webp?v=1714910869"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/362c62bcdff066d3553c5b4f7bf29a8a478b7814_b040ed58-b398-46cb-b6b6-08019a14028f.webp?v=1714910869","width":2000},{"alt":null,"id":23893287829603,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a80a926aea149c7355cb8b20ac70ed30d887810_64c58135-4795-4d5d-8338-73a75e3086c8.webp?v=1714910872"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a80a926aea149c7355cb8b20ac70ed30d887810_64c58135-4795-4d5d-8338-73a75e3086c8.webp?v=1714910872","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910995845219,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-SB08","requires_shipping":true,"taxable":true,"featured_image":{"id":31487941541987,"product_id":7415018618979,"position":8,"created_at":"2024-05-05T20:07:45+08:00","updated_at":"2024-05-05T20:07:45+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e0fb123f28999f50cd793264e0e61f6bc1d9c78_89b36745-29ac-4fa6-a2cc-344afb5d7783.webp?v=1714910865","variant_ids":[41910995845219]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Batman - 復古漫畫插圖 - 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-SB08","featured_media":{"alt":null,"id":23893285732451,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e0fb123f28999f50cd793264e0e61f6bc1d9c78_89b36745-29ac-4fa6-a2cc-344afb5d7783.webp?v=1714910865"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910995845219,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-SB08","requires_shipping":true,"taxable":true,"featured_image":{"id":31487941541987,"product_id":7415018618979,"position":8,"created_at":"2024-05-05T20:07:45+08:00","updated_at":"2024-05-05T20:07:45+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e0fb123f28999f50cd793264e0e61f6bc1d9c78_89b36745-29ac-4fa6-a2cc-344afb5d7783.webp?v=1714910865","variant_ids":[41910995845219]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Batman - 復古漫畫插圖 - 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-SB08","featured_media":{"alt":null,"id":23893285732451,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e0fb123f28999f50cd793264e0e61f6bc1d9c78_89b36745-29ac-4fa6-a2cc-344afb5d7783.webp?v=1714910865"}},"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: "停產" }