$product = {"id":7416338088035,"title":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Spaceship Logo-經典","handle":"iphone-8-mod-nx-printable-pb76","description":null,"published_at":"2024-06-11T16:56:18+08:00","created_at":"2024-05-06T14:37:23+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 8","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-star-wars","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":41918651924579,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB76","requires_shipping":true,"taxable":true,"featured_image":{"id":31491885236323,"product_id":7416338088035,"position":10,"created_at":"2024-05-06T14:37:49+08:00","updated_at":"2024-05-06T14:37:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a9ce90b59c004a0d7ee7ecb0617dfa311bbc46d_9cf5037b-2c4b-4bac-8081-22e7878ca3ae.webp?v=1714977469","variant_ids":[41918651924579]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Spaceship Logo-經典 - 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-PB76","featured_media":{"alt":null,"id":23897298206819,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a9ce90b59c004a0d7ee7ecb0617dfa311bbc46d_9cf5037b-2c4b-4bac-8081-22e7878ca3ae.webp?v=1714977469"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/449c56be1a42fdbeaf2cdf9dc567cba56e071527_f9622b43-ef40-4e30-bcfd-987724a1c173.webp?v=1714977446","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b5695e2cbb506d954f6bf5bb264f8f64db74353_18ac4625-1c86-4e3c-9ae2-516fbfe861b0.webp?v=1714977451","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4eb16fc09cb146f0a07607d3393bbb9c2b155908_0b0145a5-7c62-4f1d-ba0f-912615224fe1.webp?v=1714977453","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/268f198926618d957b71697a9d53d3fe6569bb0b_4d89eb07-75e2-4acd-a325-044dcc18aac4.webp?v=1714977456","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/25900fc39bcb6f1d8f9e8f6529ab2983b0467ee1_4cf8529e-94b8-4579-93c3-ec7510542080.webp?v=1714977458","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/56034cd6b8c421622e277a645938b8a06bb4205e_d30c6e02-a26e-4e82-8c83-a78515a1fb87.webp?v=1714977460","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/836b943d5e0336e8b7b6cadb418ec58e2fe71288_b9cea7b3-3a8d-4c24-a954-47251f00ef0f.webp?v=1714977462","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdad15ad907c2301cdb6cf51bff28602c66b479f_8cbf87fb-eaa1-4a40-b9e5-43654062f653.webp?v=1714977464","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/282de779e2f3bb89d236b493fd762b376c48329a_eeb101b3-dd83-4d3b-94a5-8dbed5e39f5c.webp?v=1714977467","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a9ce90b59c004a0d7ee7ecb0617dfa311bbc46d_9cf5037b-2c4b-4bac-8081-22e7878ca3ae.webp?v=1714977469"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/449c56be1a42fdbeaf2cdf9dc567cba56e071527_f9622b43-ef40-4e30-bcfd-987724a1c173.webp?v=1714977446","options":["color"],"media":[{"alt":null,"id":23897291522147,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/449c56be1a42fdbeaf2cdf9dc567cba56e071527_f9622b43-ef40-4e30-bcfd-987724a1c173.webp?v=1714977446"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/449c56be1a42fdbeaf2cdf9dc567cba56e071527_f9622b43-ef40-4e30-bcfd-987724a1c173.webp?v=1714977446","width":2000},{"alt":null,"id":23897294733411,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b5695e2cbb506d954f6bf5bb264f8f64db74353_18ac4625-1c86-4e3c-9ae2-516fbfe861b0.webp?v=1714977451"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b5695e2cbb506d954f6bf5bb264f8f64db74353_18ac4625-1c86-4e3c-9ae2-516fbfe861b0.webp?v=1714977451","width":2000},{"alt":null,"id":23897295028323,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4eb16fc09cb146f0a07607d3393bbb9c2b155908_0b0145a5-7c62-4f1d-ba0f-912615224fe1.webp?v=1714977453"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4eb16fc09cb146f0a07607d3393bbb9c2b155908_0b0145a5-7c62-4f1d-ba0f-912615224fe1.webp?v=1714977453","width":2000},{"alt":null,"id":23897295650915,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/268f198926618d957b71697a9d53d3fe6569bb0b_4d89eb07-75e2-4acd-a325-044dcc18aac4.webp?v=1714977456"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/268f198926618d957b71697a9d53d3fe6569bb0b_4d89eb07-75e2-4acd-a325-044dcc18aac4.webp?v=1714977456","width":2000},{"alt":null,"id":23897295781987,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/25900fc39bcb6f1d8f9e8f6529ab2983b0467ee1_4cf8529e-94b8-4579-93c3-ec7510542080.webp?v=1714977458"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/25900fc39bcb6f1d8f9e8f6529ab2983b0467ee1_4cf8529e-94b8-4579-93c3-ec7510542080.webp?v=1714977458","width":2000},{"alt":null,"id":23897296437347,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/56034cd6b8c421622e277a645938b8a06bb4205e_d30c6e02-a26e-4e82-8c83-a78515a1fb87.webp?v=1714977460"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/56034cd6b8c421622e277a645938b8a06bb4205e_d30c6e02-a26e-4e82-8c83-a78515a1fb87.webp?v=1714977460","width":2000},{"alt":null,"id":23897296699491,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/836b943d5e0336e8b7b6cadb418ec58e2fe71288_b9cea7b3-3a8d-4c24-a954-47251f00ef0f.webp?v=1714977462"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/836b943d5e0336e8b7b6cadb418ec58e2fe71288_b9cea7b3-3a8d-4c24-a954-47251f00ef0f.webp?v=1714977462","width":2000},{"alt":null,"id":23897297191011,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdad15ad907c2301cdb6cf51bff28602c66b479f_8cbf87fb-eaa1-4a40-b9e5-43654062f653.webp?v=1714977464"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdad15ad907c2301cdb6cf51bff28602c66b479f_8cbf87fb-eaa1-4a40-b9e5-43654062f653.webp?v=1714977464","width":2000},{"alt":null,"id":23897297649763,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/282de779e2f3bb89d236b493fd762b376c48329a_eeb101b3-dd83-4d3b-94a5-8dbed5e39f5c.webp?v=1714977467"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/282de779e2f3bb89d236b493fd762b376c48329a_eeb101b3-dd83-4d3b-94a5-8dbed5e39f5c.webp?v=1714977467","width":2000},{"alt":null,"id":23897298206819,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a9ce90b59c004a0d7ee7ecb0617dfa311bbc46d_9cf5037b-2c4b-4bac-8081-22e7878ca3ae.webp?v=1714977469"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a9ce90b59c004a0d7ee7ecb0617dfa311bbc46d_9cf5037b-2c4b-4bac-8081-22e7878ca3ae.webp?v=1714977469","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41918651924579,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB76","requires_shipping":true,"taxable":true,"featured_image":{"id":31491885236323,"product_id":7416338088035,"position":10,"created_at":"2024-05-06T14:37:49+08:00","updated_at":"2024-05-06T14:37:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a9ce90b59c004a0d7ee7ecb0617dfa311bbc46d_9cf5037b-2c4b-4bac-8081-22e7878ca3ae.webp?v=1714977469","variant_ids":[41918651924579]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Spaceship Logo-經典 - 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-PB76","featured_media":{"alt":null,"id":23897298206819,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a9ce90b59c004a0d7ee7ecb0617dfa311bbc46d_9cf5037b-2c4b-4bac-8081-22e7878ca3ae.webp?v=1714977469"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41918651924579,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB76","requires_shipping":true,"taxable":true,"featured_image":{"id":31491885236323,"product_id":7416338088035,"position":10,"created_at":"2024-05-06T14:37:49+08:00","updated_at":"2024-05-06T14:37:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a9ce90b59c004a0d7ee7ecb0617dfa311bbc46d_9cf5037b-2c4b-4bac-8081-22e7878ca3ae.webp?v=1714977469","variant_ids":[41918651924579]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Spaceship Logo-經典 - 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-PB76","featured_media":{"alt":null,"id":23897298206819,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a9ce90b59c004a0d7ee7ecb0617dfa311bbc46d_9cf5037b-2c4b-4bac-8081-22e7878ca3ae.webp?v=1714977469"}},"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: "停產" }