$product = {"id":7414957801571,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 1G - 右看看","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-iv04","description":null,"published_at":"2024-06-11T17:54:07+08:00","created_at":"2024-05-05T19:55:48+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區1G","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-1chun","device-iPhone 12 pro max","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-1chun","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":41910343827555,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-IV04","requires_shipping":true,"taxable":true,"featured_image":{"id":31487780323427,"product_id":7414957801571,"position":10,"created_at":"2024-05-05T19:56:12+08:00","updated_at":"2024-05-05T19:56:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59d3f5f5263c92476a4a66c52b21ebecf3356dea_63c9e92c-33c2-4c14-b197-125306fc06c8.webp?v=1714910172","variant_ids":[41910343827555]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 1G - 右看看 - 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-IV04","featured_media":{"alt":null,"id":23893124317283,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59d3f5f5263c92476a4a66c52b21ebecf3356dea_63c9e92c-33c2-4c14-b197-125306fc06c8.webp?v=1714910172"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fb338d2625ca243576b0d31e9b5be03d1186528_66087a39-dea3-4af6-b930-e514bd23d1bd.webp?v=1714910150","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57dde9a81f38b33b925fcf9a394ded340817c279_cd1bd891-720e-4c69-9faf-9964c2bbaa41.webp?v=1714910152","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1876d422e53a091b2f10e2a5c4e0252b175a256e_f93e706e-850b-4241-af87-10c61058fd01.webp?v=1714910155","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/029e57519c6e20255d23e925c707b676cc6b9bab_615f0743-57db-4a28-8cd0-5c3241d33d6f.webp?v=1714910157","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78892ba05556df91dab3b31a8d28a7cb563b6b0c_3954db4a-1836-4762-ac86-d0ba9ad80668.webp?v=1714910160","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/353def38b62722bea02a27555f6d11d0fb1805f5_cb1277a2-c0b1-430d-8c17-98057587036f.webp?v=1714910162","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be96b3f9891c1b69710ab8e3deeb1c0abc47fca2_59e3b9ca-d1c2-47c4-a5b2-c1bb9c9f98bc.webp?v=1714910165","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9488f0732d1a875035b0851571fc31a14f62c640_9c07bb83-04e8-4893-9b35-7cc4b970f0bc.webp?v=1714910167","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a6b06b29e83f9b29048a37b9893c708ea87d0eec_6f9df8e9-bae4-442a-a255-1c23ec1f2d54.webp?v=1714910169","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59d3f5f5263c92476a4a66c52b21ebecf3356dea_63c9e92c-33c2-4c14-b197-125306fc06c8.webp?v=1714910172"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fb338d2625ca243576b0d31e9b5be03d1186528_66087a39-dea3-4af6-b930-e514bd23d1bd.webp?v=1714910150","options":["color"],"media":[{"alt":null,"id":23893119434851,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fb338d2625ca243576b0d31e9b5be03d1186528_66087a39-dea3-4af6-b930-e514bd23d1bd.webp?v=1714910150"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fb338d2625ca243576b0d31e9b5be03d1186528_66087a39-dea3-4af6-b930-e514bd23d1bd.webp?v=1714910150","width":2000},{"alt":null,"id":23893119860835,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57dde9a81f38b33b925fcf9a394ded340817c279_cd1bd891-720e-4c69-9faf-9964c2bbaa41.webp?v=1714910152"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57dde9a81f38b33b925fcf9a394ded340817c279_cd1bd891-720e-4c69-9faf-9964c2bbaa41.webp?v=1714910152","width":2000},{"alt":null,"id":23893120221283,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1876d422e53a091b2f10e2a5c4e0252b175a256e_f93e706e-850b-4241-af87-10c61058fd01.webp?v=1714910155"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1876d422e53a091b2f10e2a5c4e0252b175a256e_f93e706e-850b-4241-af87-10c61058fd01.webp?v=1714910155","width":2000},{"alt":null,"id":23893120581731,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/029e57519c6e20255d23e925c707b676cc6b9bab_615f0743-57db-4a28-8cd0-5c3241d33d6f.webp?v=1714910157"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/029e57519c6e20255d23e925c707b676cc6b9bab_615f0743-57db-4a28-8cd0-5c3241d33d6f.webp?v=1714910157","width":2000},{"alt":null,"id":23893121368163,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78892ba05556df91dab3b31a8d28a7cb563b6b0c_3954db4a-1836-4762-ac86-d0ba9ad80668.webp?v=1714910160"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78892ba05556df91dab3b31a8d28a7cb563b6b0c_3954db4a-1836-4762-ac86-d0ba9ad80668.webp?v=1714910160","width":2000},{"alt":null,"id":23893122089059,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/353def38b62722bea02a27555f6d11d0fb1805f5_cb1277a2-c0b1-430d-8c17-98057587036f.webp?v=1714910162"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/353def38b62722bea02a27555f6d11d0fb1805f5_cb1277a2-c0b1-430d-8c17-98057587036f.webp?v=1714910162","width":2000},{"alt":null,"id":23893122580579,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be96b3f9891c1b69710ab8e3deeb1c0abc47fca2_59e3b9ca-d1c2-47c4-a5b2-c1bb9c9f98bc.webp?v=1714910165"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be96b3f9891c1b69710ab8e3deeb1c0abc47fca2_59e3b9ca-d1c2-47c4-a5b2-c1bb9c9f98bc.webp?v=1714910165","width":2000},{"alt":null,"id":23893123137635,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9488f0732d1a875035b0851571fc31a14f62c640_9c07bb83-04e8-4893-9b35-7cc4b970f0bc.webp?v=1714910167"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9488f0732d1a875035b0851571fc31a14f62c640_9c07bb83-04e8-4893-9b35-7cc4b970f0bc.webp?v=1714910167","width":2000},{"alt":null,"id":23893123858531,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a6b06b29e83f9b29048a37b9893c708ea87d0eec_6f9df8e9-bae4-442a-a255-1c23ec1f2d54.webp?v=1714910169"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a6b06b29e83f9b29048a37b9893c708ea87d0eec_6f9df8e9-bae4-442a-a255-1c23ec1f2d54.webp?v=1714910169","width":2000},{"alt":null,"id":23893124317283,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59d3f5f5263c92476a4a66c52b21ebecf3356dea_63c9e92c-33c2-4c14-b197-125306fc06c8.webp?v=1714910172"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59d3f5f5263c92476a4a66c52b21ebecf3356dea_63c9e92c-33c2-4c14-b197-125306fc06c8.webp?v=1714910172","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910343827555,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-IV04","requires_shipping":true,"taxable":true,"featured_image":{"id":31487780323427,"product_id":7414957801571,"position":10,"created_at":"2024-05-05T19:56:12+08:00","updated_at":"2024-05-05T19:56:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59d3f5f5263c92476a4a66c52b21ebecf3356dea_63c9e92c-33c2-4c14-b197-125306fc06c8.webp?v=1714910172","variant_ids":[41910343827555]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 1G - 右看看 - 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-IV04","featured_media":{"alt":null,"id":23893124317283,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59d3f5f5263c92476a4a66c52b21ebecf3356dea_63c9e92c-33c2-4c14-b197-125306fc06c8.webp?v=1714910172"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910343827555,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-IV04","requires_shipping":true,"taxable":true,"featured_image":{"id":31487780323427,"product_id":7414957801571,"position":10,"created_at":"2024-05-05T19:56:12+08:00","updated_at":"2024-05-05T19:56:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59d3f5f5263c92476a4a66c52b21ebecf3356dea_63c9e92c-33c2-4c14-b197-125306fc06c8.webp?v=1714910172","variant_ids":[41910343827555]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 1G - 右看看 - 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-IV04","featured_media":{"alt":null,"id":23893124317283,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59d3f5f5263c92476a4a66c52b21ebecf3356dea_63c9e92c-33c2-4c14-b197-125306fc06c8.webp?v=1714910172"}},"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: "停產" }