$product = {"id":7408546578531,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-噴漆黑","handle":"iphone-12-mini-mod-nx-printable-pb01","description":null,"published_at":"2024-06-11T16:40:19+08:00","created_at":"2024-05-03T15:47:54+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":41886720065635,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB01","requires_shipping":true,"taxable":true,"featured_image":{"id":31472558440547,"product_id":7408546578531,"position":11,"created_at":"2024-05-03T15:48:19+08:00","updated_at":"2024-05-03T15:48:19+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9798963bf9769470b3c9dc1189ded4c9861f55dc_3cdaf420-8f4b-4f48-9148-d85d73971fb2.webp?v=1714722499","variant_ids":[41886720065635]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-噴漆黑 - 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-PB01","featured_media":{"alt":null,"id":23877475762275,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9798963bf9769470b3c9dc1189ded4c9861f55dc_3cdaf420-8f4b-4f48-9148-d85d73971fb2.webp?v=1714722499"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6efd59741b1b83029f6016ddc3520fe526cffe9e_01bf111f-f21c-4709-ae1a-65be6132e865.webp?v=1714722476","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d135a028967a7620570e20636222e9cee49e9f1_73aca6c1-7c0f-492b-989f-950514a761db.webp?v=1714722479","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d270bd9a2feb76cd83271e6d4371834c5ac2735a_4e84c3a2-2a6a-49ff-8034-9a5484462c3e.webp?v=1714722481","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6fc7bc6b66d4e6b97d9f60378931a94c9814525_7de8eca3-597d-475b-9791-bc0c37074f1e.webp?v=1714722483","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4d66f555f57e0631d6fd92e0506f0522dad776f_75957a1f-e0de-4c14-bc58-77e89db2c860.webp?v=1714722485","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbb04999b46384ab68afff1e6e07ebf8ada0f6d8_30e58405-b3e1-4496-8d70-6ac08bb794b1.webp?v=1714722487","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3a947ff1d30266de4fa938a464c809ada129aff_1b9ee2cf-7c2f-42f9-a07d-12345a6155f6.webp?v=1714722490","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eabf50229c943faf10681ab53ce8dad0bbb8063c_c21432ec-d14f-4e3e-a87e-9260f3404831.webp?v=1714722492","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad7855daa4552995f6043a62cdf05e4191251fbe_806dcf56-e031-4bf8-bb47-ee5948ff3685.webp?v=1714722495","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7dcdbf1f0ec45ee92805eb580634bcbc8c1539d_69d51bee-290d-4bfb-a620-a8e43bd36ab2.webp?v=1714722497","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9798963bf9769470b3c9dc1189ded4c9861f55dc_3cdaf420-8f4b-4f48-9148-d85d73971fb2.webp?v=1714722499"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6efd59741b1b83029f6016ddc3520fe526cffe9e_01bf111f-f21c-4709-ae1a-65be6132e865.webp?v=1714722476","options":["color"],"media":[{"alt":null,"id":23877471076451,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6efd59741b1b83029f6016ddc3520fe526cffe9e_01bf111f-f21c-4709-ae1a-65be6132e865.webp?v=1714722476"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6efd59741b1b83029f6016ddc3520fe526cffe9e_01bf111f-f21c-4709-ae1a-65be6132e865.webp?v=1714722476","width":2000},{"alt":null,"id":23877471469667,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d135a028967a7620570e20636222e9cee49e9f1_73aca6c1-7c0f-492b-989f-950514a761db.webp?v=1714722479"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d135a028967a7620570e20636222e9cee49e9f1_73aca6c1-7c0f-492b-989f-950514a761db.webp?v=1714722479","width":2000},{"alt":null,"id":23877471993955,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d270bd9a2feb76cd83271e6d4371834c5ac2735a_4e84c3a2-2a6a-49ff-8034-9a5484462c3e.webp?v=1714722481"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d270bd9a2feb76cd83271e6d4371834c5ac2735a_4e84c3a2-2a6a-49ff-8034-9a5484462c3e.webp?v=1714722481","width":2000},{"alt":null,"id":23877472682083,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6fc7bc6b66d4e6b97d9f60378931a94c9814525_7de8eca3-597d-475b-9791-bc0c37074f1e.webp?v=1714722483"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6fc7bc6b66d4e6b97d9f60378931a94c9814525_7de8eca3-597d-475b-9791-bc0c37074f1e.webp?v=1714722483","width":2000},{"alt":null,"id":23877473042531,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4d66f555f57e0631d6fd92e0506f0522dad776f_75957a1f-e0de-4c14-bc58-77e89db2c860.webp?v=1714722485"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4d66f555f57e0631d6fd92e0506f0522dad776f_75957a1f-e0de-4c14-bc58-77e89db2c860.webp?v=1714722485","width":2000},{"alt":null,"id":23877473566819,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbb04999b46384ab68afff1e6e07ebf8ada0f6d8_30e58405-b3e1-4496-8d70-6ac08bb794b1.webp?v=1714722487"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbb04999b46384ab68afff1e6e07ebf8ada0f6d8_30e58405-b3e1-4496-8d70-6ac08bb794b1.webp?v=1714722487","width":2000},{"alt":null,"id":23877473960035,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3a947ff1d30266de4fa938a464c809ada129aff_1b9ee2cf-7c2f-42f9-a07d-12345a6155f6.webp?v=1714722490"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3a947ff1d30266de4fa938a464c809ada129aff_1b9ee2cf-7c2f-42f9-a07d-12345a6155f6.webp?v=1714722490","width":2000},{"alt":null,"id":23877474451555,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eabf50229c943faf10681ab53ce8dad0bbb8063c_c21432ec-d14f-4e3e-a87e-9260f3404831.webp?v=1714722492"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eabf50229c943faf10681ab53ce8dad0bbb8063c_c21432ec-d14f-4e3e-a87e-9260f3404831.webp?v=1714722492","width":2000},{"alt":null,"id":23877474844771,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad7855daa4552995f6043a62cdf05e4191251fbe_806dcf56-e031-4bf8-bb47-ee5948ff3685.webp?v=1714722495"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad7855daa4552995f6043a62cdf05e4191251fbe_806dcf56-e031-4bf8-bb47-ee5948ff3685.webp?v=1714722495","width":2000},{"alt":null,"id":23877475369059,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7dcdbf1f0ec45ee92805eb580634bcbc8c1539d_69d51bee-290d-4bfb-a620-a8e43bd36ab2.webp?v=1714722497"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7dcdbf1f0ec45ee92805eb580634bcbc8c1539d_69d51bee-290d-4bfb-a620-a8e43bd36ab2.webp?v=1714722497","width":2000},{"alt":null,"id":23877475762275,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9798963bf9769470b3c9dc1189ded4c9861f55dc_3cdaf420-8f4b-4f48-9148-d85d73971fb2.webp?v=1714722499"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9798963bf9769470b3c9dc1189ded4c9861f55dc_3cdaf420-8f4b-4f48-9148-d85d73971fb2.webp?v=1714722499","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41886720065635,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB01","requires_shipping":true,"taxable":true,"featured_image":{"id":31472558440547,"product_id":7408546578531,"position":11,"created_at":"2024-05-03T15:48:19+08:00","updated_at":"2024-05-03T15:48:19+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9798963bf9769470b3c9dc1189ded4c9861f55dc_3cdaf420-8f4b-4f48-9148-d85d73971fb2.webp?v=1714722499","variant_ids":[41886720065635]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-噴漆黑 - 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-PB01","featured_media":{"alt":null,"id":23877475762275,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9798963bf9769470b3c9dc1189ded4c9861f55dc_3cdaf420-8f4b-4f48-9148-d85d73971fb2.webp?v=1714722499"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41886720065635,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB01","requires_shipping":true,"taxable":true,"featured_image":{"id":31472558440547,"product_id":7408546578531,"position":11,"created_at":"2024-05-03T15:48:19+08:00","updated_at":"2024-05-03T15:48:19+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9798963bf9769470b3c9dc1189ded4c9861f55dc_3cdaf420-8f4b-4f48-9148-d85d73971fb2.webp?v=1714722499","variant_ids":[41886720065635]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-噴漆黑 - 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-PB01","featured_media":{"alt":null,"id":23877475762275,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9798963bf9769470b3c9dc1189ded4c9861f55dc_3cdaf420-8f4b-4f48-9148-d85d73971fb2.webp?v=1714722499"}},"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: "停產" }