$product = {"id":7415071670371,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Batman - 小丑女圖騰","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-sb17","description":null,"published_at":"2024-06-11T17:57:12+08:00","created_at":"2024-05-05T20:17:21+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 pro max","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":41911570661475,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-SB17","requires_shipping":true,"taxable":true,"featured_image":{"id":31488081133667,"product_id":7415071670371,"position":3,"created_at":"2024-05-05T20:17:29+08:00","updated_at":"2024-05-05T20:17:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d63ae14bebf70f522b3510097058923bf6f0c3a_de59bc0d-b9cc-4a51-b65b-7f199c2093c7.webp?v=1714911449","variant_ids":[41911570661475]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 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":"MPB0118724-SB17","featured_media":{"alt":null,"id":23893425520739,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d63ae14bebf70f522b3510097058923bf6f0c3a_de59bc0d-b9cc-4a51-b65b-7f199c2093c7.webp?v=1714911449"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ad8c4a02420cf2880e1f12dcaf9132666f98dd1_fc45e438-00f7-4812-8dfb-1d2ec9c2eba4.webp?v=1714911444","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90f324c9f6569087e2470212953a0f1052e1ffd9_0d7db864-c4c2-44f9-961a-260401626e14.webp?v=1714911446","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d63ae14bebf70f522b3510097058923bf6f0c3a_de59bc0d-b9cc-4a51-b65b-7f199c2093c7.webp?v=1714911449","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95bc8f0902adf7f2f0912183ada6b558b06123fc_1251863c-c361-44e6-b5c4-67e10840b0e9.webp?v=1714911451","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9746be83a186d28043d14a6e76c1a944c56fbef_5d398984-69c3-4d9f-8f6f-2fc219ccf2c5.webp?v=1714911454","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb382869890977d06015149af4cca11e5cc13be5_a6e7565c-5069-4dc3-a789-6c9dd7935467.webp?v=1714911456","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/519d829bb2291baad5c6ad383f2719e830b9cd21_1a0a2f10-1213-4f18-9f98-cefcfb501561.webp?v=1714911459","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f1b816f735631f1ea2dd749e12dbfd2d7aa79e5_3bf77fe7-96b0-4799-83d1-95e283fa84e6.webp?v=1714911461","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fce9ac6ba6fb5b05aa872ede61b6e09cf8d8a6e4_0f346673-3c67-4a1a-a921-c6358948236b.webp?v=1714911464","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f7d6001b73ad97382e5c9689c3422dfc069c91a9_eff3d814-d8d7-4983-8a54-3536ef056d7a.webp?v=1714911466"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ad8c4a02420cf2880e1f12dcaf9132666f98dd1_fc45e438-00f7-4812-8dfb-1d2ec9c2eba4.webp?v=1714911444","options":["color"],"media":[{"alt":null,"id":23893424373859,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ad8c4a02420cf2880e1f12dcaf9132666f98dd1_fc45e438-00f7-4812-8dfb-1d2ec9c2eba4.webp?v=1714911444"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ad8c4a02420cf2880e1f12dcaf9132666f98dd1_fc45e438-00f7-4812-8dfb-1d2ec9c2eba4.webp?v=1714911444","width":2000},{"alt":null,"id":23893425225827,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90f324c9f6569087e2470212953a0f1052e1ffd9_0d7db864-c4c2-44f9-961a-260401626e14.webp?v=1714911446"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90f324c9f6569087e2470212953a0f1052e1ffd9_0d7db864-c4c2-44f9-961a-260401626e14.webp?v=1714911446","width":2000},{"alt":null,"id":23893425520739,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d63ae14bebf70f522b3510097058923bf6f0c3a_de59bc0d-b9cc-4a51-b65b-7f199c2093c7.webp?v=1714911449"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d63ae14bebf70f522b3510097058923bf6f0c3a_de59bc0d-b9cc-4a51-b65b-7f199c2093c7.webp?v=1714911449","width":2000},{"alt":null,"id":23893426241635,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95bc8f0902adf7f2f0912183ada6b558b06123fc_1251863c-c361-44e6-b5c4-67e10840b0e9.webp?v=1714911451"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95bc8f0902adf7f2f0912183ada6b558b06123fc_1251863c-c361-44e6-b5c4-67e10840b0e9.webp?v=1714911451","width":2000},{"alt":null,"id":23893426503779,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9746be83a186d28043d14a6e76c1a944c56fbef_5d398984-69c3-4d9f-8f6f-2fc219ccf2c5.webp?v=1714911454"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9746be83a186d28043d14a6e76c1a944c56fbef_5d398984-69c3-4d9f-8f6f-2fc219ccf2c5.webp?v=1714911454","width":2000},{"alt":null,"id":23893427650659,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb382869890977d06015149af4cca11e5cc13be5_a6e7565c-5069-4dc3-a789-6c9dd7935467.webp?v=1714911456"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb382869890977d06015149af4cca11e5cc13be5_a6e7565c-5069-4dc3-a789-6c9dd7935467.webp?v=1714911456","width":2000},{"alt":null,"id":23893428076643,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/519d829bb2291baad5c6ad383f2719e830b9cd21_1a0a2f10-1213-4f18-9f98-cefcfb501561.webp?v=1714911459"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/519d829bb2291baad5c6ad383f2719e830b9cd21_1a0a2f10-1213-4f18-9f98-cefcfb501561.webp?v=1714911459","width":2000},{"alt":null,"id":23893429026915,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f1b816f735631f1ea2dd749e12dbfd2d7aa79e5_3bf77fe7-96b0-4799-83d1-95e283fa84e6.webp?v=1714911461"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f1b816f735631f1ea2dd749e12dbfd2d7aa79e5_3bf77fe7-96b0-4799-83d1-95e283fa84e6.webp?v=1714911461","width":2000},{"alt":null,"id":23893429485667,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fce9ac6ba6fb5b05aa872ede61b6e09cf8d8a6e4_0f346673-3c67-4a1a-a921-c6358948236b.webp?v=1714911464"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fce9ac6ba6fb5b05aa872ede61b6e09cf8d8a6e4_0f346673-3c67-4a1a-a921-c6358948236b.webp?v=1714911464","width":2000},{"alt":null,"id":23893430075491,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f7d6001b73ad97382e5c9689c3422dfc069c91a9_eff3d814-d8d7-4983-8a54-3536ef056d7a.webp?v=1714911466"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f7d6001b73ad97382e5c9689c3422dfc069c91a9_eff3d814-d8d7-4983-8a54-3536ef056d7a.webp?v=1714911466","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911570661475,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-SB17","requires_shipping":true,"taxable":true,"featured_image":{"id":31488081133667,"product_id":7415071670371,"position":3,"created_at":"2024-05-05T20:17:29+08:00","updated_at":"2024-05-05T20:17:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d63ae14bebf70f522b3510097058923bf6f0c3a_de59bc0d-b9cc-4a51-b65b-7f199c2093c7.webp?v=1714911449","variant_ids":[41911570661475]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 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":"MPB0118724-SB17","featured_media":{"alt":null,"id":23893425520739,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d63ae14bebf70f522b3510097058923bf6f0c3a_de59bc0d-b9cc-4a51-b65b-7f199c2093c7.webp?v=1714911449"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911570661475,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-SB17","requires_shipping":true,"taxable":true,"featured_image":{"id":31488081133667,"product_id":7415071670371,"position":3,"created_at":"2024-05-05T20:17:29+08:00","updated_at":"2024-05-05T20:17:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d63ae14bebf70f522b3510097058923bf6f0c3a_de59bc0d-b9cc-4a51-b65b-7f199c2093c7.webp?v=1714911449","variant_ids":[41911570661475]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 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":"MPB0118724-SB17","featured_media":{"alt":null,"id":23893425520739,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d63ae14bebf70f522b3510097058923bf6f0c3a_de59bc0d-b9cc-4a51-b65b-7f199c2093c7.webp?v=1714911449"}},"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: "停產" }