$product = {"id":7408444899427,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 1G - 在幹嘛","handle":"iphone-12-mini-mod-nx-printable-iv06","description":null,"published_at":"2024-06-11T16:37:24+08:00","created_at":"2024-05-03T15:27:44+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-1G","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-1chun","device-iPhone 12 mini","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-1chun","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":41885551394915,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-IV06","requires_shipping":true,"taxable":true,"featured_image":{"id":31472296656995,"product_id":7408444899427,"position":5,"created_at":"2024-05-03T15:27:56+08:00","updated_at":"2024-05-03T15:27:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e1eab48fab56214e7cf411ced55e10166b84afa_ba138759-4277-4a1c-8b0d-3e8b2e68d7f9.webp?v=1714721276","variant_ids":[41885551394915]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 1G - 在幹嘛 - 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-IV06","featured_media":{"alt":null,"id":23877212995683,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e1eab48fab56214e7cf411ced55e10166b84afa_ba138759-4277-4a1c-8b0d-3e8b2e68d7f9.webp?v=1714721276"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14b9f9f8dc8d20865e8f2903d1314070664a9ccd_e4e26048-82c3-403f-a063-dc27dc1f91b1.webp?v=1714721267","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b79cdfd86162aacdc1a8d35b87cb59852d6a161_328e8bdb-0b20-4a3d-be90-af99d77b10b7.webp?v=1714721269","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c5607e2b632ae80dec80d1da7dc11658b99869b_713c00a9-1c1f-4b46-b838-3d7759fc251c.webp?v=1714721272","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a9da1c1432b66b853e30e75b29d00159f606742_d86d6293-568b-44f6-81d0-b51dfc60a01a.webp?v=1714721274","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e1eab48fab56214e7cf411ced55e10166b84afa_ba138759-4277-4a1c-8b0d-3e8b2e68d7f9.webp?v=1714721276","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc6e870d9b0ce5e6c7eb47f0eecb45ce4df0dea6_f315b9e8-44ed-4243-b26a-e809009859a7.webp?v=1714721279","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00192f2bcfe1aec5d4fc899b19a203096cdd6d8b_5f169dbc-bb67-4d93-8a40-1035cdbcffe5.webp?v=1714721281","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfc63033583a87e76a0634acad53691888eef289_46740831-fe67-4b76-bc80-14550eb790fc.webp?v=1714721283","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57735911669878665edec0e2861dbda74ee824fb_3154496a-c95c-4d4a-a037-50867fcbb9b8.webp?v=1714721286","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e79b9ed70dc772fa3993ec40c3bb21894c742bc9_2839681b-f0e5-40b5-b697-9b299218bba8.webp?v=1714721288","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/274f479c28e354ba89bb71198b56feb1edd0ca30_93881cde-a779-469c-a970-70b29eff544f.webp?v=1714721290"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14b9f9f8dc8d20865e8f2903d1314070664a9ccd_e4e26048-82c3-403f-a063-dc27dc1f91b1.webp?v=1714721267","options":["color"],"media":[{"alt":null,"id":23877211062371,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14b9f9f8dc8d20865e8f2903d1314070664a9ccd_e4e26048-82c3-403f-a063-dc27dc1f91b1.webp?v=1714721267"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14b9f9f8dc8d20865e8f2903d1314070664a9ccd_e4e26048-82c3-403f-a063-dc27dc1f91b1.webp?v=1714721267","width":2000},{"alt":null,"id":23877211521123,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b79cdfd86162aacdc1a8d35b87cb59852d6a161_328e8bdb-0b20-4a3d-be90-af99d77b10b7.webp?v=1714721269"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b79cdfd86162aacdc1a8d35b87cb59852d6a161_328e8bdb-0b20-4a3d-be90-af99d77b10b7.webp?v=1714721269","width":2000},{"alt":null,"id":23877212078179,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c5607e2b632ae80dec80d1da7dc11658b99869b_713c00a9-1c1f-4b46-b838-3d7759fc251c.webp?v=1714721272"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c5607e2b632ae80dec80d1da7dc11658b99869b_713c00a9-1c1f-4b46-b838-3d7759fc251c.webp?v=1714721272","width":2000},{"alt":null,"id":23877212569699,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a9da1c1432b66b853e30e75b29d00159f606742_d86d6293-568b-44f6-81d0-b51dfc60a01a.webp?v=1714721274"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a9da1c1432b66b853e30e75b29d00159f606742_d86d6293-568b-44f6-81d0-b51dfc60a01a.webp?v=1714721274","width":2000},{"alt":null,"id":23877212995683,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e1eab48fab56214e7cf411ced55e10166b84afa_ba138759-4277-4a1c-8b0d-3e8b2e68d7f9.webp?v=1714721276"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e1eab48fab56214e7cf411ced55e10166b84afa_ba138759-4277-4a1c-8b0d-3e8b2e68d7f9.webp?v=1714721276","width":2000},{"alt":null,"id":23877213487203,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc6e870d9b0ce5e6c7eb47f0eecb45ce4df0dea6_f315b9e8-44ed-4243-b26a-e809009859a7.webp?v=1714721279"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc6e870d9b0ce5e6c7eb47f0eecb45ce4df0dea6_f315b9e8-44ed-4243-b26a-e809009859a7.webp?v=1714721279","width":2000},{"alt":null,"id":23877213945955,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00192f2bcfe1aec5d4fc899b19a203096cdd6d8b_5f169dbc-bb67-4d93-8a40-1035cdbcffe5.webp?v=1714721281"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00192f2bcfe1aec5d4fc899b19a203096cdd6d8b_5f169dbc-bb67-4d93-8a40-1035cdbcffe5.webp?v=1714721281","width":2000},{"alt":null,"id":23877214437475,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfc63033583a87e76a0634acad53691888eef289_46740831-fe67-4b76-bc80-14550eb790fc.webp?v=1714721283"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfc63033583a87e76a0634acad53691888eef289_46740831-fe67-4b76-bc80-14550eb790fc.webp?v=1714721283","width":2000},{"alt":null,"id":23877214961763,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57735911669878665edec0e2861dbda74ee824fb_3154496a-c95c-4d4a-a037-50867fcbb9b8.webp?v=1714721286"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57735911669878665edec0e2861dbda74ee824fb_3154496a-c95c-4d4a-a037-50867fcbb9b8.webp?v=1714721286","width":2000},{"alt":null,"id":23877215551587,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e79b9ed70dc772fa3993ec40c3bb21894c742bc9_2839681b-f0e5-40b5-b697-9b299218bba8.webp?v=1714721288"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e79b9ed70dc772fa3993ec40c3bb21894c742bc9_2839681b-f0e5-40b5-b697-9b299218bba8.webp?v=1714721288","width":2000},{"alt":null,"id":23877216043107,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/274f479c28e354ba89bb71198b56feb1edd0ca30_93881cde-a779-469c-a970-70b29eff544f.webp?v=1714721290"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/274f479c28e354ba89bb71198b56feb1edd0ca30_93881cde-a779-469c-a970-70b29eff544f.webp?v=1714721290","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41885551394915,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-IV06","requires_shipping":true,"taxable":true,"featured_image":{"id":31472296656995,"product_id":7408444899427,"position":5,"created_at":"2024-05-03T15:27:56+08:00","updated_at":"2024-05-03T15:27:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e1eab48fab56214e7cf411ced55e10166b84afa_ba138759-4277-4a1c-8b0d-3e8b2e68d7f9.webp?v=1714721276","variant_ids":[41885551394915]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 1G - 在幹嘛 - 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-IV06","featured_media":{"alt":null,"id":23877212995683,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e1eab48fab56214e7cf411ced55e10166b84afa_ba138759-4277-4a1c-8b0d-3e8b2e68d7f9.webp?v=1714721276"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41885551394915,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-IV06","requires_shipping":true,"taxable":true,"featured_image":{"id":31472296656995,"product_id":7408444899427,"position":5,"created_at":"2024-05-03T15:27:56+08:00","updated_at":"2024-05-03T15:27:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e1eab48fab56214e7cf411ced55e10166b84afa_ba138759-4277-4a1c-8b0d-3e8b2e68d7f9.webp?v=1714721276","variant_ids":[41885551394915]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 1G - 在幹嘛 - 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-IV06","featured_media":{"alt":null,"id":23877212995683,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e1eab48fab56214e7cf411ced55e10166b84afa_ba138759-4277-4a1c-8b0d-3e8b2e68d7f9.webp?v=1714721276"}},"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: "停產" }