$product = {"id":7415887003747,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Look - 大自然的傑作(優勝美地國家公園)","handle":"iphone-xs-max-mod-nx-printable-af13","description":null,"published_at":"2024-06-11T16:47:05+08:00","created_at":"2024-05-06T12:18:31+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 XS 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":41915208990819,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-AF13","requires_shipping":true,"taxable":true,"featured_image":{"id":31490656829539,"product_id":7415887003747,"position":2,"created_at":"2024-05-06T12:18:36+08:00","updated_at":"2024-05-06T12:18:36+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2a04878a6439b301e119732e1bee77884c28080_95b920d7-17ff-4cb3-9ead-048711c28cd0.webp?v=1714969116","variant_ids":[41915208990819]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS 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":"NPB0108624-AF13","featured_media":{"alt":null,"id":23896063344739,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2a04878a6439b301e119732e1bee77884c28080_95b920d7-17ff-4cb3-9ead-048711c28cd0.webp?v=1714969116"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1adf13a6a0219eaff621ce58bf924375386fc55e_8138134a-d981-4a61-903a-cf856db6d5de.webp?v=1714969114","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2a04878a6439b301e119732e1bee77884c28080_95b920d7-17ff-4cb3-9ead-048711c28cd0.webp?v=1714969116","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7de01cd54e38178cfccbf7ee129805365a8c709f_bd06652c-2b45-41fb-9cf3-46e393d53e1c.webp?v=1714969119","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b9f7e1dcaea84f0a80b97e542790b9d5118a7e2_7a0e3879-eaf7-4445-b184-615826a0c5fb.webp?v=1714969122","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/971b677a18cb981ea0bd29bde6ab146447ffbd75_774ed02d-7cf2-475b-a4d4-6f5743f666de.webp?v=1714969125","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f68dac9f13827c6199d74f9a80d0f36b5558df1b_316fe264-f558-46ca-8e69-bd2856d160e7.webp?v=1714969127","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b02ad03b8a9419d4a10af1bbd18090e6bcfc92a7_dd28004d-3cad-4f3a-9299-3ded61a19ed2.webp?v=1714969130","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f8f0acfeec5fad97f7846f9885f990d3f0208a2_d6a8871b-5db7-4505-bc29-f4691d302e85.webp?v=1714969132","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a8702ffa3d8606719ff011774c7a403eae2e30e_82144ecc-b642-4c4e-89f8-8ce7214e5d33.webp?v=1714969135","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eed78bd7375097137132b6bb645217c666c0f173_3706570d-c363-4573-b9bb-09fe05cb641b.webp?v=1714969138"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1adf13a6a0219eaff621ce58bf924375386fc55e_8138134a-d981-4a61-903a-cf856db6d5de.webp?v=1714969114","options":["color"],"media":[{"alt":null,"id":23896062951523,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1adf13a6a0219eaff621ce58bf924375386fc55e_8138134a-d981-4a61-903a-cf856db6d5de.webp?v=1714969114"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1adf13a6a0219eaff621ce58bf924375386fc55e_8138134a-d981-4a61-903a-cf856db6d5de.webp?v=1714969114","width":2000},{"alt":null,"id":23896063344739,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2a04878a6439b301e119732e1bee77884c28080_95b920d7-17ff-4cb3-9ead-048711c28cd0.webp?v=1714969116"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2a04878a6439b301e119732e1bee77884c28080_95b920d7-17ff-4cb3-9ead-048711c28cd0.webp?v=1714969116","width":2000},{"alt":null,"id":23896064000099,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7de01cd54e38178cfccbf7ee129805365a8c709f_bd06652c-2b45-41fb-9cf3-46e393d53e1c.webp?v=1714969119"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7de01cd54e38178cfccbf7ee129805365a8c709f_bd06652c-2b45-41fb-9cf3-46e393d53e1c.webp?v=1714969119","width":2000},{"alt":null,"id":23896064655459,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b9f7e1dcaea84f0a80b97e542790b9d5118a7e2_7a0e3879-eaf7-4445-b184-615826a0c5fb.webp?v=1714969122"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b9f7e1dcaea84f0a80b97e542790b9d5118a7e2_7a0e3879-eaf7-4445-b184-615826a0c5fb.webp?v=1714969122","width":2000},{"alt":null,"id":23896065048675,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/971b677a18cb981ea0bd29bde6ab146447ffbd75_774ed02d-7cf2-475b-a4d4-6f5743f666de.webp?v=1714969125"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/971b677a18cb981ea0bd29bde6ab146447ffbd75_774ed02d-7cf2-475b-a4d4-6f5743f666de.webp?v=1714969125","width":2000},{"alt":null,"id":23896065671267,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f68dac9f13827c6199d74f9a80d0f36b5558df1b_316fe264-f558-46ca-8e69-bd2856d160e7.webp?v=1714969127"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f68dac9f13827c6199d74f9a80d0f36b5558df1b_316fe264-f558-46ca-8e69-bd2856d160e7.webp?v=1714969127","width":2000},{"alt":null,"id":23896066326627,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b02ad03b8a9419d4a10af1bbd18090e6bcfc92a7_dd28004d-3cad-4f3a-9299-3ded61a19ed2.webp?v=1714969130"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b02ad03b8a9419d4a10af1bbd18090e6bcfc92a7_dd28004d-3cad-4f3a-9299-3ded61a19ed2.webp?v=1714969130","width":2000},{"alt":null,"id":23896066752611,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f8f0acfeec5fad97f7846f9885f990d3f0208a2_d6a8871b-5db7-4505-bc29-f4691d302e85.webp?v=1714969132"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f8f0acfeec5fad97f7846f9885f990d3f0208a2_d6a8871b-5db7-4505-bc29-f4691d302e85.webp?v=1714969132","width":2000},{"alt":null,"id":23896067539043,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a8702ffa3d8606719ff011774c7a403eae2e30e_82144ecc-b642-4c4e-89f8-8ce7214e5d33.webp?v=1714969135"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a8702ffa3d8606719ff011774c7a403eae2e30e_82144ecc-b642-4c4e-89f8-8ce7214e5d33.webp?v=1714969135","width":2000},{"alt":null,"id":23896068128867,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eed78bd7375097137132b6bb645217c666c0f173_3706570d-c363-4573-b9bb-09fe05cb641b.webp?v=1714969138"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eed78bd7375097137132b6bb645217c666c0f173_3706570d-c363-4573-b9bb-09fe05cb641b.webp?v=1714969138","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41915208990819,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-AF13","requires_shipping":true,"taxable":true,"featured_image":{"id":31490656829539,"product_id":7415887003747,"position":2,"created_at":"2024-05-06T12:18:36+08:00","updated_at":"2024-05-06T12:18:36+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2a04878a6439b301e119732e1bee77884c28080_95b920d7-17ff-4cb3-9ead-048711c28cd0.webp?v=1714969116","variant_ids":[41915208990819]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS 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":"NPB0108624-AF13","featured_media":{"alt":null,"id":23896063344739,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2a04878a6439b301e119732e1bee77884c28080_95b920d7-17ff-4cb3-9ead-048711c28cd0.webp?v=1714969116"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41915208990819,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-AF13","requires_shipping":true,"taxable":true,"featured_image":{"id":31490656829539,"product_id":7415887003747,"position":2,"created_at":"2024-05-06T12:18:36+08:00","updated_at":"2024-05-06T12:18:36+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2a04878a6439b301e119732e1bee77884c28080_95b920d7-17ff-4cb3-9ead-048711c28cd0.webp?v=1714969116","variant_ids":[41915208990819]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS 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":"NPB0108624-AF13","featured_media":{"alt":null,"id":23896063344739,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2a04878a6439b301e119732e1bee77884c28080_95b920d7-17ff-4cb3-9ead-048711c28cd0.webp?v=1714969116"}},"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: "停產" }