$product = {"id":7408447422563,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Pixel Jeff 皮傑 - Lollipop","handle":"iphone-12-mini-mod-nx-printable-hq04","description":null,"published_at":"2024-06-11T16:37:29+08:00","created_at":"2024-05-03T15:28:17+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Pixel Jeff 皮傑","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-pixeljeff","device-iPhone 12 mini","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-pixeljeff","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":41885585113187,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-HQ04","requires_shipping":true,"taxable":true,"featured_image":{"id":31472304324707,"product_id":7408447422563,"position":7,"created_at":"2024-05-03T15:28:34+08:00","updated_at":"2024-05-03T15:28:34+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ae77462dcc40a6b06a492ae7cf12a6a152ac18e_7b3f4fd8-658d-4193-8a5e-2f9eb59b54b4.webp?v=1714721314","variant_ids":[41885585113187]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Pixel Jeff 皮傑 - Lollipop - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-HQ04","featured_media":{"alt":null,"id":23877220696163,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ae77462dcc40a6b06a492ae7cf12a6a152ac18e_7b3f4fd8-658d-4193-8a5e-2f9eb59b54b4.webp?v=1714721314"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6d2bd9970e4f28fbc4469551b019d1e5d9e408f_86db92fa-c105-470c-b622-7dc24ed73784.webp?v=1714721300","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e56577a66e9c6ea7fb825e362fa14890cd32d4d1_f6412cea-34d7-41af-96c7-a093ef93816f.webp?v=1714721302","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22b061c2d20659dcb6ff0657cf1b930f7c0a8532_c56b9824-6548-4c27-bb34-5a437986d550.webp?v=1714721304","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63219628f9d0eb71ac9d26ad8db1f88bc12074c1_c244ffba-bbce-47c7-ab20-bcc25a44a1e2.webp?v=1714721307","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b59414791f5ec54720a1a4cfb5c58bfcddaefdf_85d8bc89-c62f-46f8-b8f6-6b66ef0c4867.webp?v=1714721309","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1b5a562fddc272a743bcc2152f99d8e80ca6f57_b4a7d803-b718-417b-a5f7-81fb1f7970c8.webp?v=1714721312","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ae77462dcc40a6b06a492ae7cf12a6a152ac18e_7b3f4fd8-658d-4193-8a5e-2f9eb59b54b4.webp?v=1714721314","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a1253f1d27a095d6fda21f44648f1b08efda118_1d0198df-8e2f-4c5c-b51d-f7368bcbb7f4.webp?v=1714721317","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca5e03eb21a399f4d39f3dec47e3f9a904b3e303_c4d05560-9468-4240-9481-bf0f5da2c1fc.webp?v=1714721319","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7cab1f7bb61cfada0c3758b3a9f7360b9d37b8f8_91edac83-8acc-44a5-9649-cc34c5f22433.webp?v=1714721321","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c7096686076930a28395a113885baf14d4c6b1e1_c5a6a46e-8c49-4c0e-b5bb-6c841f425694.webp?v=1714721324"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6d2bd9970e4f28fbc4469551b019d1e5d9e408f_86db92fa-c105-470c-b622-7dc24ed73784.webp?v=1714721300","options":["color"],"media":[{"alt":null,"id":23877218009187,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6d2bd9970e4f28fbc4469551b019d1e5d9e408f_86db92fa-c105-470c-b622-7dc24ed73784.webp?v=1714721300"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6d2bd9970e4f28fbc4469551b019d1e5d9e408f_86db92fa-c105-470c-b622-7dc24ed73784.webp?v=1714721300","width":2000},{"alt":null,"id":23877218500707,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e56577a66e9c6ea7fb825e362fa14890cd32d4d1_f6412cea-34d7-41af-96c7-a093ef93816f.webp?v=1714721302"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e56577a66e9c6ea7fb825e362fa14890cd32d4d1_f6412cea-34d7-41af-96c7-a093ef93816f.webp?v=1714721302","width":2000},{"alt":null,"id":23877219024995,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22b061c2d20659dcb6ff0657cf1b930f7c0a8532_c56b9824-6548-4c27-bb34-5a437986d550.webp?v=1714721304"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22b061c2d20659dcb6ff0657cf1b930f7c0a8532_c56b9824-6548-4c27-bb34-5a437986d550.webp?v=1714721304","width":2000},{"alt":null,"id":23877219418211,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63219628f9d0eb71ac9d26ad8db1f88bc12074c1_c244ffba-bbce-47c7-ab20-bcc25a44a1e2.webp?v=1714721307"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63219628f9d0eb71ac9d26ad8db1f88bc12074c1_c244ffba-bbce-47c7-ab20-bcc25a44a1e2.webp?v=1714721307","width":2000},{"alt":null,"id":23877219844195,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b59414791f5ec54720a1a4cfb5c58bfcddaefdf_85d8bc89-c62f-46f8-b8f6-6b66ef0c4867.webp?v=1714721309"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b59414791f5ec54720a1a4cfb5c58bfcddaefdf_85d8bc89-c62f-46f8-b8f6-6b66ef0c4867.webp?v=1714721309","width":2000},{"alt":null,"id":23877220302947,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1b5a562fddc272a743bcc2152f99d8e80ca6f57_b4a7d803-b718-417b-a5f7-81fb1f7970c8.webp?v=1714721312"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1b5a562fddc272a743bcc2152f99d8e80ca6f57_b4a7d803-b718-417b-a5f7-81fb1f7970c8.webp?v=1714721312","width":2000},{"alt":null,"id":23877220696163,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ae77462dcc40a6b06a492ae7cf12a6a152ac18e_7b3f4fd8-658d-4193-8a5e-2f9eb59b54b4.webp?v=1714721314"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ae77462dcc40a6b06a492ae7cf12a6a152ac18e_7b3f4fd8-658d-4193-8a5e-2f9eb59b54b4.webp?v=1714721314","width":2000},{"alt":null,"id":23877221122147,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a1253f1d27a095d6fda21f44648f1b08efda118_1d0198df-8e2f-4c5c-b51d-f7368bcbb7f4.webp?v=1714721317"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a1253f1d27a095d6fda21f44648f1b08efda118_1d0198df-8e2f-4c5c-b51d-f7368bcbb7f4.webp?v=1714721317","width":2000},{"alt":null,"id":23877221580899,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca5e03eb21a399f4d39f3dec47e3f9a904b3e303_c4d05560-9468-4240-9481-bf0f5da2c1fc.webp?v=1714721319"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca5e03eb21a399f4d39f3dec47e3f9a904b3e303_c4d05560-9468-4240-9481-bf0f5da2c1fc.webp?v=1714721319","width":2000},{"alt":null,"id":23877222137955,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7cab1f7bb61cfada0c3758b3a9f7360b9d37b8f8_91edac83-8acc-44a5-9649-cc34c5f22433.webp?v=1714721321"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7cab1f7bb61cfada0c3758b3a9f7360b9d37b8f8_91edac83-8acc-44a5-9649-cc34c5f22433.webp?v=1714721321","width":2000},{"alt":null,"id":23877222596707,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c7096686076930a28395a113885baf14d4c6b1e1_c5a6a46e-8c49-4c0e-b5bb-6c841f425694.webp?v=1714721324"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c7096686076930a28395a113885baf14d4c6b1e1_c5a6a46e-8c49-4c0e-b5bb-6c841f425694.webp?v=1714721324","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41885585113187,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-HQ04","requires_shipping":true,"taxable":true,"featured_image":{"id":31472304324707,"product_id":7408447422563,"position":7,"created_at":"2024-05-03T15:28:34+08:00","updated_at":"2024-05-03T15:28:34+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ae77462dcc40a6b06a492ae7cf12a6a152ac18e_7b3f4fd8-658d-4193-8a5e-2f9eb59b54b4.webp?v=1714721314","variant_ids":[41885585113187]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Pixel Jeff 皮傑 - Lollipop - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-HQ04","featured_media":{"alt":null,"id":23877220696163,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ae77462dcc40a6b06a492ae7cf12a6a152ac18e_7b3f4fd8-658d-4193-8a5e-2f9eb59b54b4.webp?v=1714721314"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41885585113187,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-HQ04","requires_shipping":true,"taxable":true,"featured_image":{"id":31472304324707,"product_id":7408447422563,"position":7,"created_at":"2024-05-03T15:28:34+08:00","updated_at":"2024-05-03T15:28:34+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ae77462dcc40a6b06a492ae7cf12a6a152ac18e_7b3f4fd8-658d-4193-8a5e-2f9eb59b54b4.webp?v=1714721314","variant_ids":[41885585113187]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Pixel Jeff 皮傑 - Lollipop - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-HQ04","featured_media":{"alt":null,"id":23877220696163,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ae77462dcc40a6b06a492ae7cf12a6a152ac18e_7b3f4fd8-658d-4193-8a5e-2f9eb59b54b4.webp?v=1714721314"}},"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: "停產" }