$product = {"id":7416331862115,"title":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - Batman - 小丑女圖騰","handle":"iphone-8-mod-nx-printable-sb17","description":null,"published_at":"2024-06-11T16:56:07+08:00","created_at":"2024-05-06T14:36:01+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Batman","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-batman","device-iPhone 8","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-batman","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":41918581309539,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-SB17","requires_shipping":true,"taxable":true,"featured_image":{"id":31491864658019,"product_id":7416331862115,"position":8,"created_at":"2024-05-06T14:36:21+08:00","updated_at":"2024-05-06T14:36:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f919b751c4c18cbdec643d2e82862612c45af84b_221f8ae6-09ec-466e-824c-3d6e6679a68f.webp?v=1714977381","variant_ids":[41918581309539]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - Batman - 小丑女圖騰 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0105424-SB17","featured_media":{"alt":null,"id":23897277497443,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f919b751c4c18cbdec643d2e82862612c45af84b_221f8ae6-09ec-466e-824c-3d6e6679a68f.webp?v=1714977381"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79e7525deaddc716db7247baf2434f788a0d6662_5c5dcd9e-4166-457f-a556-aefab5d4b6a8.webp?v=1714977363","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/466fcb198d636ff781be08752e0b883030b54bc3_a18ee9b4-dfc0-4a69-a147-92e7f8280fd5.webp?v=1714977366","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4f9907c8dd4a880a7053e7e0a26b2edf669be9d_3a25591d-dd82-4022-9252-6436e5ff3d98.webp?v=1714977368","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e8fc96f24fe164346ee81301eed3ad7d1da79f11_b68a4e9d-57a9-4650-a654-ea4d6a667599.webp?v=1714977371","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7edd1985c4711dffc77389a2f1a86a62643e0132_4c18228d-f45c-4cd0-972c-a03f4ab70dad.webp?v=1714977373","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c70290ab1810d736369c0f54f052416c885f94f_ee918880-d2e6-437b-ad1e-f443cd5c5274.webp?v=1714977376","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d98b60a1b66f2e350ddf26a459fcbb0ba260f772_9666c5c3-9be8-4ec9-ace7-ed93047cb23d.webp?v=1714977378","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f919b751c4c18cbdec643d2e82862612c45af84b_221f8ae6-09ec-466e-824c-3d6e6679a68f.webp?v=1714977381","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ec26ed6517f6c72b442005efacb115d13f96b01_d71cb2a5-d8e7-40ce-9a96-9cb64992d5fb.webp?v=1714977383","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc2a85a81a7f29827b53c8dce3af5f265cbffc61_1454f9d3-afdb-4d0b-b49c-4720dad0cac1.webp?v=1714977386"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79e7525deaddc716db7247baf2434f788a0d6662_5c5dcd9e-4166-457f-a556-aefab5d4b6a8.webp?v=1714977363","options":["color"],"media":[{"alt":null,"id":23897273499747,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79e7525deaddc716db7247baf2434f788a0d6662_5c5dcd9e-4166-457f-a556-aefab5d4b6a8.webp?v=1714977363"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79e7525deaddc716db7247baf2434f788a0d6662_5c5dcd9e-4166-457f-a556-aefab5d4b6a8.webp?v=1714977363","width":2000},{"alt":null,"id":23897274024035,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/466fcb198d636ff781be08752e0b883030b54bc3_a18ee9b4-dfc0-4a69-a147-92e7f8280fd5.webp?v=1714977366"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/466fcb198d636ff781be08752e0b883030b54bc3_a18ee9b4-dfc0-4a69-a147-92e7f8280fd5.webp?v=1714977366","width":2000},{"alt":null,"id":23897274548323,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4f9907c8dd4a880a7053e7e0a26b2edf669be9d_3a25591d-dd82-4022-9252-6436e5ff3d98.webp?v=1714977368"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4f9907c8dd4a880a7053e7e0a26b2edf669be9d_3a25591d-dd82-4022-9252-6436e5ff3d98.webp?v=1714977368","width":2000},{"alt":null,"id":23897275138147,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e8fc96f24fe164346ee81301eed3ad7d1da79f11_b68a4e9d-57a9-4650-a654-ea4d6a667599.webp?v=1714977371"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e8fc96f24fe164346ee81301eed3ad7d1da79f11_b68a4e9d-57a9-4650-a654-ea4d6a667599.webp?v=1714977371","width":2000},{"alt":null,"id":23897275695203,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7edd1985c4711dffc77389a2f1a86a62643e0132_4c18228d-f45c-4cd0-972c-a03f4ab70dad.webp?v=1714977373"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7edd1985c4711dffc77389a2f1a86a62643e0132_4c18228d-f45c-4cd0-972c-a03f4ab70dad.webp?v=1714977373","width":2000},{"alt":null,"id":23897276186723,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c70290ab1810d736369c0f54f052416c885f94f_ee918880-d2e6-437b-ad1e-f443cd5c5274.webp?v=1714977376"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c70290ab1810d736369c0f54f052416c885f94f_ee918880-d2e6-437b-ad1e-f443cd5c5274.webp?v=1714977376","width":2000},{"alt":null,"id":23897277038691,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d98b60a1b66f2e350ddf26a459fcbb0ba260f772_9666c5c3-9be8-4ec9-ace7-ed93047cb23d.webp?v=1714977378"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d98b60a1b66f2e350ddf26a459fcbb0ba260f772_9666c5c3-9be8-4ec9-ace7-ed93047cb23d.webp?v=1714977378","width":2000},{"alt":null,"id":23897277497443,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f919b751c4c18cbdec643d2e82862612c45af84b_221f8ae6-09ec-466e-824c-3d6e6679a68f.webp?v=1714977381"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f919b751c4c18cbdec643d2e82862612c45af84b_221f8ae6-09ec-466e-824c-3d6e6679a68f.webp?v=1714977381","width":2000},{"alt":null,"id":23897277988963,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ec26ed6517f6c72b442005efacb115d13f96b01_d71cb2a5-d8e7-40ce-9a96-9cb64992d5fb.webp?v=1714977383"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ec26ed6517f6c72b442005efacb115d13f96b01_d71cb2a5-d8e7-40ce-9a96-9cb64992d5fb.webp?v=1714977383","width":2000},{"alt":null,"id":23897278546019,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc2a85a81a7f29827b53c8dce3af5f265cbffc61_1454f9d3-afdb-4d0b-b49c-4720dad0cac1.webp?v=1714977386"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc2a85a81a7f29827b53c8dce3af5f265cbffc61_1454f9d3-afdb-4d0b-b49c-4720dad0cac1.webp?v=1714977386","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41918581309539,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-SB17","requires_shipping":true,"taxable":true,"featured_image":{"id":31491864658019,"product_id":7416331862115,"position":8,"created_at":"2024-05-06T14:36:21+08:00","updated_at":"2024-05-06T14:36:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f919b751c4c18cbdec643d2e82862612c45af84b_221f8ae6-09ec-466e-824c-3d6e6679a68f.webp?v=1714977381","variant_ids":[41918581309539]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - Batman - 小丑女圖騰 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0105424-SB17","featured_media":{"alt":null,"id":23897277497443,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f919b751c4c18cbdec643d2e82862612c45af84b_221f8ae6-09ec-466e-824c-3d6e6679a68f.webp?v=1714977381"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41918581309539,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-SB17","requires_shipping":true,"taxable":true,"featured_image":{"id":31491864658019,"product_id":7416331862115,"position":8,"created_at":"2024-05-06T14:36:21+08:00","updated_at":"2024-05-06T14:36:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f919b751c4c18cbdec643d2e82862612c45af84b_221f8ae6-09ec-466e-824c-3d6e6679a68f.webp?v=1714977381","variant_ids":[41918581309539]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - Batman - 小丑女圖騰 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0105424-SB17","featured_media":{"alt":null,"id":23897277497443,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f919b751c4c18cbdec643d2e82862612c45af84b_221f8ae6-09ec-466e-824c-3d6e6679a68f.webp?v=1714977381"}},"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: "停產" }