$product = {"id":7415886708835,"title":"犀牛盾Mod NX手機殼 - iPhone XS - 【聯名設計款】 - Look - 大自然的傑作(亞馬遜雨林)","handle":"iphone-xs-mod-nx-printable-af09","description":null,"published_at":"2024-06-11T16:47:04+08:00","created_at":"2024-05-06T12:18:27+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","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":41915205124195,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108424-AF09","requires_shipping":true,"taxable":true,"featured_image":{"id":31490656600163,"product_id":7415886708835,"position":3,"created_at":"2024-05-06T12:18:35+08:00","updated_at":"2024-05-06T12:18:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5efc96a6b16bd0a4380fa00118d7d6577d1493f1_55cfe270-abf7-42d6-ad20-e9be36af3e20.webp?v=1714969115","variant_ids":[41915205124195]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS - 【聯名設計款】 - 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":"NPB0108424-AF09","featured_media":{"alt":null,"id":23896063115363,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5efc96a6b16bd0a4380fa00118d7d6577d1493f1_55cfe270-abf7-42d6-ad20-e9be36af3e20.webp?v=1714969115"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fac540153e70df8e15044581dc295cc27d324038_28060274-ad2a-44a3-90fa-148e1de5497f.webp?v=1714969110","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ada8f1ad41fc79e924a2f53cdfbba30a44c142d1_affdbed8-cc1e-4695-889f-7dde795ea171.webp?v=1714969113","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5efc96a6b16bd0a4380fa00118d7d6577d1493f1_55cfe270-abf7-42d6-ad20-e9be36af3e20.webp?v=1714969115","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c63a34e5c333d3cf1d45e326da3b8faec99c96b6_78ad3ef1-66f5-4036-8d96-13f8a17d8733.webp?v=1714969117","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e6cf036dfa9cffef8008d0d75bd637449909275_7e9156f1-505b-4d43-9a50-782c188ff597.webp?v=1714969120","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9235209f78e6ebdcdda897056d2fdfd987e978c_13787367-3f10-428c-9472-b521cd798ae6.webp?v=1714969122","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c142024e2103f1d9a3eb739cb0c3fd2ca8afed6f_6277ebe5-35c9-4d3e-9fc1-32177d683e0c.webp?v=1714969125","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae8fcbdac6f7ad9c0c38af69fd7c7f91e046ff7b_1c0fabb1-9858-41e4-8e9d-2d48b174f013.webp?v=1714969128","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eee6eea6d35beaad22e95fdfeb82ffff4ade1698_dac931fb-29b2-4538-98b9-a4dc02c3623f.webp?v=1714969130","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5e39665f5d80975d95e381b4e05e5a2fa8da5e4_92f6fddc-382d-458b-a0b0-bbef9b08f360.webp?v=1714969133"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fac540153e70df8e15044581dc295cc27d324038_28060274-ad2a-44a3-90fa-148e1de5497f.webp?v=1714969110","options":["color"],"media":[{"alt":null,"id":23896062066787,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fac540153e70df8e15044581dc295cc27d324038_28060274-ad2a-44a3-90fa-148e1de5497f.webp?v=1714969110"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fac540153e70df8e15044581dc295cc27d324038_28060274-ad2a-44a3-90fa-148e1de5497f.webp?v=1714969110","width":2000},{"alt":null,"id":23896062656611,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ada8f1ad41fc79e924a2f53cdfbba30a44c142d1_affdbed8-cc1e-4695-889f-7dde795ea171.webp?v=1714969113"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ada8f1ad41fc79e924a2f53cdfbba30a44c142d1_affdbed8-cc1e-4695-889f-7dde795ea171.webp?v=1714969113","width":2000},{"alt":null,"id":23896063115363,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5efc96a6b16bd0a4380fa00118d7d6577d1493f1_55cfe270-abf7-42d6-ad20-e9be36af3e20.webp?v=1714969115"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5efc96a6b16bd0a4380fa00118d7d6577d1493f1_55cfe270-abf7-42d6-ad20-e9be36af3e20.webp?v=1714969115","width":2000},{"alt":null,"id":23896063705187,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c63a34e5c333d3cf1d45e326da3b8faec99c96b6_78ad3ef1-66f5-4036-8d96-13f8a17d8733.webp?v=1714969117"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c63a34e5c333d3cf1d45e326da3b8faec99c96b6_78ad3ef1-66f5-4036-8d96-13f8a17d8733.webp?v=1714969117","width":2000},{"alt":null,"id":23896064131171,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e6cf036dfa9cffef8008d0d75bd637449909275_7e9156f1-505b-4d43-9a50-782c188ff597.webp?v=1714969120"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e6cf036dfa9cffef8008d0d75bd637449909275_7e9156f1-505b-4d43-9a50-782c188ff597.webp?v=1714969120","width":2000},{"alt":null,"id":23896064688227,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9235209f78e6ebdcdda897056d2fdfd987e978c_13787367-3f10-428c-9472-b521cd798ae6.webp?v=1714969122"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9235209f78e6ebdcdda897056d2fdfd987e978c_13787367-3f10-428c-9472-b521cd798ae6.webp?v=1714969122","width":2000},{"alt":null,"id":23896065015907,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c142024e2103f1d9a3eb739cb0c3fd2ca8afed6f_6277ebe5-35c9-4d3e-9fc1-32177d683e0c.webp?v=1714969125"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c142024e2103f1d9a3eb739cb0c3fd2ca8afed6f_6277ebe5-35c9-4d3e-9fc1-32177d683e0c.webp?v=1714969125","width":2000},{"alt":null,"id":23896065704035,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae8fcbdac6f7ad9c0c38af69fd7c7f91e046ff7b_1c0fabb1-9858-41e4-8e9d-2d48b174f013.webp?v=1714969128"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae8fcbdac6f7ad9c0c38af69fd7c7f91e046ff7b_1c0fabb1-9858-41e4-8e9d-2d48b174f013.webp?v=1714969128","width":2000},{"alt":null,"id":23896066293859,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eee6eea6d35beaad22e95fdfeb82ffff4ade1698_dac931fb-29b2-4538-98b9-a4dc02c3623f.webp?v=1714969130"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eee6eea6d35beaad22e95fdfeb82ffff4ade1698_dac931fb-29b2-4538-98b9-a4dc02c3623f.webp?v=1714969130","width":2000},{"alt":null,"id":23896066850915,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5e39665f5d80975d95e381b4e05e5a2fa8da5e4_92f6fddc-382d-458b-a0b0-bbef9b08f360.webp?v=1714969133"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5e39665f5d80975d95e381b4e05e5a2fa8da5e4_92f6fddc-382d-458b-a0b0-bbef9b08f360.webp?v=1714969133","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41915205124195,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108424-AF09","requires_shipping":true,"taxable":true,"featured_image":{"id":31490656600163,"product_id":7415886708835,"position":3,"created_at":"2024-05-06T12:18:35+08:00","updated_at":"2024-05-06T12:18:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5efc96a6b16bd0a4380fa00118d7d6577d1493f1_55cfe270-abf7-42d6-ad20-e9be36af3e20.webp?v=1714969115","variant_ids":[41915205124195]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS - 【聯名設計款】 - 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":"NPB0108424-AF09","featured_media":{"alt":null,"id":23896063115363,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5efc96a6b16bd0a4380fa00118d7d6577d1493f1_55cfe270-abf7-42d6-ad20-e9be36af3e20.webp?v=1714969115"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41915205124195,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108424-AF09","requires_shipping":true,"taxable":true,"featured_image":{"id":31490656600163,"product_id":7415886708835,"position":3,"created_at":"2024-05-06T12:18:35+08:00","updated_at":"2024-05-06T12:18:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5efc96a6b16bd0a4380fa00118d7d6577d1493f1_55cfe270-abf7-42d6-ad20-e9be36af3e20.webp?v=1714969115","variant_ids":[41915205124195]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS - 【聯名設計款】 - 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":"NPB0108424-AF09","featured_media":{"alt":null,"id":23896063115363,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5efc96a6b16bd0a4380fa00118d7d6577d1493f1_55cfe270-abf7-42d6-ad20-e9be36af3e20.webp?v=1714969115"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null var sellingStatus if ($bumper) { $(document).ready(function() { var productImg = $product.images[0] var bumperVariants = $bumper.variants; var bumperColors = new Object(); var currentVariant = ''; var productType = ''; bumperVariants.forEach(variant => { bumperColors[`${variant.title.split(' (')[0].toLowerCase()}`] = variant.featured_image.src; }); if (productType === 'mod-nx-backplate' || productType === 'mod-backplate') { mergeImages( [productImg, bumperColors[currentVariant]], { crossOrigin: 'anonymous' } ).then(mergedImg => { $('.merged-img').attr('src', mergedImg); }); } else { mergeImages( [bumperColors[currentVariant], productImg], { crossOrigin: 'anonymous' } ).then(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: "停產" }