$product = {"id":7415050371171,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 風暴兵-經典","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb22","description":null,"published_at":"2024-06-11T17:56:38+08:00","created_at":"2024-05-05T20:13:26+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":41911340597347,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB22","requires_shipping":true,"taxable":true,"featured_image":{"id":31488024477795,"product_id":7415050371171,"position":5,"created_at":"2024-05-05T20:13:38+08:00","updated_at":"2024-05-05T20:13:38+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1241c2ee9ba93de85de28b053ecf939c25003beb_54cb7100-94a2-4433-bf1a-643cad104ad3.webp?v=1714911218","variant_ids":[41911340597347]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 風暴兵-經典 - 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-PB22","featured_media":{"alt":null,"id":23893368799331,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1241c2ee9ba93de85de28b053ecf939c25003beb_54cb7100-94a2-4433-bf1a-643cad104ad3.webp?v=1714911218"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d8a8c6186c6c0139478ffb0f7ff01e5129da514_a034d9b8-ba30-4957-b667-225db97376a5.webp?v=1714911208","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c101f2afb0f475d83cd51a87cb25b1439dda298_e24b5d2d-d9a6-40ff-90b0-9e927431ac62.webp?v=1714911210","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/350f4b56647d2b65f0d8ec9534bbb2e54463e4dc_619ffadd-7567-46bf-bf5b-c8123b6b8ee5.webp?v=1714911213","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57b6dea6d22cdbc391b1bcb3158a128eca305430_f41dc2f1-95a5-4138-993b-df9feb721548.webp?v=1714911215","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1241c2ee9ba93de85de28b053ecf939c25003beb_54cb7100-94a2-4433-bf1a-643cad104ad3.webp?v=1714911218","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/131f61c66f4f42c895ba18c8e76d755b04d99467_a29715b7-b2aa-4d04-868b-a392ffa76758.webp?v=1714911220","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9e64ebaa08650db82c41eb498d1e989d6fea067_386080e3-e841-41ea-8241-3f1e42f3ce8d.webp?v=1714911223","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e44afbf7ccfb193677d82de848f8cee53eef9814_eec155bd-61eb-4f51-bf5c-9e5515082369.webp?v=1714911225","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fea5d1104df7ac876d12fbf4e493c0d70e0cfe5_60592a3e-4017-422b-8c53-7142d661c363.webp?v=1714911227","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2c826a1b4234de78abb66f87e397b3dbe33711c_62ea14dd-ccd3-4ae8-9e19-e8c584e6bd30.webp?v=1714911230","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95fc1029e2e91b779d2c0921b5129daf7f9703f0_dc530b15-0e1d-4f34-b411-2a59cad004b5.webp?v=1714911233"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d8a8c6186c6c0139478ffb0f7ff01e5129da514_a034d9b8-ba30-4957-b667-225db97376a5.webp?v=1714911208","options":["color"],"media":[{"alt":null,"id":23893366636643,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d8a8c6186c6c0139478ffb0f7ff01e5129da514_a034d9b8-ba30-4957-b667-225db97376a5.webp?v=1714911208"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d8a8c6186c6c0139478ffb0f7ff01e5129da514_a034d9b8-ba30-4957-b667-225db97376a5.webp?v=1714911208","width":2000},{"alt":null,"id":23893367128163,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c101f2afb0f475d83cd51a87cb25b1439dda298_e24b5d2d-d9a6-40ff-90b0-9e927431ac62.webp?v=1714911210"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c101f2afb0f475d83cd51a87cb25b1439dda298_e24b5d2d-d9a6-40ff-90b0-9e927431ac62.webp?v=1714911210","width":2000},{"alt":null,"id":23893367488611,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/350f4b56647d2b65f0d8ec9534bbb2e54463e4dc_619ffadd-7567-46bf-bf5b-c8123b6b8ee5.webp?v=1714911213"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/350f4b56647d2b65f0d8ec9534bbb2e54463e4dc_619ffadd-7567-46bf-bf5b-c8123b6b8ee5.webp?v=1714911213","width":2000},{"alt":null,"id":23893368209507,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57b6dea6d22cdbc391b1bcb3158a128eca305430_f41dc2f1-95a5-4138-993b-df9feb721548.webp?v=1714911215"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57b6dea6d22cdbc391b1bcb3158a128eca305430_f41dc2f1-95a5-4138-993b-df9feb721548.webp?v=1714911215","width":2000},{"alt":null,"id":23893368799331,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1241c2ee9ba93de85de28b053ecf939c25003beb_54cb7100-94a2-4433-bf1a-643cad104ad3.webp?v=1714911218"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1241c2ee9ba93de85de28b053ecf939c25003beb_54cb7100-94a2-4433-bf1a-643cad104ad3.webp?v=1714911218","width":2000},{"alt":null,"id":23893369323619,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/131f61c66f4f42c895ba18c8e76d755b04d99467_a29715b7-b2aa-4d04-868b-a392ffa76758.webp?v=1714911220"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/131f61c66f4f42c895ba18c8e76d755b04d99467_a29715b7-b2aa-4d04-868b-a392ffa76758.webp?v=1714911220","width":2000},{"alt":null,"id":23893369749603,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9e64ebaa08650db82c41eb498d1e989d6fea067_386080e3-e841-41ea-8241-3f1e42f3ce8d.webp?v=1714911223"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9e64ebaa08650db82c41eb498d1e989d6fea067_386080e3-e841-41ea-8241-3f1e42f3ce8d.webp?v=1714911223","width":2000},{"alt":null,"id":23893370699875,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e44afbf7ccfb193677d82de848f8cee53eef9814_eec155bd-61eb-4f51-bf5c-9e5515082369.webp?v=1714911225"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e44afbf7ccfb193677d82de848f8cee53eef9814_eec155bd-61eb-4f51-bf5c-9e5515082369.webp?v=1714911225","width":2000},{"alt":null,"id":23893371191395,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fea5d1104df7ac876d12fbf4e493c0d70e0cfe5_60592a3e-4017-422b-8c53-7142d661c363.webp?v=1714911227"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fea5d1104df7ac876d12fbf4e493c0d70e0cfe5_60592a3e-4017-422b-8c53-7142d661c363.webp?v=1714911227","width":2000},{"alt":null,"id":23893371748451,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2c826a1b4234de78abb66f87e397b3dbe33711c_62ea14dd-ccd3-4ae8-9e19-e8c584e6bd30.webp?v=1714911230"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2c826a1b4234de78abb66f87e397b3dbe33711c_62ea14dd-ccd3-4ae8-9e19-e8c584e6bd30.webp?v=1714911230","width":2000},{"alt":null,"id":23893372207203,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95fc1029e2e91b779d2c0921b5129daf7f9703f0_dc530b15-0e1d-4f34-b411-2a59cad004b5.webp?v=1714911233"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95fc1029e2e91b779d2c0921b5129daf7f9703f0_dc530b15-0e1d-4f34-b411-2a59cad004b5.webp?v=1714911233","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911340597347,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB22","requires_shipping":true,"taxable":true,"featured_image":{"id":31488024477795,"product_id":7415050371171,"position":5,"created_at":"2024-05-05T20:13:38+08:00","updated_at":"2024-05-05T20:13:38+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1241c2ee9ba93de85de28b053ecf939c25003beb_54cb7100-94a2-4433-bf1a-643cad104ad3.webp?v=1714911218","variant_ids":[41911340597347]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 風暴兵-經典 - 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-PB22","featured_media":{"alt":null,"id":23893368799331,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1241c2ee9ba93de85de28b053ecf939c25003beb_54cb7100-94a2-4433-bf1a-643cad104ad3.webp?v=1714911218"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911340597347,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB22","requires_shipping":true,"taxable":true,"featured_image":{"id":31488024477795,"product_id":7415050371171,"position":5,"created_at":"2024-05-05T20:13:38+08:00","updated_at":"2024-05-05T20:13:38+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1241c2ee9ba93de85de28b053ecf939c25003beb_54cb7100-94a2-4433-bf1a-643cad104ad3.webp?v=1714911218","variant_ids":[41911340597347]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 風暴兵-經典 - 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-PB22","featured_media":{"alt":null,"id":23893368799331,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1241c2ee9ba93de85de28b053ecf939c25003beb_54cb7100-94a2-4433-bf1a-643cad104ad3.webp?v=1714911218"}},"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: "停產" }