$product = {"id":7408413048931,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Spaceships-漫畫系列","handle":"iphone-12-mini-mod-nx-printable-pb85","description":null,"published_at":"2024-06-11T16:36:32+08:00","created_at":"2024-05-03T15:21:35+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":41885191995491,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB85","requires_shipping":true,"taxable":true,"featured_image":{"id":31472206053475,"product_id":7408413048931,"position":7,"created_at":"2024-05-03T15:21:51+08:00","updated_at":"2024-05-03T15:21:51+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ff87ddf37d9eb1f8f78211849aae013d77a0888_12b08468-c8b6-48c3-935e-a3c5b3314e5c.webp?v=1714720911","variant_ids":[41885191995491]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Spaceships-漫畫系列 - 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-PB85","featured_media":{"alt":null,"id":23877121835107,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ff87ddf37d9eb1f8f78211849aae013d77a0888_12b08468-c8b6-48c3-935e-a3c5b3314e5c.webp?v=1714720911"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d921658c0aca9da66091c993908dfd2f4511d9b_8ec7263c-39c0-49ff-a6ce-16d9d355669e.webp?v=1714720897","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e155b81e53f570d1d35d958ff36d07f52a7b7798_6328d7e4-a1a0-4941-842d-c0701b599169.webp?v=1714720899","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7225b901a740357d8b97a050551347deed17ced_8f5b8896-02ab-4ef6-8cac-ab7751740a19.webp?v=1714720902","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c50348d94ae91969e168f546de7265065ece4b14_352c70af-0bd5-4af7-8e9a-11438a4b5c46.webp?v=1714720904","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1812ed619a05792d42f0861e3fce92c3f3178df5_c4008728-ea6a-460f-8235-aeda359c1e11.webp?v=1714720906","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7686e7ffec79283a15cf14cce35e97345ab6a53d_cfeecef2-1347-4aad-a371-193399e0e6f8.webp?v=1714720909","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ff87ddf37d9eb1f8f78211849aae013d77a0888_12b08468-c8b6-48c3-935e-a3c5b3314e5c.webp?v=1714720911","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ea8c255b11cfba5ac126fa8e59306f53da4ca70_fa5fc5b3-6201-42d2-a79e-6d7484b74cd0.webp?v=1714720914","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9680e744275778975d19b6e9bf2c96390cebf7fe_1f9b1735-0cfe-441f-a514-5afac6012891.webp?v=1714720916","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d2efac5fd83f86e1e2837e1919650e05cec44233_74c407f0-a883-42dd-9933-0d13c41b14b5.webp?v=1714720918","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2406c50902815ed39bfbe18afefcd30b363cfb2b_f00f3f22-68c7-4b31-887f-32603e0f43b3.webp?v=1714720921"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d921658c0aca9da66091c993908dfd2f4511d9b_8ec7263c-39c0-49ff-a6ce-16d9d355669e.webp?v=1714720897","options":["color"],"media":[{"alt":null,"id":23877118558307,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d921658c0aca9da66091c993908dfd2f4511d9b_8ec7263c-39c0-49ff-a6ce-16d9d355669e.webp?v=1714720897"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d921658c0aca9da66091c993908dfd2f4511d9b_8ec7263c-39c0-49ff-a6ce-16d9d355669e.webp?v=1714720897","width":2000},{"alt":null,"id":23877119082595,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e155b81e53f570d1d35d958ff36d07f52a7b7798_6328d7e4-a1a0-4941-842d-c0701b599169.webp?v=1714720899"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e155b81e53f570d1d35d958ff36d07f52a7b7798_6328d7e4-a1a0-4941-842d-c0701b599169.webp?v=1714720899","width":2000},{"alt":null,"id":23877119508579,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7225b901a740357d8b97a050551347deed17ced_8f5b8896-02ab-4ef6-8cac-ab7751740a19.webp?v=1714720902"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7225b901a740357d8b97a050551347deed17ced_8f5b8896-02ab-4ef6-8cac-ab7751740a19.webp?v=1714720902","width":2000},{"alt":null,"id":23877120196707,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c50348d94ae91969e168f546de7265065ece4b14_352c70af-0bd5-4af7-8e9a-11438a4b5c46.webp?v=1714720904"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c50348d94ae91969e168f546de7265065ece4b14_352c70af-0bd5-4af7-8e9a-11438a4b5c46.webp?v=1714720904","width":2000},{"alt":null,"id":23877120655459,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1812ed619a05792d42f0861e3fce92c3f3178df5_c4008728-ea6a-460f-8235-aeda359c1e11.webp?v=1714720906"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1812ed619a05792d42f0861e3fce92c3f3178df5_c4008728-ea6a-460f-8235-aeda359c1e11.webp?v=1714720906","width":2000},{"alt":null,"id":23877121343587,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7686e7ffec79283a15cf14cce35e97345ab6a53d_cfeecef2-1347-4aad-a371-193399e0e6f8.webp?v=1714720909"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7686e7ffec79283a15cf14cce35e97345ab6a53d_cfeecef2-1347-4aad-a371-193399e0e6f8.webp?v=1714720909","width":2000},{"alt":null,"id":23877121835107,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ff87ddf37d9eb1f8f78211849aae013d77a0888_12b08468-c8b6-48c3-935e-a3c5b3314e5c.webp?v=1714720911"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ff87ddf37d9eb1f8f78211849aae013d77a0888_12b08468-c8b6-48c3-935e-a3c5b3314e5c.webp?v=1714720911","width":2000},{"alt":null,"id":23877122981987,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ea8c255b11cfba5ac126fa8e59306f53da4ca70_fa5fc5b3-6201-42d2-a79e-6d7484b74cd0.webp?v=1714720914"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ea8c255b11cfba5ac126fa8e59306f53da4ca70_fa5fc5b3-6201-42d2-a79e-6d7484b74cd0.webp?v=1714720914","width":2000},{"alt":null,"id":23877124292707,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9680e744275778975d19b6e9bf2c96390cebf7fe_1f9b1735-0cfe-441f-a514-5afac6012891.webp?v=1714720916"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9680e744275778975d19b6e9bf2c96390cebf7fe_1f9b1735-0cfe-441f-a514-5afac6012891.webp?v=1714720916","width":2000},{"alt":null,"id":23877124751459,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d2efac5fd83f86e1e2837e1919650e05cec44233_74c407f0-a883-42dd-9933-0d13c41b14b5.webp?v=1714720918"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d2efac5fd83f86e1e2837e1919650e05cec44233_74c407f0-a883-42dd-9933-0d13c41b14b5.webp?v=1714720918","width":2000},{"alt":null,"id":23877125341283,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2406c50902815ed39bfbe18afefcd30b363cfb2b_f00f3f22-68c7-4b31-887f-32603e0f43b3.webp?v=1714720921"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2406c50902815ed39bfbe18afefcd30b363cfb2b_f00f3f22-68c7-4b31-887f-32603e0f43b3.webp?v=1714720921","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41885191995491,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB85","requires_shipping":true,"taxable":true,"featured_image":{"id":31472206053475,"product_id":7408413048931,"position":7,"created_at":"2024-05-03T15:21:51+08:00","updated_at":"2024-05-03T15:21:51+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ff87ddf37d9eb1f8f78211849aae013d77a0888_12b08468-c8b6-48c3-935e-a3c5b3314e5c.webp?v=1714720911","variant_ids":[41885191995491]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Spaceships-漫畫系列 - 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-PB85","featured_media":{"alt":null,"id":23877121835107,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ff87ddf37d9eb1f8f78211849aae013d77a0888_12b08468-c8b6-48c3-935e-a3c5b3314e5c.webp?v=1714720911"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41885191995491,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB85","requires_shipping":true,"taxable":true,"featured_image":{"id":31472206053475,"product_id":7408413048931,"position":7,"created_at":"2024-05-03T15:21:51+08:00","updated_at":"2024-05-03T15:21:51+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ff87ddf37d9eb1f8f78211849aae013d77a0888_12b08468-c8b6-48c3-935e-a3c5b3314e5c.webp?v=1714720911","variant_ids":[41885191995491]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Spaceships-漫畫系列 - 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-PB85","featured_media":{"alt":null,"id":23877121835107,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ff87ddf37d9eb1f8f78211849aae013d77a0888_12b08468-c8b6-48c3-935e-a3c5b3314e5c.webp?v=1714720911"}},"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: "停產" }