$product = {"id":7415050141795,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Look - 人在做 加納利群島在看","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-af08","description":null,"published_at":"2024-06-11T17:56:38+08:00","created_at":"2024-05-05T20:13:25+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Look","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-look","device-iPhone 12 pro max","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-look","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":41911337746531,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-AF08","requires_shipping":true,"taxable":true,"featured_image":{"id":31488022577251,"product_id":7415050141795,"position":2,"created_at":"2024-05-05T20:13:30+08:00","updated_at":"2024-05-05T20:13:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01865dcfeb118ff5c554a3baccf9310ff2686050_b6a82824-4e14-4fa9-8f0d-a6d18dd3f9c5.webp?v=1714911210","variant_ids":[41911337746531]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Look - 人在做 加納利群島在看 - 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-AF08","featured_media":{"alt":null,"id":23893366898787,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01865dcfeb118ff5c554a3baccf9310ff2686050_b6a82824-4e14-4fa9-8f0d-a6d18dd3f9c5.webp?v=1714911210"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73767482e94c3290dc552cbec1ce1cb87faa5592_45c2387a-52b4-413d-a1d4-0764c1609b94.webp?v=1714911207","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01865dcfeb118ff5c554a3baccf9310ff2686050_b6a82824-4e14-4fa9-8f0d-a6d18dd3f9c5.webp?v=1714911210","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be6cd45478e1b1fd463a359f17d1288c6839806c_edfc094a-ce0b-4b56-ae10-765ae02e6463.webp?v=1714911212","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ae82f6d0203002bd16e9c37dccfd2434b57543f_405f58e8-1c21-4a05-af45-c33d5961d7e7.webp?v=1714911215","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c023d1204dd9382d63ce6a7cdac05a4d060da8af_1b9406a2-31f9-4260-8050-c10e8d958770.webp?v=1714911217","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71f2aae76291038c5646a65ca32f69988f9da2b9_e4c5eb59-3b56-43fd-a1bd-63b25d50b20b.webp?v=1714911219","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/525a3dedb95ca7164d621b48c7d1d6ee6ec92ee3_7c6136ba-40c7-4a96-bc81-0df88977c3bf.webp?v=1714911222","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c76522ca33bf460f2a2c4df56f41383d47ef9a3_bba5582c-9f2e-49fb-934f-471386182189.webp?v=1714911224","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d958845b99fe6a564b72e79f6a3814548f5d78b4_8d726cdd-3f97-45f3-a173-328577808038.webp?v=1714911227","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd27d7a4239726186772f3b8408a8032f2495fc1_d49c8831-089a-4131-abdb-d8b28cae2cd2.webp?v=1714911229"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73767482e94c3290dc552cbec1ce1cb87faa5592_45c2387a-52b4-413d-a1d4-0764c1609b94.webp?v=1714911207","options":["color"],"media":[{"alt":null,"id":23893366341731,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73767482e94c3290dc552cbec1ce1cb87faa5592_45c2387a-52b4-413d-a1d4-0764c1609b94.webp?v=1714911207"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73767482e94c3290dc552cbec1ce1cb87faa5592_45c2387a-52b4-413d-a1d4-0764c1609b94.webp?v=1714911207","width":2000},{"alt":null,"id":23893366898787,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01865dcfeb118ff5c554a3baccf9310ff2686050_b6a82824-4e14-4fa9-8f0d-a6d18dd3f9c5.webp?v=1714911210"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01865dcfeb118ff5c554a3baccf9310ff2686050_b6a82824-4e14-4fa9-8f0d-a6d18dd3f9c5.webp?v=1714911210","width":2000},{"alt":null,"id":23893367423075,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be6cd45478e1b1fd463a359f17d1288c6839806c_edfc094a-ce0b-4b56-ae10-765ae02e6463.webp?v=1714911212"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be6cd45478e1b1fd463a359f17d1288c6839806c_edfc094a-ce0b-4b56-ae10-765ae02e6463.webp?v=1714911212","width":2000},{"alt":null,"id":23893367849059,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ae82f6d0203002bd16e9c37dccfd2434b57543f_405f58e8-1c21-4a05-af45-c33d5961d7e7.webp?v=1714911215"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ae82f6d0203002bd16e9c37dccfd2434b57543f_405f58e8-1c21-4a05-af45-c33d5961d7e7.webp?v=1714911215","width":2000},{"alt":null,"id":23893368701027,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c023d1204dd9382d63ce6a7cdac05a4d060da8af_1b9406a2-31f9-4260-8050-c10e8d958770.webp?v=1714911217"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c023d1204dd9382d63ce6a7cdac05a4d060da8af_1b9406a2-31f9-4260-8050-c10e8d958770.webp?v=1714911217","width":2000},{"alt":null,"id":23893369159779,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71f2aae76291038c5646a65ca32f69988f9da2b9_e4c5eb59-3b56-43fd-a1bd-63b25d50b20b.webp?v=1714911219"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71f2aae76291038c5646a65ca32f69988f9da2b9_e4c5eb59-3b56-43fd-a1bd-63b25d50b20b.webp?v=1714911219","width":2000},{"alt":null,"id":23893369618531,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/525a3dedb95ca7164d621b48c7d1d6ee6ec92ee3_7c6136ba-40c7-4a96-bc81-0df88977c3bf.webp?v=1714911222"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/525a3dedb95ca7164d621b48c7d1d6ee6ec92ee3_7c6136ba-40c7-4a96-bc81-0df88977c3bf.webp?v=1714911222","width":2000},{"alt":null,"id":23893370273891,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c76522ca33bf460f2a2c4df56f41383d47ef9a3_bba5582c-9f2e-49fb-934f-471386182189.webp?v=1714911224"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c76522ca33bf460f2a2c4df56f41383d47ef9a3_bba5582c-9f2e-49fb-934f-471386182189.webp?v=1714911224","width":2000},{"alt":null,"id":23893371093091,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d958845b99fe6a564b72e79f6a3814548f5d78b4_8d726cdd-3f97-45f3-a173-328577808038.webp?v=1714911227"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d958845b99fe6a564b72e79f6a3814548f5d78b4_8d726cdd-3f97-45f3-a173-328577808038.webp?v=1714911227","width":2000},{"alt":null,"id":23893371584611,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd27d7a4239726186772f3b8408a8032f2495fc1_d49c8831-089a-4131-abdb-d8b28cae2cd2.webp?v=1714911229"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd27d7a4239726186772f3b8408a8032f2495fc1_d49c8831-089a-4131-abdb-d8b28cae2cd2.webp?v=1714911229","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911337746531,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-AF08","requires_shipping":true,"taxable":true,"featured_image":{"id":31488022577251,"product_id":7415050141795,"position":2,"created_at":"2024-05-05T20:13:30+08:00","updated_at":"2024-05-05T20:13:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01865dcfeb118ff5c554a3baccf9310ff2686050_b6a82824-4e14-4fa9-8f0d-a6d18dd3f9c5.webp?v=1714911210","variant_ids":[41911337746531]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Look - 人在做 加納利群島在看 - 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-AF08","featured_media":{"alt":null,"id":23893366898787,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01865dcfeb118ff5c554a3baccf9310ff2686050_b6a82824-4e14-4fa9-8f0d-a6d18dd3f9c5.webp?v=1714911210"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911337746531,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-AF08","requires_shipping":true,"taxable":true,"featured_image":{"id":31488022577251,"product_id":7415050141795,"position":2,"created_at":"2024-05-05T20:13:30+08:00","updated_at":"2024-05-05T20:13:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01865dcfeb118ff5c554a3baccf9310ff2686050_b6a82824-4e14-4fa9-8f0d-a6d18dd3f9c5.webp?v=1714911210","variant_ids":[41911337746531]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Look - 人在做 加納利群島在看 - 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-AF08","featured_media":{"alt":null,"id":23893366898787,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01865dcfeb118ff5c554a3baccf9310ff2686050_b6a82824-4e14-4fa9-8f0d-a6d18dd3f9c5.webp?v=1714911210"}},"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: "停產" }