$product = {"id":7414925459555,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 【獨家設計款】 - 火炎山","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-aa36","description":null,"published_at":"2024-06-11T17:53:14+08:00","created_at":"2024-05-05T19:50:07+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":41909993635939,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-AA36","requires_shipping":true,"taxable":true,"featured_image":{"id":31487699550307,"product_id":7414925459555,"position":7,"created_at":"2024-05-05T19:50:24+08:00","updated_at":"2024-05-05T19:50:24+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0458c8cb2bb13d5299fa93c8b410002290266ef9_b26556da-dfff-4187-8f3d-335f94581fba.webp?v=1714909824","variant_ids":[41909993635939]},"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-AA36","featured_media":{"alt":null,"id":23893043445859,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0458c8cb2bb13d5299fa93c8b410002290266ef9_b26556da-dfff-4187-8f3d-335f94581fba.webp?v=1714909824"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3632b501f504b9f85685eccf8a1431ad0a9edb82_2fe8b1d1-64d0-41b4-b3ed-468edd221639.webp?v=1714909809","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ce8a50417b4205c87e43293d6cb2394f9a30d30_0b06292b-a23b-4d77-9db3-2fa700bcac4f.webp?v=1714909812","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8dcfe007661ac9af240ad26d4666dcbc75456240_b76a74e0-a348-41a7-951a-7cdc614e29c5.webp?v=1714909814","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34c541d39d35aa41ed431c94cc8eeabd8a4faf46_ea775c73-d6e1-418a-b58f-b43b5d8c29d9.webp?v=1714909817","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef105c976e0d7f221907ea30bbadb3fa7ffe643c_4e412546-b3f4-495a-b6ac-0b5379b03dcf.webp?v=1714909819","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a06c2e255ae2a54c8aea170b0a918319f2dd8971_65c40dc7-020a-44bd-ac7c-5d0069962cd3.webp?v=1714909822","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0458c8cb2bb13d5299fa93c8b410002290266ef9_b26556da-dfff-4187-8f3d-335f94581fba.webp?v=1714909824","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f49286c72c3880eb39e39fa4a6f3afb3f9c46c4_9493bf27-68fd-44e8-bc21-c6fcd4547ce6.webp?v=1714909827","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/055a8c679adaf92ce346bb917eacbbedbe868e88_e0accd62-011d-4044-98e1-cae3521bafab.webp?v=1714909829","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be1829c4523af06d6d3e5d6a820e9e1489b2aa1f_27e81ded-dba9-4274-9943-579b3c47d1f0.webp?v=1714909832"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3632b501f504b9f85685eccf8a1431ad0a9edb82_2fe8b1d1-64d0-41b4-b3ed-468edd221639.webp?v=1714909809","options":["color"],"media":[{"alt":null,"id":23893039906915,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3632b501f504b9f85685eccf8a1431ad0a9edb82_2fe8b1d1-64d0-41b4-b3ed-468edd221639.webp?v=1714909809"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3632b501f504b9f85685eccf8a1431ad0a9edb82_2fe8b1d1-64d0-41b4-b3ed-468edd221639.webp?v=1714909809","width":2000},{"alt":null,"id":23893040726115,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ce8a50417b4205c87e43293d6cb2394f9a30d30_0b06292b-a23b-4d77-9db3-2fa700bcac4f.webp?v=1714909812"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ce8a50417b4205c87e43293d6cb2394f9a30d30_0b06292b-a23b-4d77-9db3-2fa700bcac4f.webp?v=1714909812","width":2000},{"alt":null,"id":23893041184867,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8dcfe007661ac9af240ad26d4666dcbc75456240_b76a74e0-a348-41a7-951a-7cdc614e29c5.webp?v=1714909814"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8dcfe007661ac9af240ad26d4666dcbc75456240_b76a74e0-a348-41a7-951a-7cdc614e29c5.webp?v=1714909814","width":2000},{"alt":null,"id":23893041807459,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34c541d39d35aa41ed431c94cc8eeabd8a4faf46_ea775c73-d6e1-418a-b58f-b43b5d8c29d9.webp?v=1714909817"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34c541d39d35aa41ed431c94cc8eeabd8a4faf46_ea775c73-d6e1-418a-b58f-b43b5d8c29d9.webp?v=1714909817","width":2000},{"alt":null,"id":23893042200675,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef105c976e0d7f221907ea30bbadb3fa7ffe643c_4e412546-b3f4-495a-b6ac-0b5379b03dcf.webp?v=1714909819"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef105c976e0d7f221907ea30bbadb3fa7ffe643c_4e412546-b3f4-495a-b6ac-0b5379b03dcf.webp?v=1714909819","width":2000},{"alt":null,"id":23893042888803,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a06c2e255ae2a54c8aea170b0a918319f2dd8971_65c40dc7-020a-44bd-ac7c-5d0069962cd3.webp?v=1714909822"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a06c2e255ae2a54c8aea170b0a918319f2dd8971_65c40dc7-020a-44bd-ac7c-5d0069962cd3.webp?v=1714909822","width":2000},{"alt":null,"id":23893043445859,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0458c8cb2bb13d5299fa93c8b410002290266ef9_b26556da-dfff-4187-8f3d-335f94581fba.webp?v=1714909824"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0458c8cb2bb13d5299fa93c8b410002290266ef9_b26556da-dfff-4187-8f3d-335f94581fba.webp?v=1714909824","width":2000},{"alt":null,"id":23893044330595,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f49286c72c3880eb39e39fa4a6f3afb3f9c46c4_9493bf27-68fd-44e8-bc21-c6fcd4547ce6.webp?v=1714909827"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f49286c72c3880eb39e39fa4a6f3afb3f9c46c4_9493bf27-68fd-44e8-bc21-c6fcd4547ce6.webp?v=1714909827","width":2000},{"alt":null,"id":23893044887651,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/055a8c679adaf92ce346bb917eacbbedbe868e88_e0accd62-011d-4044-98e1-cae3521bafab.webp?v=1714909829"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/055a8c679adaf92ce346bb917eacbbedbe868e88_e0accd62-011d-4044-98e1-cae3521bafab.webp?v=1714909829","width":2000},{"alt":null,"id":23893045248099,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be1829c4523af06d6d3e5d6a820e9e1489b2aa1f_27e81ded-dba9-4274-9943-579b3c47d1f0.webp?v=1714909832"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be1829c4523af06d6d3e5d6a820e9e1489b2aa1f_27e81ded-dba9-4274-9943-579b3c47d1f0.webp?v=1714909832","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41909993635939,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-AA36","requires_shipping":true,"taxable":true,"featured_image":{"id":31487699550307,"product_id":7414925459555,"position":7,"created_at":"2024-05-05T19:50:24+08:00","updated_at":"2024-05-05T19:50:24+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0458c8cb2bb13d5299fa93c8b410002290266ef9_b26556da-dfff-4187-8f3d-335f94581fba.webp?v=1714909824","variant_ids":[41909993635939]},"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-AA36","featured_media":{"alt":null,"id":23893043445859,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0458c8cb2bb13d5299fa93c8b410002290266ef9_b26556da-dfff-4187-8f3d-335f94581fba.webp?v=1714909824"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41909993635939,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-AA36","requires_shipping":true,"taxable":true,"featured_image":{"id":31487699550307,"product_id":7414925459555,"position":7,"created_at":"2024-05-05T19:50:24+08:00","updated_at":"2024-05-05T19:50:24+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0458c8cb2bb13d5299fa93c8b410002290266ef9_b26556da-dfff-4187-8f3d-335f94581fba.webp?v=1714909824","variant_ids":[41909993635939]},"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-AA36","featured_media":{"alt":null,"id":23893043445859,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0458c8cb2bb13d5299fa93c8b410002290266ef9_b26556da-dfff-4187-8f3d-335f94581fba.webp?v=1714909824"}},"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: "停產" }