$product = {"id":7411443335267,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 史迪奇 - 搞怪系列-怪可愛","handle":"iphone-14-plus-mod-nx-magsafe-printable-yf02","description":null,"published_at":"2024-06-11T17:45:09+08:00","created_at":"2024-05-05T00:30:52+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區史迪奇","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-stitch","device-iPhone 14 Plus","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-stitch","Top50","type-Mod NX Printable MagSafe Printable"],"price":110000,"price_min":110000,"price_max":110000,"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":41898958618723,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-YF02","requires_shipping":true,"taxable":true,"featured_image":{"id":31480438095971,"product_id":7411443335267,"position":3,"created_at":"2024-05-05T00:30:59+08:00","updated_at":"2024-05-05T00:30:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/760e54f2271dec0c487071502f39d6a94c52572e_54fea96b-d9aa-4b46-a27e-467917ced672.webp?v=1714840259","variant_ids":[41898958618723]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 史迪奇 - 搞怪系列-怪可愛 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126124-YF02","featured_media":{"alt":null,"id":23885689847907,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/760e54f2271dec0c487071502f39d6a94c52572e_54fea96b-d9aa-4b46-a27e-467917ced672.webp?v=1714840259"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3466a64f2dc6c4dbec381853befb9d29ebd54ae_7f2f92cd-1763-4f39-a3b8-f12312b5b483.webp?v=1714840254","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c89b393048e57af1f4f5f0b1995e689f6ef3bcd_ee8b903c-42e7-4ee1-9b1e-030cad2f485f.webp?v=1714840257","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/760e54f2271dec0c487071502f39d6a94c52572e_54fea96b-d9aa-4b46-a27e-467917ced672.webp?v=1714840259","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b06103f582a14d3bd5f8c78fff9e38025eb497e_c821ad6a-ceab-467f-a354-7e2b9a9dac8b.webp?v=1714840262","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/700cf283f0bd810b7344689af5fcc12911829bc9_e09453d8-ac84-4406-820e-3cf7bd042886.webp?v=1714840264","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ebe106986c575afffc6d5c68d3e28dd651cbbae_be2bf90d-279d-4b69-bd6a-9968a34f6a26.webp?v=1714840266","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a346c64be6b1530cfa03f77993688658dd049de7_ba960779-fabc-42d8-93f4-d7234b8246ab.webp?v=1714840269","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e59b0c12216f23f90c3dcbd118ffa6095488989e_e32b73dd-964f-48cd-a2fe-3f7fc689171a.webp?v=1714840271","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4bd0c4e14c503e01619d26b177009cfa5429cab_004ef742-07ed-4d62-846a-666c622b0701.webp?v=1714840274","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/748d09c2776f6520f91e7f36c8570e265e16e1d2_c4b8a45f-93d1-49b0-860b-d614d83563e4.webp?v=1714840276"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3466a64f2dc6c4dbec381853befb9d29ebd54ae_7f2f92cd-1763-4f39-a3b8-f12312b5b483.webp?v=1714840254","options":["color"],"media":[{"alt":null,"id":23885688832099,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3466a64f2dc6c4dbec381853befb9d29ebd54ae_7f2f92cd-1763-4f39-a3b8-f12312b5b483.webp?v=1714840254"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3466a64f2dc6c4dbec381853befb9d29ebd54ae_7f2f92cd-1763-4f39-a3b8-f12312b5b483.webp?v=1714840254","width":2000},{"alt":null,"id":23885689389155,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c89b393048e57af1f4f5f0b1995e689f6ef3bcd_ee8b903c-42e7-4ee1-9b1e-030cad2f485f.webp?v=1714840257"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c89b393048e57af1f4f5f0b1995e689f6ef3bcd_ee8b903c-42e7-4ee1-9b1e-030cad2f485f.webp?v=1714840257","width":2000},{"alt":null,"id":23885689847907,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/760e54f2271dec0c487071502f39d6a94c52572e_54fea96b-d9aa-4b46-a27e-467917ced672.webp?v=1714840259"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/760e54f2271dec0c487071502f39d6a94c52572e_54fea96b-d9aa-4b46-a27e-467917ced672.webp?v=1714840259","width":2000},{"alt":null,"id":23885690241123,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b06103f582a14d3bd5f8c78fff9e38025eb497e_c821ad6a-ceab-467f-a354-7e2b9a9dac8b.webp?v=1714840262"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b06103f582a14d3bd5f8c78fff9e38025eb497e_c821ad6a-ceab-467f-a354-7e2b9a9dac8b.webp?v=1714840262","width":2000},{"alt":null,"id":23885690830947,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/700cf283f0bd810b7344689af5fcc12911829bc9_e09453d8-ac84-4406-820e-3cf7bd042886.webp?v=1714840264"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/700cf283f0bd810b7344689af5fcc12911829bc9_e09453d8-ac84-4406-820e-3cf7bd042886.webp?v=1714840264","width":2000},{"alt":null,"id":23885691355235,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ebe106986c575afffc6d5c68d3e28dd651cbbae_be2bf90d-279d-4b69-bd6a-9968a34f6a26.webp?v=1714840266"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ebe106986c575afffc6d5c68d3e28dd651cbbae_be2bf90d-279d-4b69-bd6a-9968a34f6a26.webp?v=1714840266","width":2000},{"alt":null,"id":23885692534883,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a346c64be6b1530cfa03f77993688658dd049de7_ba960779-fabc-42d8-93f4-d7234b8246ab.webp?v=1714840269"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a346c64be6b1530cfa03f77993688658dd049de7_ba960779-fabc-42d8-93f4-d7234b8246ab.webp?v=1714840269","width":2000},{"alt":null,"id":23885693026403,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e59b0c12216f23f90c3dcbd118ffa6095488989e_e32b73dd-964f-48cd-a2fe-3f7fc689171a.webp?v=1714840271"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e59b0c12216f23f90c3dcbd118ffa6095488989e_e32b73dd-964f-48cd-a2fe-3f7fc689171a.webp?v=1714840271","width":2000},{"alt":null,"id":23885693550691,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4bd0c4e14c503e01619d26b177009cfa5429cab_004ef742-07ed-4d62-846a-666c622b0701.webp?v=1714840274"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4bd0c4e14c503e01619d26b177009cfa5429cab_004ef742-07ed-4d62-846a-666c622b0701.webp?v=1714840274","width":2000},{"alt":null,"id":23885694107747,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/748d09c2776f6520f91e7f36c8570e265e16e1d2_c4b8a45f-93d1-49b0-860b-d614d83563e4.webp?v=1714840276"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/748d09c2776f6520f91e7f36c8570e265e16e1d2_c4b8a45f-93d1-49b0-860b-d614d83563e4.webp?v=1714840276","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41898958618723,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-YF02","requires_shipping":true,"taxable":true,"featured_image":{"id":31480438095971,"product_id":7411443335267,"position":3,"created_at":"2024-05-05T00:30:59+08:00","updated_at":"2024-05-05T00:30:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/760e54f2271dec0c487071502f39d6a94c52572e_54fea96b-d9aa-4b46-a27e-467917ced672.webp?v=1714840259","variant_ids":[41898958618723]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 史迪奇 - 搞怪系列-怪可愛 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126124-YF02","featured_media":{"alt":null,"id":23885689847907,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/760e54f2271dec0c487071502f39d6a94c52572e_54fea96b-d9aa-4b46-a27e-467917ced672.webp?v=1714840259"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41898958618723,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-YF02","requires_shipping":true,"taxable":true,"featured_image":{"id":31480438095971,"product_id":7411443335267,"position":3,"created_at":"2024-05-05T00:30:59+08:00","updated_at":"2024-05-05T00:30:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/760e54f2271dec0c487071502f39d6a94c52572e_54fea96b-d9aa-4b46-a27e-467917ced672.webp?v=1714840259","variant_ids":[41898958618723]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 史迪奇 - 搞怪系列-怪可愛 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126124-YF02","featured_media":{"alt":null,"id":23885689847907,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/760e54f2271dec0c487071502f39d6a94c52572e_54fea96b-d9aa-4b46-a27e-467917ced672.webp?v=1714840259"}},"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: "停產" }