$product = {"id":7408442409059,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 丘巴卡-中鋒-幽默系列","handle":"iphone-12-pro-max-mod-nx-printable-pc09","description":null,"published_at":"2024-06-11T16:37:20+08:00","created_at":"2024-05-03T15:27:17+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 pro max","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":41885524295779,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PC09","requires_shipping":true,"taxable":true,"featured_image":{"id":31472290496611,"product_id":7408442409059,"position":3,"created_at":"2024-05-03T15:27:24+08:00","updated_at":"2024-05-03T15:27:24+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a7afebe57d1394077679606c63553518646ad01_33f12f22-4503-41c8-8758-c739e455b924.webp?v=1714721244","variant_ids":[41885524295779]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0118724-PC09","featured_media":{"alt":null,"id":23877206835299,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a7afebe57d1394077679606c63553518646ad01_33f12f22-4503-41c8-8758-c739e455b924.webp?v=1714721244"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80f5bef2003b2b122bc102f33c88114add159a64_6e63756f-1c52-4e48-a063-46eebeed1643.webp?v=1714721239","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3ab9b4f84c895082e09a222c17f76548e090718c_cd3e7bf6-85f5-44f2-bde5-c8d9a0b72e03.webp?v=1714721242","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a7afebe57d1394077679606c63553518646ad01_33f12f22-4503-41c8-8758-c739e455b924.webp?v=1714721244","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/845c75ad4b8869ffd643687c03dda7fa777765f8_5ff3090f-74db-4451-8c1b-710b9f13f69c.webp?v=1714721246","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ddc2ca6a517e16c327a3f7e07ca1ad57be1f22d3_af65bf55-230a-4826-9f80-b8e13cfb0390.webp?v=1714721248","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7dc8fc48347d3f3520122c3bb20dee33c1ca1e3b_6d93cc78-0bc5-4e4a-b90a-d4e180f5fcda.webp?v=1714721251","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/294a1c76b3ce1d0d3e6c767c3dae78d9dabd4126_1f32ef05-e4a8-4a28-ad8f-8c6de8b26eb0.webp?v=1714721253","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a978b051b08a7ed7de4735cffdd34efb0bfcbcb_c93f62f3-e31d-4940-8ae8-630975de8e46.webp?v=1714721256","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f737909f4eba4db330fe0b141b6684854e1f7d34_acaa9c63-18eb-49af-825d-6f202a4a5ef4.webp?v=1714721258","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c99a5fccfe099315550ed50266f5c40a25f090aa_02493875-3a23-4f57-a9fc-9b8baf6b645e.webp?v=1714721260"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80f5bef2003b2b122bc102f33c88114add159a64_6e63756f-1c52-4e48-a063-46eebeed1643.webp?v=1714721239","options":["color"],"media":[{"alt":null,"id":23877206114403,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80f5bef2003b2b122bc102f33c88114add159a64_6e63756f-1c52-4e48-a063-46eebeed1643.webp?v=1714721239"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80f5bef2003b2b122bc102f33c88114add159a64_6e63756f-1c52-4e48-a063-46eebeed1643.webp?v=1714721239","width":2000},{"alt":null,"id":23877206442083,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3ab9b4f84c895082e09a222c17f76548e090718c_cd3e7bf6-85f5-44f2-bde5-c8d9a0b72e03.webp?v=1714721242"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3ab9b4f84c895082e09a222c17f76548e090718c_cd3e7bf6-85f5-44f2-bde5-c8d9a0b72e03.webp?v=1714721242","width":2000},{"alt":null,"id":23877206835299,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a7afebe57d1394077679606c63553518646ad01_33f12f22-4503-41c8-8758-c739e455b924.webp?v=1714721244"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a7afebe57d1394077679606c63553518646ad01_33f12f22-4503-41c8-8758-c739e455b924.webp?v=1714721244","width":2000},{"alt":null,"id":23877207359587,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/845c75ad4b8869ffd643687c03dda7fa777765f8_5ff3090f-74db-4451-8c1b-710b9f13f69c.webp?v=1714721246"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/845c75ad4b8869ffd643687c03dda7fa777765f8_5ff3090f-74db-4451-8c1b-710b9f13f69c.webp?v=1714721246","width":2000},{"alt":null,"id":23877207654499,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ddc2ca6a517e16c327a3f7e07ca1ad57be1f22d3_af65bf55-230a-4826-9f80-b8e13cfb0390.webp?v=1714721248"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ddc2ca6a517e16c327a3f7e07ca1ad57be1f22d3_af65bf55-230a-4826-9f80-b8e13cfb0390.webp?v=1714721248","width":2000},{"alt":null,"id":23877208277091,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7dc8fc48347d3f3520122c3bb20dee33c1ca1e3b_6d93cc78-0bc5-4e4a-b90a-d4e180f5fcda.webp?v=1714721251"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7dc8fc48347d3f3520122c3bb20dee33c1ca1e3b_6d93cc78-0bc5-4e4a-b90a-d4e180f5fcda.webp?v=1714721251","width":2000},{"alt":null,"id":23877208637539,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/294a1c76b3ce1d0d3e6c767c3dae78d9dabd4126_1f32ef05-e4a8-4a28-ad8f-8c6de8b26eb0.webp?v=1714721253"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/294a1c76b3ce1d0d3e6c767c3dae78d9dabd4126_1f32ef05-e4a8-4a28-ad8f-8c6de8b26eb0.webp?v=1714721253","width":2000},{"alt":null,"id":23877209063523,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a978b051b08a7ed7de4735cffdd34efb0bfcbcb_c93f62f3-e31d-4940-8ae8-630975de8e46.webp?v=1714721256"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a978b051b08a7ed7de4735cffdd34efb0bfcbcb_c93f62f3-e31d-4940-8ae8-630975de8e46.webp?v=1714721256","width":2000},{"alt":null,"id":23877209391203,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f737909f4eba4db330fe0b141b6684854e1f7d34_acaa9c63-18eb-49af-825d-6f202a4a5ef4.webp?v=1714721258"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f737909f4eba4db330fe0b141b6684854e1f7d34_acaa9c63-18eb-49af-825d-6f202a4a5ef4.webp?v=1714721258","width":2000},{"alt":null,"id":23877209849955,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c99a5fccfe099315550ed50266f5c40a25f090aa_02493875-3a23-4f57-a9fc-9b8baf6b645e.webp?v=1714721260"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c99a5fccfe099315550ed50266f5c40a25f090aa_02493875-3a23-4f57-a9fc-9b8baf6b645e.webp?v=1714721260","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41885524295779,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PC09","requires_shipping":true,"taxable":true,"featured_image":{"id":31472290496611,"product_id":7408442409059,"position":3,"created_at":"2024-05-03T15:27:24+08:00","updated_at":"2024-05-03T15:27:24+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a7afebe57d1394077679606c63553518646ad01_33f12f22-4503-41c8-8758-c739e455b924.webp?v=1714721244","variant_ids":[41885524295779]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0118724-PC09","featured_media":{"alt":null,"id":23877206835299,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a7afebe57d1394077679606c63553518646ad01_33f12f22-4503-41c8-8758-c739e455b924.webp?v=1714721244"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41885524295779,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PC09","requires_shipping":true,"taxable":true,"featured_image":{"id":31472290496611,"product_id":7408442409059,"position":3,"created_at":"2024-05-03T15:27:24+08:00","updated_at":"2024-05-03T15:27:24+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a7afebe57d1394077679606c63553518646ad01_33f12f22-4503-41c8-8758-c739e455b924.webp?v=1714721244","variant_ids":[41885524295779]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0118724-PC09","featured_media":{"alt":null,"id":23877206835299,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a7afebe57d1394077679606c63553518646ad01_33f12f22-4503-41c8-8758-c739e455b924.webp?v=1714721244"}},"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: "停產" }