$product = {"id":7408441491555,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 賈霸-塗鴉藝術","handle":"iphone-12-mini-mod-nx-printable-pb41","description":null,"published_at":"2024-06-11T16:37:18+08:00","created_at":"2024-05-03T15:27:07+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":41885515055203,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB41","requires_shipping":true,"taxable":true,"featured_image":{"id":31472288858211,"product_id":7408441491555,"position":3,"created_at":"2024-05-03T15:27:14+08:00","updated_at":"2024-05-03T15:27:14+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01e1c63e108aba72d7dbf744addbdd16c7a68e7d_5bc1f7af-84a6-49df-a2d4-35b9092f415b.webp?v=1714721234","variant_ids":[41885515055203]},"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-PB41","featured_media":{"alt":null,"id":23877205196899,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01e1c63e108aba72d7dbf744addbdd16c7a68e7d_5bc1f7af-84a6-49df-a2d4-35b9092f415b.webp?v=1714721234"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44e5d780a56c37f4e6b09f43aa3384d82cfc10fe_fb85a0e6-b84c-466f-920b-fa873dcaf624.webp?v=1714721230","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e652ba868ef0f54b657e8a2c2a6794bd1f144af_d74a6547-9b5c-43f4-894a-5bd5ce596428.webp?v=1714721232","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01e1c63e108aba72d7dbf744addbdd16c7a68e7d_5bc1f7af-84a6-49df-a2d4-35b9092f415b.webp?v=1714721234","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c77c10307d9f8633f184ebf116518afd1c1cb6a_9a008dc0-bafd-48a3-9d4e-09c3bfbcfaa0.webp?v=1714721237","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a55f2dfc8cbdd97a349a8c91f1bf7e0f19327250_b071044b-fcd2-4514-a772-dfb11200fc18.webp?v=1714721239","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d709b50f0f0fbc0d78605aeed5e82c958acf9ea_b2504755-4707-46e1-a625-2a446ce7f449.webp?v=1714721241","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/27faccc5d1311ebd1ace344d9750f8bc3c599af7_dcf2e3f5-0063-48f6-946e-f3247b11d717.webp?v=1714721243","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a9f91827298774abd69cd611a02db3db6ac0d2d7_f07d7533-0247-42ca-871c-f82553a64afb.webp?v=1714721245","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ef98f4cb37aa6d5c8137190429fb4c55eeba1bc_be8bf33b-e393-45c5-9095-4e54d2d9afe2.webp?v=1714721248","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/15c65643beaa5bb96d11a7488902fdfe482e5395_3e888171-0352-44d7-886c-9bb1437f66ba.webp?v=1714721250","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4d3032c4b1bcbc0ceb3ca12c60ff8c66846247e_67b9d475-5f04-4e21-8a98-ab7b76569b13.webp?v=1714721252"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44e5d780a56c37f4e6b09f43aa3384d82cfc10fe_fb85a0e6-b84c-466f-920b-fa873dcaf624.webp?v=1714721230","options":["color"],"media":[{"alt":null,"id":23877204017251,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44e5d780a56c37f4e6b09f43aa3384d82cfc10fe_fb85a0e6-b84c-466f-920b-fa873dcaf624.webp?v=1714721230"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44e5d780a56c37f4e6b09f43aa3384d82cfc10fe_fb85a0e6-b84c-466f-920b-fa873dcaf624.webp?v=1714721230","width":2000},{"alt":null,"id":23877204639843,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e652ba868ef0f54b657e8a2c2a6794bd1f144af_d74a6547-9b5c-43f4-894a-5bd5ce596428.webp?v=1714721232"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e652ba868ef0f54b657e8a2c2a6794bd1f144af_d74a6547-9b5c-43f4-894a-5bd5ce596428.webp?v=1714721232","width":2000},{"alt":null,"id":23877205196899,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01e1c63e108aba72d7dbf744addbdd16c7a68e7d_5bc1f7af-84a6-49df-a2d4-35b9092f415b.webp?v=1714721234"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01e1c63e108aba72d7dbf744addbdd16c7a68e7d_5bc1f7af-84a6-49df-a2d4-35b9092f415b.webp?v=1714721234","width":2000},{"alt":null,"id":23877205557347,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c77c10307d9f8633f184ebf116518afd1c1cb6a_9a008dc0-bafd-48a3-9d4e-09c3bfbcfaa0.webp?v=1714721237"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c77c10307d9f8633f184ebf116518afd1c1cb6a_9a008dc0-bafd-48a3-9d4e-09c3bfbcfaa0.webp?v=1714721237","width":2000},{"alt":null,"id":23877205917795,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a55f2dfc8cbdd97a349a8c91f1bf7e0f19327250_b071044b-fcd2-4514-a772-dfb11200fc18.webp?v=1714721239"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a55f2dfc8cbdd97a349a8c91f1bf7e0f19327250_b071044b-fcd2-4514-a772-dfb11200fc18.webp?v=1714721239","width":2000},{"alt":null,"id":23877206311011,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d709b50f0f0fbc0d78605aeed5e82c958acf9ea_b2504755-4707-46e1-a625-2a446ce7f449.webp?v=1714721241"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d709b50f0f0fbc0d78605aeed5e82c958acf9ea_b2504755-4707-46e1-a625-2a446ce7f449.webp?v=1714721241","width":2000},{"alt":null,"id":23877206736995,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/27faccc5d1311ebd1ace344d9750f8bc3c599af7_dcf2e3f5-0063-48f6-946e-f3247b11d717.webp?v=1714721243"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/27faccc5d1311ebd1ace344d9750f8bc3c599af7_dcf2e3f5-0063-48f6-946e-f3247b11d717.webp?v=1714721243","width":2000},{"alt":null,"id":23877207261283,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a9f91827298774abd69cd611a02db3db6ac0d2d7_f07d7533-0247-42ca-871c-f82553a64afb.webp?v=1714721245"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a9f91827298774abd69cd611a02db3db6ac0d2d7_f07d7533-0247-42ca-871c-f82553a64afb.webp?v=1714721245","width":2000},{"alt":null,"id":23877207523427,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ef98f4cb37aa6d5c8137190429fb4c55eeba1bc_be8bf33b-e393-45c5-9095-4e54d2d9afe2.webp?v=1714721248"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ef98f4cb37aa6d5c8137190429fb4c55eeba1bc_be8bf33b-e393-45c5-9095-4e54d2d9afe2.webp?v=1714721248","width":2000},{"alt":null,"id":23877207982179,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/15c65643beaa5bb96d11a7488902fdfe482e5395_3e888171-0352-44d7-886c-9bb1437f66ba.webp?v=1714721250"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/15c65643beaa5bb96d11a7488902fdfe482e5395_3e888171-0352-44d7-886c-9bb1437f66ba.webp?v=1714721250","width":2000},{"alt":null,"id":23877208440931,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4d3032c4b1bcbc0ceb3ca12c60ff8c66846247e_67b9d475-5f04-4e21-8a98-ab7b76569b13.webp?v=1714721252"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4d3032c4b1bcbc0ceb3ca12c60ff8c66846247e_67b9d475-5f04-4e21-8a98-ab7b76569b13.webp?v=1714721252","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41885515055203,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB41","requires_shipping":true,"taxable":true,"featured_image":{"id":31472288858211,"product_id":7408441491555,"position":3,"created_at":"2024-05-03T15:27:14+08:00","updated_at":"2024-05-03T15:27:14+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01e1c63e108aba72d7dbf744addbdd16c7a68e7d_5bc1f7af-84a6-49df-a2d4-35b9092f415b.webp?v=1714721234","variant_ids":[41885515055203]},"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-PB41","featured_media":{"alt":null,"id":23877205196899,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01e1c63e108aba72d7dbf744addbdd16c7a68e7d_5bc1f7af-84a6-49df-a2d4-35b9092f415b.webp?v=1714721234"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41885515055203,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB41","requires_shipping":true,"taxable":true,"featured_image":{"id":31472288858211,"product_id":7408441491555,"position":3,"created_at":"2024-05-03T15:27:14+08:00","updated_at":"2024-05-03T15:27:14+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01e1c63e108aba72d7dbf744addbdd16c7a68e7d_5bc1f7af-84a6-49df-a2d4-35b9092f415b.webp?v=1714721234","variant_ids":[41885515055203]},"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-PB41","featured_media":{"alt":null,"id":23877205196899,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01e1c63e108aba72d7dbf744addbdd16c7a68e7d_5bc1f7af-84a6-49df-a2d4-35b9092f415b.webp?v=1714721234"}},"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: "停產" }