$product = {"id":7408419307619,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - JEDI ORDER徽章2-潮流系列","handle":"iphone-12-mini-mod-nx-printable-pb47","description":null,"published_at":"2024-06-11T16:36:43+08:00","created_at":"2024-05-03T15:22:52+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":41885268836451,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB47","requires_shipping":true,"taxable":true,"featured_image":{"id":31472223879267,"product_id":7408419307619,"position":6,"created_at":"2024-05-03T15:23:07+08:00","updated_at":"2024-05-03T15:23:07+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6afb86c2898848a4309b74a3e350bc39619af9dc_cf800a66-6bee-4f37-9c0a-c2e73f8e2875.webp?v=1714720987","variant_ids":[41885268836451]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - JEDI ORDER徽章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-PB47","featured_media":{"alt":null,"id":23877139726435,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6afb86c2898848a4309b74a3e350bc39619af9dc_cf800a66-6bee-4f37-9c0a-c2e73f8e2875.webp?v=1714720987"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8194476775b6326afd59319868ed50ff75ab449e_93bba4a3-5613-4867-9148-13dd7e3272a3.webp?v=1714720975","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5de2e0c95d6dc41c3e21d33cc0fd6fabad570798_20ad6790-1190-4ba6-a766-e1ca61cf4827.webp?v=1714720977","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c51a1ce71bf514d2988ceed91468016c5b94b72_5e133241-939a-4cbc-b403-a913abcb619b.webp?v=1714720979","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/24cee87c943e0a6a7e86b836ca5b916943d4bcc7_fe41f113-a69e-4ed6-be20-2aa5659e0952.webp?v=1714720982","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14484a64140018dd1a006fc1aaf949a985ccd8b7_5f595ce6-8375-48e5-b4f2-6962cd496046.webp?v=1714720984","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6afb86c2898848a4309b74a3e350bc39619af9dc_cf800a66-6bee-4f37-9c0a-c2e73f8e2875.webp?v=1714720987","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f9bfd350f2e71bd9c54999fd9f54ab5fb41ba0e_2e5c694e-58c4-4064-8cf0-68ab422da670.webp?v=1714720989","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39e8a311b54ec3a9e16fc820598946467fe63a4f_120a5920-7c20-47ae-bf2f-5971dd6762ec.webp?v=1714720992","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4b0630538b3dbbe61ce794cb912fc5e50915a40_3cc68f86-5818-4eb2-afe1-0eba0040d286.webp?v=1714720994","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2845bee9e3040a288712823d7b295d621a3e1bf_d6b429f9-b9d2-455c-9d6b-57da913f5a6f.webp?v=1714720996","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f85e45c9d47c1e6924c80f3451109b40aa442660_fc91d20e-5d4f-4308-9710-4b86386c4d90.webp?v=1714720999"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8194476775b6326afd59319868ed50ff75ab449e_93bba4a3-5613-4867-9148-13dd7e3272a3.webp?v=1714720975","options":["color"],"media":[{"alt":null,"id":23877137104995,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8194476775b6326afd59319868ed50ff75ab449e_93bba4a3-5613-4867-9148-13dd7e3272a3.webp?v=1714720975"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8194476775b6326afd59319868ed50ff75ab449e_93bba4a3-5613-4867-9148-13dd7e3272a3.webp?v=1714720975","width":2000},{"alt":null,"id":23877137530979,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5de2e0c95d6dc41c3e21d33cc0fd6fabad570798_20ad6790-1190-4ba6-a766-e1ca61cf4827.webp?v=1714720977"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5de2e0c95d6dc41c3e21d33cc0fd6fabad570798_20ad6790-1190-4ba6-a766-e1ca61cf4827.webp?v=1714720977","width":2000},{"alt":null,"id":23877137989731,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c51a1ce71bf514d2988ceed91468016c5b94b72_5e133241-939a-4cbc-b403-a913abcb619b.webp?v=1714720979"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c51a1ce71bf514d2988ceed91468016c5b94b72_5e133241-939a-4cbc-b403-a913abcb619b.webp?v=1714720979","width":2000},{"alt":null,"id":23877138546787,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/24cee87c943e0a6a7e86b836ca5b916943d4bcc7_fe41f113-a69e-4ed6-be20-2aa5659e0952.webp?v=1714720982"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/24cee87c943e0a6a7e86b836ca5b916943d4bcc7_fe41f113-a69e-4ed6-be20-2aa5659e0952.webp?v=1714720982","width":2000},{"alt":null,"id":23877139136611,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14484a64140018dd1a006fc1aaf949a985ccd8b7_5f595ce6-8375-48e5-b4f2-6962cd496046.webp?v=1714720984"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14484a64140018dd1a006fc1aaf949a985ccd8b7_5f595ce6-8375-48e5-b4f2-6962cd496046.webp?v=1714720984","width":2000},{"alt":null,"id":23877139726435,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6afb86c2898848a4309b74a3e350bc39619af9dc_cf800a66-6bee-4f37-9c0a-c2e73f8e2875.webp?v=1714720987"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6afb86c2898848a4309b74a3e350bc39619af9dc_cf800a66-6bee-4f37-9c0a-c2e73f8e2875.webp?v=1714720987","width":2000},{"alt":null,"id":23877140283491,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f9bfd350f2e71bd9c54999fd9f54ab5fb41ba0e_2e5c694e-58c4-4064-8cf0-68ab422da670.webp?v=1714720989"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f9bfd350f2e71bd9c54999fd9f54ab5fb41ba0e_2e5c694e-58c4-4064-8cf0-68ab422da670.webp?v=1714720989","width":2000},{"alt":null,"id":23877140775011,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39e8a311b54ec3a9e16fc820598946467fe63a4f_120a5920-7c20-47ae-bf2f-5971dd6762ec.webp?v=1714720992"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39e8a311b54ec3a9e16fc820598946467fe63a4f_120a5920-7c20-47ae-bf2f-5971dd6762ec.webp?v=1714720992","width":2000},{"alt":null,"id":23877141200995,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4b0630538b3dbbe61ce794cb912fc5e50915a40_3cc68f86-5818-4eb2-afe1-0eba0040d286.webp?v=1714720994"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4b0630538b3dbbe61ce794cb912fc5e50915a40_3cc68f86-5818-4eb2-afe1-0eba0040d286.webp?v=1714720994","width":2000},{"alt":null,"id":23877141790819,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2845bee9e3040a288712823d7b295d621a3e1bf_d6b429f9-b9d2-455c-9d6b-57da913f5a6f.webp?v=1714720996"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2845bee9e3040a288712823d7b295d621a3e1bf_d6b429f9-b9d2-455c-9d6b-57da913f5a6f.webp?v=1714720996","width":2000},{"alt":null,"id":23877142282339,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f85e45c9d47c1e6924c80f3451109b40aa442660_fc91d20e-5d4f-4308-9710-4b86386c4d90.webp?v=1714720999"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f85e45c9d47c1e6924c80f3451109b40aa442660_fc91d20e-5d4f-4308-9710-4b86386c4d90.webp?v=1714720999","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41885268836451,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB47","requires_shipping":true,"taxable":true,"featured_image":{"id":31472223879267,"product_id":7408419307619,"position":6,"created_at":"2024-05-03T15:23:07+08:00","updated_at":"2024-05-03T15:23:07+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6afb86c2898848a4309b74a3e350bc39619af9dc_cf800a66-6bee-4f37-9c0a-c2e73f8e2875.webp?v=1714720987","variant_ids":[41885268836451]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - JEDI ORDER徽章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-PB47","featured_media":{"alt":null,"id":23877139726435,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6afb86c2898848a4309b74a3e350bc39619af9dc_cf800a66-6bee-4f37-9c0a-c2e73f8e2875.webp?v=1714720987"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41885268836451,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB47","requires_shipping":true,"taxable":true,"featured_image":{"id":31472223879267,"product_id":7408419307619,"position":6,"created_at":"2024-05-03T15:23:07+08:00","updated_at":"2024-05-03T15:23:07+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6afb86c2898848a4309b74a3e350bc39619af9dc_cf800a66-6bee-4f37-9c0a-c2e73f8e2875.webp?v=1714720987","variant_ids":[41885268836451]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - JEDI ORDER徽章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-PB47","featured_media":{"alt":null,"id":23877139726435,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6afb86c2898848a4309b74a3e350bc39619af9dc_cf800a66-6bee-4f37-9c0a-c2e73f8e2875.webp?v=1714720987"}},"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: "停產" }