$product = {"id":7416337039459,"title":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - Batman - 蝙蝠俠出任務","handle":"iphone-8-mod-nx-printable-sb06","description":null,"published_at":"2024-06-11T16:56:16+08:00","created_at":"2024-05-06T14:37:09+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Batman","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-batman","device-iPhone 8","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-batman","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":41918637768803,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-SB06","requires_shipping":true,"taxable":true,"featured_image":{"id":31491880681571,"product_id":7416337039459,"position":7,"created_at":"2024-05-06T14:37:26+08:00","updated_at":"2024-05-06T14:37:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e6a44dc15326ca67e913d6c04421f823b6e9175_9c39546d-b728-474b-869e-2664f9ad6110.webp?v=1714977446","variant_ids":[41918637768803]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - Batman - 蝙蝠俠出任務 - 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":"NPB0105424-SB06","featured_media":{"alt":null,"id":23897291620451,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e6a44dc15326ca67e913d6c04421f823b6e9175_9c39546d-b728-474b-869e-2664f9ad6110.webp?v=1714977446"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51ce7ce2d7a31ba0b8801cc5daee4b3efcf55983_71f140dd-5157-403d-b3e4-0f7b6a9328c7.webp?v=1714977432","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c8c0604942edf7563959288b04861f4356fba85_3d95e2d9-50e1-43f2-9d85-6b24dd254c1b.webp?v=1714977435","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/946352c5ef8a4e30096354c77d36dcc01fea38fe_940ab6b0-35bf-4853-9b4d-1c8561de793a.webp?v=1714977437","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/576d1f3ee752fd5e6063e252676a6a92899d837c_d9d44072-cfbd-4edd-9b0f-d28021320821.webp?v=1714977439","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d7af075830709fe73e8872762cd8d89d90cf37ec_0baadd04-0756-4d09-8367-f47adecd8b72.webp?v=1714977441","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/846987e8add7790a2a1f3a0b56b50f6540ce9953_2fbca443-4af6-4d5d-b89f-f9e71a21b246.webp?v=1714977444","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e6a44dc15326ca67e913d6c04421f823b6e9175_9c39546d-b728-474b-869e-2664f9ad6110.webp?v=1714977446","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c02bc80c06c7d1aba514e259a80b7878df7005d1_734f5af2-d82f-44a8-bf90-9432fd588223.webp?v=1714977448","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/07565ef83f11e3926bb3e15161204f44a3e6e5b8_373f3a9b-7e22-4a6d-8efd-d49acbfe14a6.webp?v=1714977451","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efa4a58526c67dac707d779607780c2c47d2eb2c_b065967b-4330-4819-a747-f8730cff22f4.webp?v=1714977453"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51ce7ce2d7a31ba0b8801cc5daee4b3efcf55983_71f140dd-5157-403d-b3e4-0f7b6a9328c7.webp?v=1714977432","options":["color"],"media":[{"alt":null,"id":23897288900707,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51ce7ce2d7a31ba0b8801cc5daee4b3efcf55983_71f140dd-5157-403d-b3e4-0f7b6a9328c7.webp?v=1714977432"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51ce7ce2d7a31ba0b8801cc5daee4b3efcf55983_71f140dd-5157-403d-b3e4-0f7b6a9328c7.webp?v=1714977432","width":2000},{"alt":null,"id":23897289457763,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c8c0604942edf7563959288b04861f4356fba85_3d95e2d9-50e1-43f2-9d85-6b24dd254c1b.webp?v=1714977435"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c8c0604942edf7563959288b04861f4356fba85_3d95e2d9-50e1-43f2-9d85-6b24dd254c1b.webp?v=1714977435","width":2000},{"alt":null,"id":23897289916515,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/946352c5ef8a4e30096354c77d36dcc01fea38fe_940ab6b0-35bf-4853-9b4d-1c8561de793a.webp?v=1714977437"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/946352c5ef8a4e30096354c77d36dcc01fea38fe_940ab6b0-35bf-4853-9b4d-1c8561de793a.webp?v=1714977437","width":2000},{"alt":null,"id":23897290309731,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/576d1f3ee752fd5e6063e252676a6a92899d837c_d9d44072-cfbd-4edd-9b0f-d28021320821.webp?v=1714977439"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/576d1f3ee752fd5e6063e252676a6a92899d837c_d9d44072-cfbd-4edd-9b0f-d28021320821.webp?v=1714977439","width":2000},{"alt":null,"id":23897290768483,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d7af075830709fe73e8872762cd8d89d90cf37ec_0baadd04-0756-4d09-8367-f47adecd8b72.webp?v=1714977441"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d7af075830709fe73e8872762cd8d89d90cf37ec_0baadd04-0756-4d09-8367-f47adecd8b72.webp?v=1714977441","width":2000},{"alt":null,"id":23897291227235,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/846987e8add7790a2a1f3a0b56b50f6540ce9953_2fbca443-4af6-4d5d-b89f-f9e71a21b246.webp?v=1714977444"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/846987e8add7790a2a1f3a0b56b50f6540ce9953_2fbca443-4af6-4d5d-b89f-f9e71a21b246.webp?v=1714977444","width":2000},{"alt":null,"id":23897291620451,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e6a44dc15326ca67e913d6c04421f823b6e9175_9c39546d-b728-474b-869e-2664f9ad6110.webp?v=1714977446"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e6a44dc15326ca67e913d6c04421f823b6e9175_9c39546d-b728-474b-869e-2664f9ad6110.webp?v=1714977446","width":2000},{"alt":null,"id":23897294209123,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c02bc80c06c7d1aba514e259a80b7878df7005d1_734f5af2-d82f-44a8-bf90-9432fd588223.webp?v=1714977448"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c02bc80c06c7d1aba514e259a80b7878df7005d1_734f5af2-d82f-44a8-bf90-9432fd588223.webp?v=1714977448","width":2000},{"alt":null,"id":23897294635107,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/07565ef83f11e3926bb3e15161204f44a3e6e5b8_373f3a9b-7e22-4a6d-8efd-d49acbfe14a6.webp?v=1714977451"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/07565ef83f11e3926bb3e15161204f44a3e6e5b8_373f3a9b-7e22-4a6d-8efd-d49acbfe14a6.webp?v=1714977451","width":2000},{"alt":null,"id":23897294930019,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efa4a58526c67dac707d779607780c2c47d2eb2c_b065967b-4330-4819-a747-f8730cff22f4.webp?v=1714977453"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efa4a58526c67dac707d779607780c2c47d2eb2c_b065967b-4330-4819-a747-f8730cff22f4.webp?v=1714977453","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41918637768803,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-SB06","requires_shipping":true,"taxable":true,"featured_image":{"id":31491880681571,"product_id":7416337039459,"position":7,"created_at":"2024-05-06T14:37:26+08:00","updated_at":"2024-05-06T14:37:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e6a44dc15326ca67e913d6c04421f823b6e9175_9c39546d-b728-474b-869e-2664f9ad6110.webp?v=1714977446","variant_ids":[41918637768803]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - Batman - 蝙蝠俠出任務 - 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":"NPB0105424-SB06","featured_media":{"alt":null,"id":23897291620451,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e6a44dc15326ca67e913d6c04421f823b6e9175_9c39546d-b728-474b-869e-2664f9ad6110.webp?v=1714977446"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41918637768803,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-SB06","requires_shipping":true,"taxable":true,"featured_image":{"id":31491880681571,"product_id":7416337039459,"position":7,"created_at":"2024-05-06T14:37:26+08:00","updated_at":"2024-05-06T14:37:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e6a44dc15326ca67e913d6c04421f823b6e9175_9c39546d-b728-474b-869e-2664f9ad6110.webp?v=1714977446","variant_ids":[41918637768803]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - Batman - 蝙蝠俠出任務 - 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":"NPB0105424-SB06","featured_media":{"alt":null,"id":23897291620451,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e6a44dc15326ca67e913d6c04421f823b6e9175_9c39546d-b728-474b-869e-2664f9ad6110.webp?v=1714977446"}},"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: "停產" }