$product = {"id":7415075635299,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 【獨家設計款】 - 星雨夜空","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-a046","description":null,"published_at":"2024-06-11T17:57:18+08:00","created_at":"2024-05-05T20:18:03+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"MOD NX MagSafe 客製化","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","device-iPhone 12 pro max","discountable-item","member","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller","reseller-modnx-magsafe","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":41911605788771,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-A046","requires_shipping":true,"taxable":true,"featured_image":{"id":31488091586659,"product_id":7415075635299,"position":4,"created_at":"2024-05-05T20:18:13+08:00","updated_at":"2024-05-05T20:18:13+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf2262155be42bfe1ab7661ecb179dc0101623f2_f36590b0-1d6e-4e08-9657-f2b0cf5493d0.webp?v=1714911493","variant_ids":[41911605788771]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 【獨家設計款】 - 星雨夜空 - 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-A046","featured_media":{"alt":null,"id":23893436072035,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf2262155be42bfe1ab7661ecb179dc0101623f2_f36590b0-1d6e-4e08-9657-f2b0cf5493d0.webp?v=1714911493"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b086d162ab6ab834a189bb9131ddef7c85a3500_7ab428b8-2646-4ee5-8b64-603e7e2cc7d8.webp?v=1714911485","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/407d222e0ce233fb881a015218147a3aaa7c6fd5_aaa97ae0-84bf-46e5-a16f-a2cae14668b0.webp?v=1714911488","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67d66f63b120751eed19bc9cb4581d77c258a632_4d66c757-86a7-4191-9353-9f8adbc30908.webp?v=1714911490","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf2262155be42bfe1ab7661ecb179dc0101623f2_f36590b0-1d6e-4e08-9657-f2b0cf5493d0.webp?v=1714911493","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2887cef3276cfaa1ebf91360f8a292216d5eddd_a24ef415-5b9c-400c-9a1d-1693122bf1b5.webp?v=1714911495","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2302e749956bb73c246ea5827ea0a1ecbc62af9b_7ed30d59-1575-4a46-923e-fa5982ef1f41.webp?v=1714911498","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73b72ffd0310c978a3dd7b3bd76a780f1e6e57a4_0de21047-b205-4ebd-a5ef-07f5906e1509.webp?v=1714911500","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/130ec366e89c902dc01d702a69c6b076c525773c_f9e99f3a-d5dc-4df1-a730-cdbfc9ea3fc6.webp?v=1714911503","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4a0c3178dadefe00ffbd78f783d6198820730a7_45323536-3cde-49e9-84bd-5cd557ec3339.webp?v=1714911505","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/039ada9d834eeecca5869500151ea55daae1cd45_dec14fcd-70e4-43f8-b65e-15a325c4da82.webp?v=1714911508"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b086d162ab6ab834a189bb9131ddef7c85a3500_7ab428b8-2646-4ee5-8b64-603e7e2cc7d8.webp?v=1714911485","options":["color"],"media":[{"alt":null,"id":23893434302563,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b086d162ab6ab834a189bb9131ddef7c85a3500_7ab428b8-2646-4ee5-8b64-603e7e2cc7d8.webp?v=1714911485"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b086d162ab6ab834a189bb9131ddef7c85a3500_7ab428b8-2646-4ee5-8b64-603e7e2cc7d8.webp?v=1714911485","width":2000},{"alt":null,"id":23893434957923,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/407d222e0ce233fb881a015218147a3aaa7c6fd5_aaa97ae0-84bf-46e5-a16f-a2cae14668b0.webp?v=1714911488"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/407d222e0ce233fb881a015218147a3aaa7c6fd5_aaa97ae0-84bf-46e5-a16f-a2cae14668b0.webp?v=1714911488","width":2000},{"alt":null,"id":23893435383907,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67d66f63b120751eed19bc9cb4581d77c258a632_4d66c757-86a7-4191-9353-9f8adbc30908.webp?v=1714911490"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67d66f63b120751eed19bc9cb4581d77c258a632_4d66c757-86a7-4191-9353-9f8adbc30908.webp?v=1714911490","width":2000},{"alt":null,"id":23893436072035,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf2262155be42bfe1ab7661ecb179dc0101623f2_f36590b0-1d6e-4e08-9657-f2b0cf5493d0.webp?v=1714911493"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf2262155be42bfe1ab7661ecb179dc0101623f2_f36590b0-1d6e-4e08-9657-f2b0cf5493d0.webp?v=1714911493","width":2000},{"alt":null,"id":23893436924003,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2887cef3276cfaa1ebf91360f8a292216d5eddd_a24ef415-5b9c-400c-9a1d-1693122bf1b5.webp?v=1714911495"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2887cef3276cfaa1ebf91360f8a292216d5eddd_a24ef415-5b9c-400c-9a1d-1693122bf1b5.webp?v=1714911495","width":2000},{"alt":null,"id":23893437382755,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2302e749956bb73c246ea5827ea0a1ecbc62af9b_7ed30d59-1575-4a46-923e-fa5982ef1f41.webp?v=1714911498"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2302e749956bb73c246ea5827ea0a1ecbc62af9b_7ed30d59-1575-4a46-923e-fa5982ef1f41.webp?v=1714911498","width":2000},{"alt":null,"id":23893437907043,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73b72ffd0310c978a3dd7b3bd76a780f1e6e57a4_0de21047-b205-4ebd-a5ef-07f5906e1509.webp?v=1714911500"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73b72ffd0310c978a3dd7b3bd76a780f1e6e57a4_0de21047-b205-4ebd-a5ef-07f5906e1509.webp?v=1714911500","width":2000},{"alt":null,"id":23893438496867,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/130ec366e89c902dc01d702a69c6b076c525773c_f9e99f3a-d5dc-4df1-a730-cdbfc9ea3fc6.webp?v=1714911503"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/130ec366e89c902dc01d702a69c6b076c525773c_f9e99f3a-d5dc-4df1-a730-cdbfc9ea3fc6.webp?v=1714911503","width":2000},{"alt":null,"id":23893439250531,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4a0c3178dadefe00ffbd78f783d6198820730a7_45323536-3cde-49e9-84bd-5cd557ec3339.webp?v=1714911505"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4a0c3178dadefe00ffbd78f783d6198820730a7_45323536-3cde-49e9-84bd-5cd557ec3339.webp?v=1714911505","width":2000},{"alt":null,"id":23893439742051,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/039ada9d834eeecca5869500151ea55daae1cd45_dec14fcd-70e4-43f8-b65e-15a325c4da82.webp?v=1714911508"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/039ada9d834eeecca5869500151ea55daae1cd45_dec14fcd-70e4-43f8-b65e-15a325c4da82.webp?v=1714911508","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911605788771,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-A046","requires_shipping":true,"taxable":true,"featured_image":{"id":31488091586659,"product_id":7415075635299,"position":4,"created_at":"2024-05-05T20:18:13+08:00","updated_at":"2024-05-05T20:18:13+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf2262155be42bfe1ab7661ecb179dc0101623f2_f36590b0-1d6e-4e08-9657-f2b0cf5493d0.webp?v=1714911493","variant_ids":[41911605788771]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 【獨家設計款】 - 星雨夜空 - 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-A046","featured_media":{"alt":null,"id":23893436072035,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf2262155be42bfe1ab7661ecb179dc0101623f2_f36590b0-1d6e-4e08-9657-f2b0cf5493d0.webp?v=1714911493"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911605788771,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-A046","requires_shipping":true,"taxable":true,"featured_image":{"id":31488091586659,"product_id":7415075635299,"position":4,"created_at":"2024-05-05T20:18:13+08:00","updated_at":"2024-05-05T20:18:13+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf2262155be42bfe1ab7661ecb179dc0101623f2_f36590b0-1d6e-4e08-9657-f2b0cf5493d0.webp?v=1714911493","variant_ids":[41911605788771]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 【獨家設計款】 - 星雨夜空 - 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-A046","featured_media":{"alt":null,"id":23893436072035,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf2262155be42bfe1ab7661ecb179dc0101623f2_f36590b0-1d6e-4e08-9657-f2b0cf5493d0.webp?v=1714911493"}},"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: "停產" }