$product = {"id":7408421994595,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Look - 大自然的傑作(優勝美地國家公園)","handle":"iphone-12-pro-max-mod-nx-printable-af13","description":null,"published_at":"2024-06-11T16:36:47+08:00","created_at":"2024-05-03T15:23:28+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Look","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-look","device-iPhone 12 pro max","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-look","Top50","type-Mod NX Printable"],"price":90000,"price_min":90000,"price_max":90000,"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":41885295018083,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-AF13","requires_shipping":true,"taxable":true,"featured_image":{"id":31472231809123,"product_id":7408421994595,"position":3,"created_at":"2024-05-03T15:23:36+08:00","updated_at":"2024-05-03T15:23:36+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1cc321aef6c2e02b67bc6898759c3d0f867c7b13_a1c2d4a5-5bc5-4dfd-b070-fb778b56c65b.webp?v=1714721016","variant_ids":[41885295018083]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Look - 大自然的傑作(優勝美地國家公園) - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118724-AF13","featured_media":{"alt":null,"id":23877147951203,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1cc321aef6c2e02b67bc6898759c3d0f867c7b13_a1c2d4a5-5bc5-4dfd-b070-fb778b56c65b.webp?v=1714721016"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db599e633b1c62837fb70914ace45fb99194b708_703644b0-f502-4309-add0-937953c77259.webp?v=1714721010","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e61673323543124918d5a24ef2a612e24d4921d_135e3c32-4bc1-4b05-a3db-a76842199bec.webp?v=1714721013","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1cc321aef6c2e02b67bc6898759c3d0f867c7b13_a1c2d4a5-5bc5-4dfd-b070-fb778b56c65b.webp?v=1714721016","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/889d23116792acc6778e7eeff1cb706aa6603b43_e667dbb4-5d28-4422-bc5a-871e2a3f816e.webp?v=1714721018","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10aea2c3d545732d3ef45d45f1816c3baa7a346e_49b2a092-553e-43ed-84ef-bb2aafe2bf1d.webp?v=1714721021","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ccf9d6be72a23cc67509ab533cb612c67c7c4be8_cae46c46-968a-4268-8bb8-a55a958b5ef2.webp?v=1714721023","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10c6961055d1f9183faf83b8b3759338d06be2e6_085e0ca5-ae65-4c71-89c4-8bf9f67e627e.webp?v=1714721026","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8abdacc232534f8d0f2a670ba6e72ef4a803096b_a70b525f-279a-4f62-a5b1-82457d3deae7.webp?v=1714721028","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b038d46a3ff32a58240f3fb66f418cc5ca89ef70_129b7596-a76b-4882-826c-e5831d58397b.webp?v=1714721031","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5abbbda410ae6d1da0e2a2674f1077b51cccf6d8_b9e29629-5694-438b-bcb6-cd1483cde65d.webp?v=1714721033"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db599e633b1c62837fb70914ace45fb99194b708_703644b0-f502-4309-add0-937953c77259.webp?v=1714721010","options":["color"],"media":[{"alt":null,"id":23877145231459,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db599e633b1c62837fb70914ace45fb99194b708_703644b0-f502-4309-add0-937953c77259.webp?v=1714721010"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db599e633b1c62837fb70914ace45fb99194b708_703644b0-f502-4309-add0-937953c77259.webp?v=1714721010","width":2000},{"alt":null,"id":23877146673251,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e61673323543124918d5a24ef2a612e24d4921d_135e3c32-4bc1-4b05-a3db-a76842199bec.webp?v=1714721013"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e61673323543124918d5a24ef2a612e24d4921d_135e3c32-4bc1-4b05-a3db-a76842199bec.webp?v=1714721013","width":2000},{"alt":null,"id":23877147951203,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1cc321aef6c2e02b67bc6898759c3d0f867c7b13_a1c2d4a5-5bc5-4dfd-b070-fb778b56c65b.webp?v=1714721016"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1cc321aef6c2e02b67bc6898759c3d0f867c7b13_a1c2d4a5-5bc5-4dfd-b070-fb778b56c65b.webp?v=1714721016","width":2000},{"alt":null,"id":23877148508259,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/889d23116792acc6778e7eeff1cb706aa6603b43_e667dbb4-5d28-4422-bc5a-871e2a3f816e.webp?v=1714721018"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/889d23116792acc6778e7eeff1cb706aa6603b43_e667dbb4-5d28-4422-bc5a-871e2a3f816e.webp?v=1714721018","width":2000},{"alt":null,"id":23877148967011,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10aea2c3d545732d3ef45d45f1816c3baa7a346e_49b2a092-553e-43ed-84ef-bb2aafe2bf1d.webp?v=1714721021"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10aea2c3d545732d3ef45d45f1816c3baa7a346e_49b2a092-553e-43ed-84ef-bb2aafe2bf1d.webp?v=1714721021","width":2000},{"alt":null,"id":23877149556835,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ccf9d6be72a23cc67509ab533cb612c67c7c4be8_cae46c46-968a-4268-8bb8-a55a958b5ef2.webp?v=1714721023"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ccf9d6be72a23cc67509ab533cb612c67c7c4be8_cae46c46-968a-4268-8bb8-a55a958b5ef2.webp?v=1714721023","width":2000},{"alt":null,"id":23877150179427,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10c6961055d1f9183faf83b8b3759338d06be2e6_085e0ca5-ae65-4c71-89c4-8bf9f67e627e.webp?v=1714721026"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10c6961055d1f9183faf83b8b3759338d06be2e6_085e0ca5-ae65-4c71-89c4-8bf9f67e627e.webp?v=1714721026","width":2000},{"alt":null,"id":23877150736483,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8abdacc232534f8d0f2a670ba6e72ef4a803096b_a70b525f-279a-4f62-a5b1-82457d3deae7.webp?v=1714721028"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8abdacc232534f8d0f2a670ba6e72ef4a803096b_a70b525f-279a-4f62-a5b1-82457d3deae7.webp?v=1714721028","width":2000},{"alt":null,"id":23877151228003,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b038d46a3ff32a58240f3fb66f418cc5ca89ef70_129b7596-a76b-4882-826c-e5831d58397b.webp?v=1714721031"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b038d46a3ff32a58240f3fb66f418cc5ca89ef70_129b7596-a76b-4882-826c-e5831d58397b.webp?v=1714721031","width":2000},{"alt":null,"id":23877151719523,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5abbbda410ae6d1da0e2a2674f1077b51cccf6d8_b9e29629-5694-438b-bcb6-cd1483cde65d.webp?v=1714721033"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5abbbda410ae6d1da0e2a2674f1077b51cccf6d8_b9e29629-5694-438b-bcb6-cd1483cde65d.webp?v=1714721033","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41885295018083,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-AF13","requires_shipping":true,"taxable":true,"featured_image":{"id":31472231809123,"product_id":7408421994595,"position":3,"created_at":"2024-05-03T15:23:36+08:00","updated_at":"2024-05-03T15:23:36+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1cc321aef6c2e02b67bc6898759c3d0f867c7b13_a1c2d4a5-5bc5-4dfd-b070-fb778b56c65b.webp?v=1714721016","variant_ids":[41885295018083]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Look - 大自然的傑作(優勝美地國家公園) - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118724-AF13","featured_media":{"alt":null,"id":23877147951203,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1cc321aef6c2e02b67bc6898759c3d0f867c7b13_a1c2d4a5-5bc5-4dfd-b070-fb778b56c65b.webp?v=1714721016"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41885295018083,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-AF13","requires_shipping":true,"taxable":true,"featured_image":{"id":31472231809123,"product_id":7408421994595,"position":3,"created_at":"2024-05-03T15:23:36+08:00","updated_at":"2024-05-03T15:23:36+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1cc321aef6c2e02b67bc6898759c3d0f867c7b13_a1c2d4a5-5bc5-4dfd-b070-fb778b56c65b.webp?v=1714721016","variant_ids":[41885295018083]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Look - 大自然的傑作(優勝美地國家公園) - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118724-AF13","featured_media":{"alt":null,"id":23877147951203,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1cc321aef6c2e02b67bc6898759c3d0f867c7b13_a1c2d4a5-5bc5-4dfd-b070-fb778b56c65b.webp?v=1714721016"}},"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: "停產" }