$product = {"id":7408517447779,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - K2SO 1-俠盜一號","handle":"iphone-12-mini-mod-nx-printable-pb68","description":null,"published_at":"2024-06-11T16:39:28+08:00","created_at":"2024-05-03T15:42:13+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":41886386978915,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB68","requires_shipping":true,"taxable":true,"featured_image":{"id":31472480813155,"product_id":7408517447779,"position":3,"created_at":"2024-05-03T15:42:20+08:00","updated_at":"2024-05-03T15:42:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2cc408e257497b450abd942b2d49a0539ca476d_7bc52b68-3736-4aa3-95f3-14316c38e269.webp?v=1714722140","variant_ids":[41886386978915]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - K2SO 1-俠盜一號 - 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-PB68","featured_media":{"alt":null,"id":23877398003811,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2cc408e257497b450abd942b2d49a0539ca476d_7bc52b68-3736-4aa3-95f3-14316c38e269.webp?v=1714722140"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcdac44a28424f1891ac71cf1075bdae41dbf05e_e0160b7b-f1c3-4fd1-afd4-b80f1a0f9bbd.webp?v=1714722136","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/248ab85f6684483cf545660a4af269464e7d3102_46f386a9-46a4-44d4-9a56-083b0b3567d3.webp?v=1714722138","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2cc408e257497b450abd942b2d49a0539ca476d_7bc52b68-3736-4aa3-95f3-14316c38e269.webp?v=1714722140","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fab4485867c08ccd1f7305e9b3088de04af1fd99_2ecc3597-2c8b-4fdc-86c7-efa5412ae3c2.webp?v=1714722142","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a403c8f35dceca49352820829fa875155c68c84d_e4566da7-b0a8-49c9-b878-f69b50c5f88d.webp?v=1714722145","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c648bbdcd1ac6a5b5b00da2fc85fcb32913d430_f6190cc4-21d1-418e-9f6b-c794852c0df1.webp?v=1714722147","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/16c04dafb21813ea212516868b1d81c53557337f_d0216280-7433-48ed-a648-bd8b38a6de83.webp?v=1714722150","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01c5f765cbbd2d54ebf120a883241968d340d5ee_bb0a25a8-7c4e-4591-9c6a-239d57d4a684.webp?v=1714722152","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf73b8cde72f47d86bc166f53b3b9f7f37b004c2_2136b7e3-d8e7-4628-9b0d-de3c15345898.webp?v=1714722154","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b58ff0f534eac67ebefb34249040dbd392582ffc_f4949547-8502-4d85-8296-2c095150bf85.webp?v=1714722157","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c47059ab72b7d51cfba9cfc784acde4c2c367d78_0dfd43be-8560-4a3f-909e-b15bf1779c48.webp?v=1714722159"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcdac44a28424f1891ac71cf1075bdae41dbf05e_e0160b7b-f1c3-4fd1-afd4-b80f1a0f9bbd.webp?v=1714722136","options":["color"],"media":[{"alt":null,"id":23877396955235,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcdac44a28424f1891ac71cf1075bdae41dbf05e_e0160b7b-f1c3-4fd1-afd4-b80f1a0f9bbd.webp?v=1714722136"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcdac44a28424f1891ac71cf1075bdae41dbf05e_e0160b7b-f1c3-4fd1-afd4-b80f1a0f9bbd.webp?v=1714722136","width":2000},{"alt":null,"id":23877397577827,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/248ab85f6684483cf545660a4af269464e7d3102_46f386a9-46a4-44d4-9a56-083b0b3567d3.webp?v=1714722138"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/248ab85f6684483cf545660a4af269464e7d3102_46f386a9-46a4-44d4-9a56-083b0b3567d3.webp?v=1714722138","width":2000},{"alt":null,"id":23877398003811,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2cc408e257497b450abd942b2d49a0539ca476d_7bc52b68-3736-4aa3-95f3-14316c38e269.webp?v=1714722140"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2cc408e257497b450abd942b2d49a0539ca476d_7bc52b68-3736-4aa3-95f3-14316c38e269.webp?v=1714722140","width":2000},{"alt":null,"id":23877398593635,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fab4485867c08ccd1f7305e9b3088de04af1fd99_2ecc3597-2c8b-4fdc-86c7-efa5412ae3c2.webp?v=1714722142"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fab4485867c08ccd1f7305e9b3088de04af1fd99_2ecc3597-2c8b-4fdc-86c7-efa5412ae3c2.webp?v=1714722142","width":2000},{"alt":null,"id":23877399085155,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a403c8f35dceca49352820829fa875155c68c84d_e4566da7-b0a8-49c9-b878-f69b50c5f88d.webp?v=1714722145"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a403c8f35dceca49352820829fa875155c68c84d_e4566da7-b0a8-49c9-b878-f69b50c5f88d.webp?v=1714722145","width":2000},{"alt":null,"id":23877399806051,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c648bbdcd1ac6a5b5b00da2fc85fcb32913d430_f6190cc4-21d1-418e-9f6b-c794852c0df1.webp?v=1714722147"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c648bbdcd1ac6a5b5b00da2fc85fcb32913d430_f6190cc4-21d1-418e-9f6b-c794852c0df1.webp?v=1714722147","width":2000},{"alt":null,"id":23877400199267,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/16c04dafb21813ea212516868b1d81c53557337f_d0216280-7433-48ed-a648-bd8b38a6de83.webp?v=1714722150"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/16c04dafb21813ea212516868b1d81c53557337f_d0216280-7433-48ed-a648-bd8b38a6de83.webp?v=1714722150","width":2000},{"alt":null,"id":23877400690787,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01c5f765cbbd2d54ebf120a883241968d340d5ee_bb0a25a8-7c4e-4591-9c6a-239d57d4a684.webp?v=1714722152"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01c5f765cbbd2d54ebf120a883241968d340d5ee_bb0a25a8-7c4e-4591-9c6a-239d57d4a684.webp?v=1714722152","width":2000},{"alt":null,"id":23877401182307,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf73b8cde72f47d86bc166f53b3b9f7f37b004c2_2136b7e3-d8e7-4628-9b0d-de3c15345898.webp?v=1714722154"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf73b8cde72f47d86bc166f53b3b9f7f37b004c2_2136b7e3-d8e7-4628-9b0d-de3c15345898.webp?v=1714722154","width":2000},{"alt":null,"id":23877401641059,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b58ff0f534eac67ebefb34249040dbd392582ffc_f4949547-8502-4d85-8296-2c095150bf85.webp?v=1714722157"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b58ff0f534eac67ebefb34249040dbd392582ffc_f4949547-8502-4d85-8296-2c095150bf85.webp?v=1714722157","width":2000},{"alt":null,"id":23877401903203,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c47059ab72b7d51cfba9cfc784acde4c2c367d78_0dfd43be-8560-4a3f-909e-b15bf1779c48.webp?v=1714722159"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c47059ab72b7d51cfba9cfc784acde4c2c367d78_0dfd43be-8560-4a3f-909e-b15bf1779c48.webp?v=1714722159","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41886386978915,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB68","requires_shipping":true,"taxable":true,"featured_image":{"id":31472480813155,"product_id":7408517447779,"position":3,"created_at":"2024-05-03T15:42:20+08:00","updated_at":"2024-05-03T15:42:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2cc408e257497b450abd942b2d49a0539ca476d_7bc52b68-3736-4aa3-95f3-14316c38e269.webp?v=1714722140","variant_ids":[41886386978915]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - K2SO 1-俠盜一號 - 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-PB68","featured_media":{"alt":null,"id":23877398003811,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2cc408e257497b450abd942b2d49a0539ca476d_7bc52b68-3736-4aa3-95f3-14316c38e269.webp?v=1714722140"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41886386978915,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB68","requires_shipping":true,"taxable":true,"featured_image":{"id":31472480813155,"product_id":7408517447779,"position":3,"created_at":"2024-05-03T15:42:20+08:00","updated_at":"2024-05-03T15:42:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2cc408e257497b450abd942b2d49a0539ca476d_7bc52b68-3736-4aa3-95f3-14316c38e269.webp?v=1714722140","variant_ids":[41886386978915]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - K2SO 1-俠盜一號 - 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-PB68","featured_media":{"alt":null,"id":23877398003811,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2cc408e257497b450abd942b2d49a0539ca476d_7bc52b68-3736-4aa3-95f3-14316c38e269.webp?v=1714722140"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null var sellingStatus if ($bumper) { $(document).ready(function() { var productImg = $product.images[0] var bumperVariants = $bumper.variants; var bumperColors = new Object(); var currentVariant = ''; var productType = ''; bumperVariants.forEach(variant => { bumperColors[`${variant.title.split(' (')[0].toLowerCase()}`] = variant.featured_image.src; }); if (productType === 'mod-nx-backplate' || productType === 'mod-backplate') { mergeImages( [productImg, bumperColors[currentVariant]], { crossOrigin: 'anonymous' } ).then(mergedImg => { $('.merged-img').attr('src', mergedImg); }); } else { mergeImages( [bumperColors[currentVariant], productImg], { crossOrigin: 'anonymous' } ).then(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: "停產" }