$product = {"id":7408388571235,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具2-黑","handle":"iphone-12-mini-mod-nx-printable-pb11","description":null,"published_at":"2024-06-11T16:35:52+08:00","created_at":"2024-05-03T15:16:42+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 12 mini","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":41884928475235,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB11","requires_shipping":true,"taxable":true,"featured_image":{"id":31472134226019,"product_id":7408388571235,"position":7,"created_at":"2024-05-03T15:17:00+08:00","updated_at":"2024-05-03T15:17:00+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b762b87819b113e70a6fbba7b0a4dcaf5cc2e809_abfdf38d-0452-4e70-8aa0-1401fe35fe07.webp?v=1714720620","variant_ids":[41884928475235]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具2-黑 - 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":"NPB0118424-PB11","featured_media":{"alt":null,"id":23877049778275,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b762b87819b113e70a6fbba7b0a4dcaf5cc2e809_abfdf38d-0452-4e70-8aa0-1401fe35fe07.webp?v=1714720620"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e35dc650145978a48a2ad9e8dbb2c9b9b7542b2_0724edd7-abf2-49da-a5d1-109ecdccd1cf.webp?v=1714720605","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/979abff6a95d24a451c5b3dac936fe04d30c2740_e2e0b265-c2cc-4f17-8ddb-bf6ab5e5e3c7.webp?v=1714720608","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83783500c4864a2659b92ea880f6b82cf0bac693_db465554-6acb-40c6-991d-ad0bcd8542a5.webp?v=1714720610","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d2b3e4dc14d7dd644a76a36e6701771bdfdb9730_da77d54e-8107-40de-9b1b-c3576b4b759b.webp?v=1714720613","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78c1e8536522bdd7f54334f517d1fcd428c456e2_98a6138e-9ab0-478e-8fc0-cc107e40a0ec.webp?v=1714720615","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a7fd033bd8f0cad721e562a04e6549552904d460_197af8cf-0c42-49bc-91c5-f1b6041416f5.webp?v=1714720617","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b762b87819b113e70a6fbba7b0a4dcaf5cc2e809_abfdf38d-0452-4e70-8aa0-1401fe35fe07.webp?v=1714720620","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/25b381c8bfad8c7bcbb0e01fd63067819ea1facd_a49b1cc8-ef17-499e-94a6-cf78dfdf7169.webp?v=1714720622","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c2045a470231da337f150bd93e86ccdf84b6758_666476ce-5976-4e73-9376-342fd0778b2f.webp?v=1714720625","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1bdb5add97e17e1a14a13226e4747b1e5ce2721d_b64703f5-9d19-464d-8c8d-15670b5f641b.webp?v=1714720627","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/317b45421f92af095c360bc468fa9455f4891e8a_6ff2cbf7-1137-461b-8b0c-152145571efe.webp?v=1714720629"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e35dc650145978a48a2ad9e8dbb2c9b9b7542b2_0724edd7-abf2-49da-a5d1-109ecdccd1cf.webp?v=1714720605","options":["color"],"media":[{"alt":null,"id":23877046075491,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e35dc650145978a48a2ad9e8dbb2c9b9b7542b2_0724edd7-abf2-49da-a5d1-109ecdccd1cf.webp?v=1714720605"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e35dc650145978a48a2ad9e8dbb2c9b9b7542b2_0724edd7-abf2-49da-a5d1-109ecdccd1cf.webp?v=1714720605","width":2000},{"alt":null,"id":23877046796387,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/979abff6a95d24a451c5b3dac936fe04d30c2740_e2e0b265-c2cc-4f17-8ddb-bf6ab5e5e3c7.webp?v=1714720608"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/979abff6a95d24a451c5b3dac936fe04d30c2740_e2e0b265-c2cc-4f17-8ddb-bf6ab5e5e3c7.webp?v=1714720608","width":2000},{"alt":null,"id":23877047386211,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83783500c4864a2659b92ea880f6b82cf0bac693_db465554-6acb-40c6-991d-ad0bcd8542a5.webp?v=1714720610"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83783500c4864a2659b92ea880f6b82cf0bac693_db465554-6acb-40c6-991d-ad0bcd8542a5.webp?v=1714720610","width":2000},{"alt":null,"id":23877047746659,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d2b3e4dc14d7dd644a76a36e6701771bdfdb9730_da77d54e-8107-40de-9b1b-c3576b4b759b.webp?v=1714720613"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d2b3e4dc14d7dd644a76a36e6701771bdfdb9730_da77d54e-8107-40de-9b1b-c3576b4b759b.webp?v=1714720613","width":2000},{"alt":null,"id":23877048762467,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78c1e8536522bdd7f54334f517d1fcd428c456e2_98a6138e-9ab0-478e-8fc0-cc107e40a0ec.webp?v=1714720615"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78c1e8536522bdd7f54334f517d1fcd428c456e2_98a6138e-9ab0-478e-8fc0-cc107e40a0ec.webp?v=1714720615","width":2000},{"alt":null,"id":23877049286755,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a7fd033bd8f0cad721e562a04e6549552904d460_197af8cf-0c42-49bc-91c5-f1b6041416f5.webp?v=1714720617"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a7fd033bd8f0cad721e562a04e6549552904d460_197af8cf-0c42-49bc-91c5-f1b6041416f5.webp?v=1714720617","width":2000},{"alt":null,"id":23877049778275,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b762b87819b113e70a6fbba7b0a4dcaf5cc2e809_abfdf38d-0452-4e70-8aa0-1401fe35fe07.webp?v=1714720620"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b762b87819b113e70a6fbba7b0a4dcaf5cc2e809_abfdf38d-0452-4e70-8aa0-1401fe35fe07.webp?v=1714720620","width":2000},{"alt":null,"id":23877050368099,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/25b381c8bfad8c7bcbb0e01fd63067819ea1facd_a49b1cc8-ef17-499e-94a6-cf78dfdf7169.webp?v=1714720622"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/25b381c8bfad8c7bcbb0e01fd63067819ea1facd_a49b1cc8-ef17-499e-94a6-cf78dfdf7169.webp?v=1714720622","width":2000},{"alt":null,"id":23877050990691,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c2045a470231da337f150bd93e86ccdf84b6758_666476ce-5976-4e73-9376-342fd0778b2f.webp?v=1714720625"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c2045a470231da337f150bd93e86ccdf84b6758_666476ce-5976-4e73-9376-342fd0778b2f.webp?v=1714720625","width":2000},{"alt":null,"id":23877051416675,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1bdb5add97e17e1a14a13226e4747b1e5ce2721d_b64703f5-9d19-464d-8c8d-15670b5f641b.webp?v=1714720627"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1bdb5add97e17e1a14a13226e4747b1e5ce2721d_b64703f5-9d19-464d-8c8d-15670b5f641b.webp?v=1714720627","width":2000},{"alt":null,"id":23877051875427,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/317b45421f92af095c360bc468fa9455f4891e8a_6ff2cbf7-1137-461b-8b0c-152145571efe.webp?v=1714720629"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/317b45421f92af095c360bc468fa9455f4891e8a_6ff2cbf7-1137-461b-8b0c-152145571efe.webp?v=1714720629","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41884928475235,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB11","requires_shipping":true,"taxable":true,"featured_image":{"id":31472134226019,"product_id":7408388571235,"position":7,"created_at":"2024-05-03T15:17:00+08:00","updated_at":"2024-05-03T15:17:00+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b762b87819b113e70a6fbba7b0a4dcaf5cc2e809_abfdf38d-0452-4e70-8aa0-1401fe35fe07.webp?v=1714720620","variant_ids":[41884928475235]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具2-黑 - 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":"NPB0118424-PB11","featured_media":{"alt":null,"id":23877049778275,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b762b87819b113e70a6fbba7b0a4dcaf5cc2e809_abfdf38d-0452-4e70-8aa0-1401fe35fe07.webp?v=1714720620"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41884928475235,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB11","requires_shipping":true,"taxable":true,"featured_image":{"id":31472134226019,"product_id":7408388571235,"position":7,"created_at":"2024-05-03T15:17:00+08:00","updated_at":"2024-05-03T15:17:00+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b762b87819b113e70a6fbba7b0a4dcaf5cc2e809_abfdf38d-0452-4e70-8aa0-1401fe35fe07.webp?v=1714720620","variant_ids":[41884928475235]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具2-黑 - 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":"NPB0118424-PB11","featured_media":{"alt":null,"id":23877049778275,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b762b87819b113e70a6fbba7b0a4dcaf5cc2e809_abfdf38d-0452-4e70-8aa0-1401fe35fe07.webp?v=1714720620"}},"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: "停產" }