$product = {"id":7416387403875,"title":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 1G - 抱一個","handle":"iphone-8-mod-nx-printable-iv03","description":null,"published_at":"2024-06-11T16:57:41+08:00","created_at":"2024-05-06T14:47:04+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-1G","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-1chun","device-iPhone 8","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-1chun","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":41919192334435,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-IV03","requires_shipping":true,"taxable":true,"featured_image":{"id":31492003397731,"product_id":7416387403875,"position":2,"created_at":"2024-05-06T14:47:09+08:00","updated_at":"2024-05-06T14:47:09+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/74b0c7a474f9c54fe40a5904489d6918a9e14e14_53f87a61-a3d8-4239-971a-e540de982b56.webp?v=1714978029","variant_ids":[41919192334435]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 1G - 抱一個 - 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":"NPB0105424-IV03","featured_media":{"alt":null,"id":23897417154659,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/74b0c7a474f9c54fe40a5904489d6918a9e14e14_53f87a61-a3d8-4239-971a-e540de982b56.webp?v=1714978029"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/94a1a012cfc436e8ed855929456117e7b0854c90_88d4592e-b28b-4d20-ba0e-412deea4fc2e.webp?v=1714978026","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/74b0c7a474f9c54fe40a5904489d6918a9e14e14_53f87a61-a3d8-4239-971a-e540de982b56.webp?v=1714978029","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/582af8ef4a2421390d6eab12aafa840929e7d054_ae19ae01-75d6-4d1e-a1b4-739e213b1ab3.webp?v=1714978031","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3eeb454ef663ef713d0d80863e393fd819697bd0_1bbb8890-a2c9-4269-8da6-e88f72b0a4be.webp?v=1714978034","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/75d682e224a60649e1f0e4b2246f2b074377d965_bb5241ab-97c8-4724-88b6-326b827d9462.webp?v=1714978036","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a77e2ead8e8176d53416adba3f819337f53bed0_c5f77350-236c-46da-9e32-9f6b83114a75.webp?v=1714978039","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efb0b496e46496b3b1cbad29c874f0ef58dc7048_bdd33ffc-0b35-4428-b5a0-56699fbac05a.webp?v=1714978041","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc5a1a30341d71dc162ccfcc14ed3885d96b6c80_ea3712f4-6d5f-479f-b71a-8030448eb0da.webp?v=1714978043","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f2bfc68d1d3e4849d1015cbedefbdcdea006f5a_1cc8d74d-ee19-405a-986e-3d9bbac830e3.webp?v=1714978048"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/94a1a012cfc436e8ed855929456117e7b0854c90_88d4592e-b28b-4d20-ba0e-412deea4fc2e.webp?v=1714978026","options":["color"],"media":[{"alt":null,"id":23897416532067,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/94a1a012cfc436e8ed855929456117e7b0854c90_88d4592e-b28b-4d20-ba0e-412deea4fc2e.webp?v=1714978026"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/94a1a012cfc436e8ed855929456117e7b0854c90_88d4592e-b28b-4d20-ba0e-412deea4fc2e.webp?v=1714978026","width":2000},{"alt":null,"id":23897417154659,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/74b0c7a474f9c54fe40a5904489d6918a9e14e14_53f87a61-a3d8-4239-971a-e540de982b56.webp?v=1714978029"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/74b0c7a474f9c54fe40a5904489d6918a9e14e14_53f87a61-a3d8-4239-971a-e540de982b56.webp?v=1714978029","width":2000},{"alt":null,"id":23897417580643,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/582af8ef4a2421390d6eab12aafa840929e7d054_ae19ae01-75d6-4d1e-a1b4-739e213b1ab3.webp?v=1714978031"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/582af8ef4a2421390d6eab12aafa840929e7d054_ae19ae01-75d6-4d1e-a1b4-739e213b1ab3.webp?v=1714978031","width":2000},{"alt":null,"id":23897418137699,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3eeb454ef663ef713d0d80863e393fd819697bd0_1bbb8890-a2c9-4269-8da6-e88f72b0a4be.webp?v=1714978034"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3eeb454ef663ef713d0d80863e393fd819697bd0_1bbb8890-a2c9-4269-8da6-e88f72b0a4be.webp?v=1714978034","width":2000},{"alt":null,"id":23897418956899,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/75d682e224a60649e1f0e4b2246f2b074377d965_bb5241ab-97c8-4724-88b6-326b827d9462.webp?v=1714978036"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/75d682e224a60649e1f0e4b2246f2b074377d965_bb5241ab-97c8-4724-88b6-326b827d9462.webp?v=1714978036","width":2000},{"alt":null,"id":23897419481187,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a77e2ead8e8176d53416adba3f819337f53bed0_c5f77350-236c-46da-9e32-9f6b83114a75.webp?v=1714978039"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a77e2ead8e8176d53416adba3f819337f53bed0_c5f77350-236c-46da-9e32-9f6b83114a75.webp?v=1714978039","width":2000},{"alt":null,"id":23897419939939,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efb0b496e46496b3b1cbad29c874f0ef58dc7048_bdd33ffc-0b35-4428-b5a0-56699fbac05a.webp?v=1714978041"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efb0b496e46496b3b1cbad29c874f0ef58dc7048_bdd33ffc-0b35-4428-b5a0-56699fbac05a.webp?v=1714978041","width":2000},{"alt":null,"id":23897420333155,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc5a1a30341d71dc162ccfcc14ed3885d96b6c80_ea3712f4-6d5f-479f-b71a-8030448eb0da.webp?v=1714978043"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc5a1a30341d71dc162ccfcc14ed3885d96b6c80_ea3712f4-6d5f-479f-b71a-8030448eb0da.webp?v=1714978043","width":2000},{"alt":null,"id":23897421283427,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f2bfc68d1d3e4849d1015cbedefbdcdea006f5a_1cc8d74d-ee19-405a-986e-3d9bbac830e3.webp?v=1714978048"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f2bfc68d1d3e4849d1015cbedefbdcdea006f5a_1cc8d74d-ee19-405a-986e-3d9bbac830e3.webp?v=1714978048","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41919192334435,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-IV03","requires_shipping":true,"taxable":true,"featured_image":{"id":31492003397731,"product_id":7416387403875,"position":2,"created_at":"2024-05-06T14:47:09+08:00","updated_at":"2024-05-06T14:47:09+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/74b0c7a474f9c54fe40a5904489d6918a9e14e14_53f87a61-a3d8-4239-971a-e540de982b56.webp?v=1714978029","variant_ids":[41919192334435]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 1G - 抱一個 - 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":"NPB0105424-IV03","featured_media":{"alt":null,"id":23897417154659,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/74b0c7a474f9c54fe40a5904489d6918a9e14e14_53f87a61-a3d8-4239-971a-e540de982b56.webp?v=1714978029"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41919192334435,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-IV03","requires_shipping":true,"taxable":true,"featured_image":{"id":31492003397731,"product_id":7416387403875,"position":2,"created_at":"2024-05-06T14:47:09+08:00","updated_at":"2024-05-06T14:47:09+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/74b0c7a474f9c54fe40a5904489d6918a9e14e14_53f87a61-a3d8-4239-971a-e540de982b56.webp?v=1714978029","variant_ids":[41919192334435]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 1G - 抱一個 - 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":"NPB0105424-IV03","featured_media":{"alt":null,"id":23897417154659,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/74b0c7a474f9c54fe40a5904489d6918a9e14e14_53f87a61-a3d8-4239-971a-e540de982b56.webp?v=1714978029"}},"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: "停產" }