$product = {"id":7408399319139,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 波巴費特-線稿風格白","handle":"iphone-12-mini-mod-nx-printable-pb52","description":null,"published_at":"2024-06-11T16:36:11+08:00","created_at":"2024-05-03T15:18:56+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":41885044899939,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB52","requires_shipping":true,"taxable":true,"featured_image":{"id":31472165617763,"product_id":7408399319139,"position":10,"created_at":"2024-05-03T15:19:19+08:00","updated_at":"2024-05-03T15:19:19+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c0d4301209e0a9bafb1af52c5ba599b6608c624_f2caefcf-76b0-4312-9fa0-37af89067192.webp?v=1714720759","variant_ids":[41885044899939]},"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-PB52","featured_media":{"alt":null,"id":23877081268323,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c0d4301209e0a9bafb1af52c5ba599b6608c624_f2caefcf-76b0-4312-9fa0-37af89067192.webp?v=1714720759"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ce9144ed1876a7be4849bfd744df0c0f8db380b_05889f87-53b7-4ffc-9cbd-37e6613037dc.webp?v=1714720739","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b5c8f1ada50272fac4f282598169aacd502caa6_8247c1a7-9e78-4809-b31e-a0c8abd82c43.webp?v=1714720741","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2bd8cb86aa5b785787e8217e094d5e072f65417_d78e8c0d-b611-43c4-ac12-4ef35ecbc149.webp?v=1714720743","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/018e62f2cf6476b23bffae9c3cc69c5d4784f19c_8fbff1f1-3731-4d32-9f85-e3c78027a58f.webp?v=1714720746","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c643d59d3af85e5068b0161b8fcd809191735bc5_9666073c-0587-4bfc-820e-d85957cc0346.webp?v=1714720748","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a391a652e2b50e40001d7654d43d7aff284012df_b136069e-5f48-41d8-b1d3-e4d7875f4c24.webp?v=1714720750","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4057fce979b82334dbb1015d7ee69d2d85fdca3d_518cdf35-d070-4fda-a0d4-925d721b8a4b.webp?v=1714720752","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c8a156cb277e79255ab92abce64889e8c89c861f_7f35f9b8-3500-4932-823b-89c5b477f4fa.webp?v=1714720754","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a6e2bdd5bd369c4232194779e8f48a6d0fd908e5_78af26db-5077-45d0-bb87-9ba8d98b1d89.webp?v=1714720757","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c0d4301209e0a9bafb1af52c5ba599b6608c624_f2caefcf-76b0-4312-9fa0-37af89067192.webp?v=1714720759","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/610a0f74f978faec1bc0f2cb62ad8ac2226aa9d8_ed483b9f-0d2d-4bed-80f2-e453e1c17f6a.webp?v=1714720761"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ce9144ed1876a7be4849bfd744df0c0f8db380b_05889f87-53b7-4ffc-9cbd-37e6613037dc.webp?v=1714720739","options":["color"],"media":[{"alt":null,"id":23877076025443,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ce9144ed1876a7be4849bfd744df0c0f8db380b_05889f87-53b7-4ffc-9cbd-37e6613037dc.webp?v=1714720739"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ce9144ed1876a7be4849bfd744df0c0f8db380b_05889f87-53b7-4ffc-9cbd-37e6613037dc.webp?v=1714720739","width":2000},{"alt":null,"id":23877076451427,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b5c8f1ada50272fac4f282598169aacd502caa6_8247c1a7-9e78-4809-b31e-a0c8abd82c43.webp?v=1714720741"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b5c8f1ada50272fac4f282598169aacd502caa6_8247c1a7-9e78-4809-b31e-a0c8abd82c43.webp?v=1714720741","width":2000},{"alt":null,"id":23877077500003,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2bd8cb86aa5b785787e8217e094d5e072f65417_d78e8c0d-b611-43c4-ac12-4ef35ecbc149.webp?v=1714720743"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2bd8cb86aa5b785787e8217e094d5e072f65417_d78e8c0d-b611-43c4-ac12-4ef35ecbc149.webp?v=1714720743","width":2000},{"alt":null,"id":23877078024291,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/018e62f2cf6476b23bffae9c3cc69c5d4784f19c_8fbff1f1-3731-4d32-9f85-e3c78027a58f.webp?v=1714720746"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/018e62f2cf6476b23bffae9c3cc69c5d4784f19c_8fbff1f1-3731-4d32-9f85-e3c78027a58f.webp?v=1714720746","width":2000},{"alt":null,"id":23877078581347,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c643d59d3af85e5068b0161b8fcd809191735bc5_9666073c-0587-4bfc-820e-d85957cc0346.webp?v=1714720748"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c643d59d3af85e5068b0161b8fcd809191735bc5_9666073c-0587-4bfc-820e-d85957cc0346.webp?v=1714720748","width":2000},{"alt":null,"id":23877079433315,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a391a652e2b50e40001d7654d43d7aff284012df_b136069e-5f48-41d8-b1d3-e4d7875f4c24.webp?v=1714720750"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a391a652e2b50e40001d7654d43d7aff284012df_b136069e-5f48-41d8-b1d3-e4d7875f4c24.webp?v=1714720750","width":2000},{"alt":null,"id":23877079892067,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4057fce979b82334dbb1015d7ee69d2d85fdca3d_518cdf35-d070-4fda-a0d4-925d721b8a4b.webp?v=1714720752"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4057fce979b82334dbb1015d7ee69d2d85fdca3d_518cdf35-d070-4fda-a0d4-925d721b8a4b.webp?v=1714720752","width":2000},{"alt":null,"id":23877080449123,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c8a156cb277e79255ab92abce64889e8c89c861f_7f35f9b8-3500-4932-823b-89c5b477f4fa.webp?v=1714720754"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c8a156cb277e79255ab92abce64889e8c89c861f_7f35f9b8-3500-4932-823b-89c5b477f4fa.webp?v=1714720754","width":2000},{"alt":null,"id":23877080842339,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a6e2bdd5bd369c4232194779e8f48a6d0fd908e5_78af26db-5077-45d0-bb87-9ba8d98b1d89.webp?v=1714720757"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a6e2bdd5bd369c4232194779e8f48a6d0fd908e5_78af26db-5077-45d0-bb87-9ba8d98b1d89.webp?v=1714720757","width":2000},{"alt":null,"id":23877081268323,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c0d4301209e0a9bafb1af52c5ba599b6608c624_f2caefcf-76b0-4312-9fa0-37af89067192.webp?v=1714720759"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c0d4301209e0a9bafb1af52c5ba599b6608c624_f2caefcf-76b0-4312-9fa0-37af89067192.webp?v=1714720759","width":2000},{"alt":null,"id":23877081628771,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/610a0f74f978faec1bc0f2cb62ad8ac2226aa9d8_ed483b9f-0d2d-4bed-80f2-e453e1c17f6a.webp?v=1714720761"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/610a0f74f978faec1bc0f2cb62ad8ac2226aa9d8_ed483b9f-0d2d-4bed-80f2-e453e1c17f6a.webp?v=1714720761","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41885044899939,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB52","requires_shipping":true,"taxable":true,"featured_image":{"id":31472165617763,"product_id":7408399319139,"position":10,"created_at":"2024-05-03T15:19:19+08:00","updated_at":"2024-05-03T15:19:19+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c0d4301209e0a9bafb1af52c5ba599b6608c624_f2caefcf-76b0-4312-9fa0-37af89067192.webp?v=1714720759","variant_ids":[41885044899939]},"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-PB52","featured_media":{"alt":null,"id":23877081268323,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c0d4301209e0a9bafb1af52c5ba599b6608c624_f2caefcf-76b0-4312-9fa0-37af89067192.webp?v=1714720759"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41885044899939,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB52","requires_shipping":true,"taxable":true,"featured_image":{"id":31472165617763,"product_id":7408399319139,"position":10,"created_at":"2024-05-03T15:19:19+08:00","updated_at":"2024-05-03T15:19:19+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c0d4301209e0a9bafb1af52c5ba599b6608c624_f2caefcf-76b0-4312-9fa0-37af89067192.webp?v=1714720759","variant_ids":[41885044899939]},"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-PB52","featured_media":{"alt":null,"id":23877081268323,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c0d4301209e0a9bafb1af52c5ba599b6608c624_f2caefcf-76b0-4312-9fa0-37af89067192.webp?v=1714720759"}},"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: "停產" }