$product = {"id":7408558833763,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Look - 大自然的傑作(黃石國家公園)","handle":"iphone-12-pro-max-mod-nx-printable-af12","description":null,"published_at":"2024-06-11T16:40:41+08:00","created_at":"2024-05-03T15:50:30+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":41886864015459,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-AF12","requires_shipping":true,"taxable":true,"featured_image":{"id":31472590749795,"product_id":7408558833763,"position":9,"created_at":"2024-05-03T15:50:53+08:00","updated_at":"2024-05-03T15:50:53+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fec3ea40a6796cdbd0bd713a3100b9876121c901_fd5725b6-32fc-4e16-8c2b-b1b864df1f09.webp?v=1714722653","variant_ids":[41886864015459]},"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-AF12","featured_media":{"alt":null,"id":23877508202595,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fec3ea40a6796cdbd0bd713a3100b9876121c901_fd5725b6-32fc-4e16-8c2b-b1b864df1f09.webp?v=1714722653"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a10a7bedeb9f31f5fb7e160f6b72ebb0ed59051_7e14e6df-4529-440e-866a-9c4843e07186.webp?v=1714722633","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e57af3ec2dfc7cb93024d28fe65fa903408c4d85_e08d9881-564b-4e74-959c-71df74a9da9b.webp?v=1714722635","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4bb2a2b84eeb539a451b0d11772dbb49959e691b_bfadd7fc-d714-4453-a430-0b07d7e0a66c.webp?v=1714722637","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/734b9ff8d64d5053ff64f944c125dd70586181e7_609e4d08-0a31-4dbd-9320-224a132703aa.webp?v=1714722640","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d85b7f7081a49dd5b1deae8e5b612e655febf6f_ead2cd27-82b8-4f24-9410-96363d96ce80.webp?v=1714722642","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc94cb8dfa506b16e3b33156b5a2bc2b78363070_ad73b13e-f8e8-4cfe-9c1a-1026ee9c763f.webp?v=1714722645","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c972f7ac1bc30956be93a438eef082a2d891b31_73a72a25-e0a3-4c5c-86c4-9d64f0a0de3b.webp?v=1714722648","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38ee176318d79e961c0089a1544dbe7a4a6ac9e6_1aab3d7b-9a54-48dd-ab48-5f729726657b.webp?v=1714722650","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fec3ea40a6796cdbd0bd713a3100b9876121c901_fd5725b6-32fc-4e16-8c2b-b1b864df1f09.webp?v=1714722653","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad9056a4c56bbe73daa32174d7e9ce833e930469_36225e66-7b56-47a7-9c06-8213ff9b667d.webp?v=1714722655"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a10a7bedeb9f31f5fb7e160f6b72ebb0ed59051_7e14e6df-4529-440e-866a-9c4843e07186.webp?v=1714722633","options":["color"],"media":[{"alt":null,"id":23877504041059,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a10a7bedeb9f31f5fb7e160f6b72ebb0ed59051_7e14e6df-4529-440e-866a-9c4843e07186.webp?v=1714722633"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a10a7bedeb9f31f5fb7e160f6b72ebb0ed59051_7e14e6df-4529-440e-866a-9c4843e07186.webp?v=1714722633","width":2000},{"alt":null,"id":23877504565347,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e57af3ec2dfc7cb93024d28fe65fa903408c4d85_e08d9881-564b-4e74-959c-71df74a9da9b.webp?v=1714722635"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e57af3ec2dfc7cb93024d28fe65fa903408c4d85_e08d9881-564b-4e74-959c-71df74a9da9b.webp?v=1714722635","width":2000},{"alt":null,"id":23877504991331,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4bb2a2b84eeb539a451b0d11772dbb49959e691b_bfadd7fc-d714-4453-a430-0b07d7e0a66c.webp?v=1714722637"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4bb2a2b84eeb539a451b0d11772dbb49959e691b_bfadd7fc-d714-4453-a430-0b07d7e0a66c.webp?v=1714722637","width":2000},{"alt":null,"id":23877505613923,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/734b9ff8d64d5053ff64f944c125dd70586181e7_609e4d08-0a31-4dbd-9320-224a132703aa.webp?v=1714722640"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/734b9ff8d64d5053ff64f944c125dd70586181e7_609e4d08-0a31-4dbd-9320-224a132703aa.webp?v=1714722640","width":2000},{"alt":null,"id":23877506072675,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d85b7f7081a49dd5b1deae8e5b612e655febf6f_ead2cd27-82b8-4f24-9410-96363d96ce80.webp?v=1714722642"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d85b7f7081a49dd5b1deae8e5b612e655febf6f_ead2cd27-82b8-4f24-9410-96363d96ce80.webp?v=1714722642","width":2000},{"alt":null,"id":23877506760803,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc94cb8dfa506b16e3b33156b5a2bc2b78363070_ad73b13e-f8e8-4cfe-9c1a-1026ee9c763f.webp?v=1714722645"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc94cb8dfa506b16e3b33156b5a2bc2b78363070_ad73b13e-f8e8-4cfe-9c1a-1026ee9c763f.webp?v=1714722645","width":2000},{"alt":null,"id":23877507219555,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c972f7ac1bc30956be93a438eef082a2d891b31_73a72a25-e0a3-4c5c-86c4-9d64f0a0de3b.webp?v=1714722648"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c972f7ac1bc30956be93a438eef082a2d891b31_73a72a25-e0a3-4c5c-86c4-9d64f0a0de3b.webp?v=1714722648","width":2000},{"alt":null,"id":23877507678307,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38ee176318d79e961c0089a1544dbe7a4a6ac9e6_1aab3d7b-9a54-48dd-ab48-5f729726657b.webp?v=1714722650"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38ee176318d79e961c0089a1544dbe7a4a6ac9e6_1aab3d7b-9a54-48dd-ab48-5f729726657b.webp?v=1714722650","width":2000},{"alt":null,"id":23877508202595,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fec3ea40a6796cdbd0bd713a3100b9876121c901_fd5725b6-32fc-4e16-8c2b-b1b864df1f09.webp?v=1714722653"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fec3ea40a6796cdbd0bd713a3100b9876121c901_fd5725b6-32fc-4e16-8c2b-b1b864df1f09.webp?v=1714722653","width":2000},{"alt":null,"id":23877508661347,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad9056a4c56bbe73daa32174d7e9ce833e930469_36225e66-7b56-47a7-9c06-8213ff9b667d.webp?v=1714722655"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad9056a4c56bbe73daa32174d7e9ce833e930469_36225e66-7b56-47a7-9c06-8213ff9b667d.webp?v=1714722655","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41886864015459,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-AF12","requires_shipping":true,"taxable":true,"featured_image":{"id":31472590749795,"product_id":7408558833763,"position":9,"created_at":"2024-05-03T15:50:53+08:00","updated_at":"2024-05-03T15:50:53+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fec3ea40a6796cdbd0bd713a3100b9876121c901_fd5725b6-32fc-4e16-8c2b-b1b864df1f09.webp?v=1714722653","variant_ids":[41886864015459]},"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-AF12","featured_media":{"alt":null,"id":23877508202595,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fec3ea40a6796cdbd0bd713a3100b9876121c901_fd5725b6-32fc-4e16-8c2b-b1b864df1f09.webp?v=1714722653"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41886864015459,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-AF12","requires_shipping":true,"taxable":true,"featured_image":{"id":31472590749795,"product_id":7408558833763,"position":9,"created_at":"2024-05-03T15:50:53+08:00","updated_at":"2024-05-03T15:50:53+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fec3ea40a6796cdbd0bd713a3100b9876121c901_fd5725b6-32fc-4e16-8c2b-b1b864df1f09.webp?v=1714722653","variant_ids":[41886864015459]},"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-AF12","featured_media":{"alt":null,"id":23877508202595,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fec3ea40a6796cdbd0bd713a3100b9876121c901_fd5725b6-32fc-4e16-8c2b-b1b864df1f09.webp?v=1714722653"}},"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: "停產" }