$product = {"id":7415096574051,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Care Bears - 粉紫樂園","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-yb13","description":null,"published_at":"2024-06-11T17:57:52+08:00","created_at":"2024-05-05T20:22:08+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 pro max","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":41911829102691,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-YB13","requires_shipping":true,"taxable":true,"featured_image":{"id":31488152502371,"product_id":7415096574051,"position":6,"created_at":"2024-05-05T20:22:23+08:00","updated_at":"2024-05-05T20:22:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3384bbfc16e9c706583a44ec8fe2a7f87502e8f9_55e161c5-073b-43cc-9096-6a2b7b467fa6.webp?v=1714911743","variant_ids":[41911829102691]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 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":"MPB0118724-YB13","featured_media":{"alt":null,"id":23893497151587,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3384bbfc16e9c706583a44ec8fe2a7f87502e8f9_55e161c5-073b-43cc-9096-6a2b7b467fa6.webp?v=1714911743"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e57a8ee36d00e98a68cd65a935a4a23536996e86_6f14f002-400c-45ef-9554-26761658e377.webp?v=1714911730","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e6930eeac623f98bb32aabd3ebaad13a45fd62f_5e4237b9-ee7b-44cf-99d1-3157bd07a8d6.webp?v=1714911733","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ece3b752a342a3fbfe8fcaf42d10eb62c0b63a76_f2488d3f-bc58-40c4-bd57-a36d11d240bb.webp?v=1714911735","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f386f659110ec73860de2ebac1b3aebcb3db04f_fc298415-5cdc-49eb-9841-00d3531c4a7f.webp?v=1714911738","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/883bf166b2af020b2ffd5fda5d6c8d491c185556_5770f380-2e27-4ca4-8cab-8033f3c1dfbc.webp?v=1714911740","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3384bbfc16e9c706583a44ec8fe2a7f87502e8f9_55e161c5-073b-43cc-9096-6a2b7b467fa6.webp?v=1714911743","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/74d20bb703ef3ac414ff1a8e014f40f9f76c2e23_cc5aa147-8f11-4c8f-8606-496daef3905c.webp?v=1714911745","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/802537af5af96373ac6bab259eee094bba800be9_f91460f2-1eef-4d13-9379-cc3786aff249.webp?v=1714911747","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8bec787a0347a9585f2dfa8348803e2df349d3d6_18e36424-f131-49ba-a79b-f4c7850af87b.webp?v=1714911750","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/92413db4101cb883c8bc36c6c4bfaf9a06f60a33_a481744e-eb50-46ec-b36b-0551f0d9017a.webp?v=1714911752"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e57a8ee36d00e98a68cd65a935a4a23536996e86_6f14f002-400c-45ef-9554-26761658e377.webp?v=1714911730","options":["color"],"media":[{"alt":null,"id":23893494104163,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e57a8ee36d00e98a68cd65a935a4a23536996e86_6f14f002-400c-45ef-9554-26761658e377.webp?v=1714911730"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e57a8ee36d00e98a68cd65a935a4a23536996e86_6f14f002-400c-45ef-9554-26761658e377.webp?v=1714911730","width":2000},{"alt":null,"id":23893494825059,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e6930eeac623f98bb32aabd3ebaad13a45fd62f_5e4237b9-ee7b-44cf-99d1-3157bd07a8d6.webp?v=1714911733"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e6930eeac623f98bb32aabd3ebaad13a45fd62f_5e4237b9-ee7b-44cf-99d1-3157bd07a8d6.webp?v=1714911733","width":2000},{"alt":null,"id":23893495316579,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ece3b752a342a3fbfe8fcaf42d10eb62c0b63a76_f2488d3f-bc58-40c4-bd57-a36d11d240bb.webp?v=1714911735"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ece3b752a342a3fbfe8fcaf42d10eb62c0b63a76_f2488d3f-bc58-40c4-bd57-a36d11d240bb.webp?v=1714911735","width":2000},{"alt":null,"id":23893496004707,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f386f659110ec73860de2ebac1b3aebcb3db04f_fc298415-5cdc-49eb-9841-00d3531c4a7f.webp?v=1714911738"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f386f659110ec73860de2ebac1b3aebcb3db04f_fc298415-5cdc-49eb-9841-00d3531c4a7f.webp?v=1714911738","width":2000},{"alt":null,"id":23893496660067,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/883bf166b2af020b2ffd5fda5d6c8d491c185556_5770f380-2e27-4ca4-8cab-8033f3c1dfbc.webp?v=1714911740"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/883bf166b2af020b2ffd5fda5d6c8d491c185556_5770f380-2e27-4ca4-8cab-8033f3c1dfbc.webp?v=1714911740","width":2000},{"alt":null,"id":23893497151587,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3384bbfc16e9c706583a44ec8fe2a7f87502e8f9_55e161c5-073b-43cc-9096-6a2b7b467fa6.webp?v=1714911743"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3384bbfc16e9c706583a44ec8fe2a7f87502e8f9_55e161c5-073b-43cc-9096-6a2b7b467fa6.webp?v=1714911743","width":2000},{"alt":null,"id":23893497577571,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/74d20bb703ef3ac414ff1a8e014f40f9f76c2e23_cc5aa147-8f11-4c8f-8606-496daef3905c.webp?v=1714911745"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/74d20bb703ef3ac414ff1a8e014f40f9f76c2e23_cc5aa147-8f11-4c8f-8606-496daef3905c.webp?v=1714911745","width":2000},{"alt":null,"id":23893498036323,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/802537af5af96373ac6bab259eee094bba800be9_f91460f2-1eef-4d13-9379-cc3786aff249.webp?v=1714911747"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/802537af5af96373ac6bab259eee094bba800be9_f91460f2-1eef-4d13-9379-cc3786aff249.webp?v=1714911747","width":2000},{"alt":null,"id":23893498724451,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8bec787a0347a9585f2dfa8348803e2df349d3d6_18e36424-f131-49ba-a79b-f4c7850af87b.webp?v=1714911750"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8bec787a0347a9585f2dfa8348803e2df349d3d6_18e36424-f131-49ba-a79b-f4c7850af87b.webp?v=1714911750","width":2000},{"alt":null,"id":23893499314275,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/92413db4101cb883c8bc36c6c4bfaf9a06f60a33_a481744e-eb50-46ec-b36b-0551f0d9017a.webp?v=1714911752"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/92413db4101cb883c8bc36c6c4bfaf9a06f60a33_a481744e-eb50-46ec-b36b-0551f0d9017a.webp?v=1714911752","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911829102691,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-YB13","requires_shipping":true,"taxable":true,"featured_image":{"id":31488152502371,"product_id":7415096574051,"position":6,"created_at":"2024-05-05T20:22:23+08:00","updated_at":"2024-05-05T20:22:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3384bbfc16e9c706583a44ec8fe2a7f87502e8f9_55e161c5-073b-43cc-9096-6a2b7b467fa6.webp?v=1714911743","variant_ids":[41911829102691]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 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":"MPB0118724-YB13","featured_media":{"alt":null,"id":23893497151587,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3384bbfc16e9c706583a44ec8fe2a7f87502e8f9_55e161c5-073b-43cc-9096-6a2b7b467fa6.webp?v=1714911743"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911829102691,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-YB13","requires_shipping":true,"taxable":true,"featured_image":{"id":31488152502371,"product_id":7415096574051,"position":6,"created_at":"2024-05-05T20:22:23+08:00","updated_at":"2024-05-05T20:22:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3384bbfc16e9c706583a44ec8fe2a7f87502e8f9_55e161c5-073b-43cc-9096-6a2b7b467fa6.webp?v=1714911743","variant_ids":[41911829102691]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 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":"MPB0118724-YB13","featured_media":{"alt":null,"id":23893497151587,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3384bbfc16e9c706583a44ec8fe2a7f87502e8f9_55e161c5-073b-43cc-9096-6a2b7b467fa6.webp?v=1714911743"}},"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: "停產" }