$product = {"id":7407508291683,"title":"犀牛盾Mod NX手機殼 - iPhone 15 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士\u0026風暴兵-剪紙系列","handle":"iphone-15-plus-mod-nx-printable-pb55","description":null,"published_at":"2024-06-11T16:17:47+08:00","created_at":"2024-05-03T10:01:18+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 15 Plus","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":41875805503587,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0129624-PB55","requires_shipping":true,"taxable":true,"featured_image":{"id":31469766180963,"product_id":7407508291683,"position":8,"created_at":"2024-05-03T10:01:38+08:00","updated_at":"2024-05-03T10:01:38+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d40ca23b9b8a5b80d2b94f48fca0756545d0a6e6_780058f7-7e41-4820-9ca8-07e993a0975d.webp?v=1714701698","variant_ids":[41875805503587]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 15 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士\u0026風暴兵-剪紙系列 - 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":"NPB0129624-PB55","featured_media":{"alt":null,"id":23874667577443,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d40ca23b9b8a5b80d2b94f48fca0756545d0a6e6_780058f7-7e41-4820-9ca8-07e993a0975d.webp?v=1714701698"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41875805831267,"title":"Mod NX-櫻花粉邊框","option1":"Mod NX-櫻花粉邊框","option2":null,"option3":null,"sku":"NPB0129657-PB55","requires_shipping":true,"taxable":true,"featured_image":{"id":31469761232995,"product_id":7407508291683,"position":1,"created_at":"2024-05-03T10:01:20+08:00","updated_at":"2024-05-03T10:01:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/828f0086ee876fb48c1bcd42f955fd7e12554451_38464f78-da29-47f7-bf0b-cd513fbfe3c0.webp?v=1714701680","variant_ids":[41875805831267]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 15 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士\u0026風暴兵-剪紙系列 - 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":"NPB0129657-PB55","featured_media":{"alt":null,"id":23874662727779,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/828f0086ee876fb48c1bcd42f955fd7e12554451_38464f78-da29-47f7-bf0b-cd513fbfe3c0.webp?v=1714701680"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/828f0086ee876fb48c1bcd42f955fd7e12554451_38464f78-da29-47f7-bf0b-cd513fbfe3c0.webp?v=1714701680","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/48bc19f38bc1355186590159cb0a264243f5f816_d02344d1-0c51-4672-bc99-956fa59a1a8c.webp?v=1714701683","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c3ce1caa80f0b399aa254e46b3145ed6f3bef0b_288cc0ad-b99a-4930-a71e-3dfb1b94e950.webp?v=1714701685","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3e3da51f99f6dfeb75ff872b95c8493a135c631_d869da50-ba1e-4019-81af-4e6465c6a9db.webp?v=1714701687","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2565d0a8ae4f6db82167d6a1632aa9e7c716b12_c3b516aa-9822-4b6d-99ec-b4ce16ca7105.webp?v=1714701689","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/41570d264491855d4da7ebda1d8a3aa1fdd59d7b_1065ffc4-6f51-47b0-adf9-7bdc57364cf7.webp?v=1714701694","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/013ab09096a21a6f9155579e274337b245bc8486_c13fa133-dc79-4047-9957-ae453a90123b.webp?v=1714701696","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d40ca23b9b8a5b80d2b94f48fca0756545d0a6e6_780058f7-7e41-4820-9ca8-07e993a0975d.webp?v=1714701698","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/352337a9900280d422579498d2140ad58fd879d6_f17e85b5-67f9-4ec2-a55b-b880bb22af41.webp?v=1714701701"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/828f0086ee876fb48c1bcd42f955fd7e12554451_38464f78-da29-47f7-bf0b-cd513fbfe3c0.webp?v=1714701680","options":["color"],"media":[{"alt":null,"id":23874662727779,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/828f0086ee876fb48c1bcd42f955fd7e12554451_38464f78-da29-47f7-bf0b-cd513fbfe3c0.webp?v=1714701680"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/828f0086ee876fb48c1bcd42f955fd7e12554451_38464f78-da29-47f7-bf0b-cd513fbfe3c0.webp?v=1714701680","width":2000},{"alt":null,"id":23874663186531,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/48bc19f38bc1355186590159cb0a264243f5f816_d02344d1-0c51-4672-bc99-956fa59a1a8c.webp?v=1714701683"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/48bc19f38bc1355186590159cb0a264243f5f816_d02344d1-0c51-4672-bc99-956fa59a1a8c.webp?v=1714701683","width":2000},{"alt":null,"id":23874663645283,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c3ce1caa80f0b399aa254e46b3145ed6f3bef0b_288cc0ad-b99a-4930-a71e-3dfb1b94e950.webp?v=1714701685"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c3ce1caa80f0b399aa254e46b3145ed6f3bef0b_288cc0ad-b99a-4930-a71e-3dfb1b94e950.webp?v=1714701685","width":2000},{"alt":null,"id":23874664398947,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3e3da51f99f6dfeb75ff872b95c8493a135c631_d869da50-ba1e-4019-81af-4e6465c6a9db.webp?v=1714701687"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3e3da51f99f6dfeb75ff872b95c8493a135c631_d869da50-ba1e-4019-81af-4e6465c6a9db.webp?v=1714701687","width":2000},{"alt":null,"id":23874664988771,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2565d0a8ae4f6db82167d6a1632aa9e7c716b12_c3b516aa-9822-4b6d-99ec-b4ce16ca7105.webp?v=1714701689"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2565d0a8ae4f6db82167d6a1632aa9e7c716b12_c3b516aa-9822-4b6d-99ec-b4ce16ca7105.webp?v=1714701689","width":2000},{"alt":null,"id":23874665840739,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/41570d264491855d4da7ebda1d8a3aa1fdd59d7b_1065ffc4-6f51-47b0-adf9-7bdc57364cf7.webp?v=1714701694"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/41570d264491855d4da7ebda1d8a3aa1fdd59d7b_1065ffc4-6f51-47b0-adf9-7bdc57364cf7.webp?v=1714701694","width":2000},{"alt":null,"id":23874667151459,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/013ab09096a21a6f9155579e274337b245bc8486_c13fa133-dc79-4047-9957-ae453a90123b.webp?v=1714701696"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/013ab09096a21a6f9155579e274337b245bc8486_c13fa133-dc79-4047-9957-ae453a90123b.webp?v=1714701696","width":2000},{"alt":null,"id":23874667577443,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d40ca23b9b8a5b80d2b94f48fca0756545d0a6e6_780058f7-7e41-4820-9ca8-07e993a0975d.webp?v=1714701698"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d40ca23b9b8a5b80d2b94f48fca0756545d0a6e6_780058f7-7e41-4820-9ca8-07e993a0975d.webp?v=1714701698","width":2000},{"alt":null,"id":23874667970659,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/352337a9900280d422579498d2140ad58fd879d6_f17e85b5-67f9-4ec2-a55b-b880bb22af41.webp?v=1714701701"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/352337a9900280d422579498d2140ad58fd879d6_f17e85b5-67f9-4ec2-a55b-b880bb22af41.webp?v=1714701701","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41875805503587,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0129624-PB55","requires_shipping":true,"taxable":true,"featured_image":{"id":31469766180963,"product_id":7407508291683,"position":8,"created_at":"2024-05-03T10:01:38+08:00","updated_at":"2024-05-03T10:01:38+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d40ca23b9b8a5b80d2b94f48fca0756545d0a6e6_780058f7-7e41-4820-9ca8-07e993a0975d.webp?v=1714701698","variant_ids":[41875805503587]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 15 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士\u0026風暴兵-剪紙系列 - 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":"NPB0129624-PB55","featured_media":{"alt":null,"id":23874667577443,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d40ca23b9b8a5b80d2b94f48fca0756545d0a6e6_780058f7-7e41-4820-9ca8-07e993a0975d.webp?v=1714701698"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41875805831267,"title":"Mod NX-櫻花粉邊框","option1":"Mod NX-櫻花粉邊框","option2":null,"option3":null,"sku":"NPB0129657-PB55","requires_shipping":true,"taxable":true,"featured_image":{"id":31469761232995,"product_id":7407508291683,"position":1,"created_at":"2024-05-03T10:01:20+08:00","updated_at":"2024-05-03T10:01:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/828f0086ee876fb48c1bcd42f955fd7e12554451_38464f78-da29-47f7-bf0b-cd513fbfe3c0.webp?v=1714701680","variant_ids":[41875805831267]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 15 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士\u0026風暴兵-剪紙系列 - 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":"NPB0129657-PB55","featured_media":{"alt":null,"id":23874662727779,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/828f0086ee876fb48c1bcd42f955fd7e12554451_38464f78-da29-47f7-bf0b-cd513fbfe3c0.webp?v=1714701680"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41875805503587,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0129624-PB55","requires_shipping":true,"taxable":true,"featured_image":{"id":31469766180963,"product_id":7407508291683,"position":8,"created_at":"2024-05-03T10:01:38+08:00","updated_at":"2024-05-03T10:01:38+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d40ca23b9b8a5b80d2b94f48fca0756545d0a6e6_780058f7-7e41-4820-9ca8-07e993a0975d.webp?v=1714701698","variant_ids":[41875805503587]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 15 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士\u0026風暴兵-剪紙系列 - 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":"NPB0129624-PB55","featured_media":{"alt":null,"id":23874667577443,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d40ca23b9b8a5b80d2b94f48fca0756545d0a6e6_780058f7-7e41-4820-9ca8-07e993a0975d.webp?v=1714701698"}},"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: "停產" }