$product = {"id":7415067934819,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 1G - 生日帽","handle":"iphone-12-mini-mod-nx-magsafe-printable-iv01","description":null,"published_at":"2024-06-11T17:57:06+08:00","created_at":"2024-05-05T20:16:38+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區1G","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-1chun","device-iPhone 12 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-1chun","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":41911527702627,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-IV01","requires_shipping":true,"taxable":true,"featured_image":{"id":31488068812899,"product_id":7415067934819,"position":2,"created_at":"2024-05-05T20:16:43+08:00","updated_at":"2024-05-05T20:16:43+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/652643d6f99cdabbe9d7045789013b39bad795a4_dd199760-e298-46a5-bce8-bf1e3a4a0e84.webp?v=1714911403","variant_ids":[41911527702627]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 1G - 生日帽 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-IV01","featured_media":{"alt":null,"id":23893413265507,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/652643d6f99cdabbe9d7045789013b39bad795a4_dd199760-e298-46a5-bce8-bf1e3a4a0e84.webp?v=1714911403"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5fccc5b454c1787fa4376b87b82dd692897ba203_795d8ca9-5f2d-41e7-bc62-d8751e1b3689.webp?v=1714911400","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/652643d6f99cdabbe9d7045789013b39bad795a4_dd199760-e298-46a5-bce8-bf1e3a4a0e84.webp?v=1714911403","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd9944efd309b743bd99e114780853deac26fbc6_ca0d76b4-fbf1-4a3b-b4aa-6814f15666e6.webp?v=1714911405","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a1273549f99183aa6df0ea61b6b2ff602d81693_36d48717-45d2-4742-840e-58ed9df40783.webp?v=1714911408","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6ff9011e191c9a4fcddcd18737376bf8740e3ea_6e8656c0-4f90-4938-a8f0-94c203e9a1f8.webp?v=1714911410","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83380fe0db2fcbcbe2bc0696924df4474b5adaf0_57369c03-b140-4c05-8cfc-8c3195cf2a7b.webp?v=1714911412","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7864f10503dcc182ff3d38055657a73e434576d9_085a9aa2-d055-4b36-b77c-d1514d1b9f65.webp?v=1714911415","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/583359e7942ab59f6787dce678a818bd076ea2cf_5f1a0f66-74f9-48b7-909b-4a30197dcfc4.webp?v=1714911417","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/495d669f0bf8efc33156bf77058a12acd2370617_b60f044c-714e-4712-ae01-a8edb4ab0acf.webp?v=1714911420","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a9d1861a0460ae9547a7b7ce9d3776fa6bbf16e7_5cfe157a-e69e-4749-bf83-0a51114427a2.webp?v=1714911422","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0410d62aceabd24f027bf46af5edb3a7da49e43_54ac1da9-63f6-497f-a12d-07a0ff227026.webp?v=1714911425"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5fccc5b454c1787fa4376b87b82dd692897ba203_795d8ca9-5f2d-41e7-bc62-d8751e1b3689.webp?v=1714911400","options":["color"],"media":[{"alt":null,"id":23893412479075,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5fccc5b454c1787fa4376b87b82dd692897ba203_795d8ca9-5f2d-41e7-bc62-d8751e1b3689.webp?v=1714911400"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5fccc5b454c1787fa4376b87b82dd692897ba203_795d8ca9-5f2d-41e7-bc62-d8751e1b3689.webp?v=1714911400","width":2000},{"alt":null,"id":23893413265507,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/652643d6f99cdabbe9d7045789013b39bad795a4_dd199760-e298-46a5-bce8-bf1e3a4a0e84.webp?v=1714911403"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/652643d6f99cdabbe9d7045789013b39bad795a4_dd199760-e298-46a5-bce8-bf1e3a4a0e84.webp?v=1714911403","width":2000},{"alt":null,"id":23893414248547,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd9944efd309b743bd99e114780853deac26fbc6_ca0d76b4-fbf1-4a3b-b4aa-6814f15666e6.webp?v=1714911405"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd9944efd309b743bd99e114780853deac26fbc6_ca0d76b4-fbf1-4a3b-b4aa-6814f15666e6.webp?v=1714911405","width":2000},{"alt":null,"id":23893414772835,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a1273549f99183aa6df0ea61b6b2ff602d81693_36d48717-45d2-4742-840e-58ed9df40783.webp?v=1714911408"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a1273549f99183aa6df0ea61b6b2ff602d81693_36d48717-45d2-4742-840e-58ed9df40783.webp?v=1714911408","width":2000},{"alt":null,"id":23893415362659,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6ff9011e191c9a4fcddcd18737376bf8740e3ea_6e8656c0-4f90-4938-a8f0-94c203e9a1f8.webp?v=1714911410"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6ff9011e191c9a4fcddcd18737376bf8740e3ea_6e8656c0-4f90-4938-a8f0-94c203e9a1f8.webp?v=1714911410","width":2000},{"alt":null,"id":23893416312931,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83380fe0db2fcbcbe2bc0696924df4474b5adaf0_57369c03-b140-4c05-8cfc-8c3195cf2a7b.webp?v=1714911412"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83380fe0db2fcbcbe2bc0696924df4474b5adaf0_57369c03-b140-4c05-8cfc-8c3195cf2a7b.webp?v=1714911412","width":2000},{"alt":null,"id":23893416673379,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7864f10503dcc182ff3d38055657a73e434576d9_085a9aa2-d055-4b36-b77c-d1514d1b9f65.webp?v=1714911415"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7864f10503dcc182ff3d38055657a73e434576d9_085a9aa2-d055-4b36-b77c-d1514d1b9f65.webp?v=1714911415","width":2000},{"alt":null,"id":23893417558115,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/583359e7942ab59f6787dce678a818bd076ea2cf_5f1a0f66-74f9-48b7-909b-4a30197dcfc4.webp?v=1714911417"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/583359e7942ab59f6787dce678a818bd076ea2cf_5f1a0f66-74f9-48b7-909b-4a30197dcfc4.webp?v=1714911417","width":2000},{"alt":null,"id":23893418180707,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/495d669f0bf8efc33156bf77058a12acd2370617_b60f044c-714e-4712-ae01-a8edb4ab0acf.webp?v=1714911420"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/495d669f0bf8efc33156bf77058a12acd2370617_b60f044c-714e-4712-ae01-a8edb4ab0acf.webp?v=1714911420","width":2000},{"alt":null,"id":23893418672227,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a9d1861a0460ae9547a7b7ce9d3776fa6bbf16e7_5cfe157a-e69e-4749-bf83-0a51114427a2.webp?v=1714911422"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a9d1861a0460ae9547a7b7ce9d3776fa6bbf16e7_5cfe157a-e69e-4749-bf83-0a51114427a2.webp?v=1714911422","width":2000},{"alt":null,"id":23893419163747,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0410d62aceabd24f027bf46af5edb3a7da49e43_54ac1da9-63f6-497f-a12d-07a0ff227026.webp?v=1714911425"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0410d62aceabd24f027bf46af5edb3a7da49e43_54ac1da9-63f6-497f-a12d-07a0ff227026.webp?v=1714911425","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911527702627,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-IV01","requires_shipping":true,"taxable":true,"featured_image":{"id":31488068812899,"product_id":7415067934819,"position":2,"created_at":"2024-05-05T20:16:43+08:00","updated_at":"2024-05-05T20:16:43+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/652643d6f99cdabbe9d7045789013b39bad795a4_dd199760-e298-46a5-bce8-bf1e3a4a0e84.webp?v=1714911403","variant_ids":[41911527702627]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 1G - 生日帽 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-IV01","featured_media":{"alt":null,"id":23893413265507,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/652643d6f99cdabbe9d7045789013b39bad795a4_dd199760-e298-46a5-bce8-bf1e3a4a0e84.webp?v=1714911403"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911527702627,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-IV01","requires_shipping":true,"taxable":true,"featured_image":{"id":31488068812899,"product_id":7415067934819,"position":2,"created_at":"2024-05-05T20:16:43+08:00","updated_at":"2024-05-05T20:16:43+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/652643d6f99cdabbe9d7045789013b39bad795a4_dd199760-e298-46a5-bce8-bf1e3a4a0e84.webp?v=1714911403","variant_ids":[41911527702627]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 1G - 生日帽 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-IV01","featured_media":{"alt":null,"id":23893413265507,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/652643d6f99cdabbe9d7045789013b39bad795a4_dd199760-e298-46a5-bce8-bf1e3a4a0e84.webp?v=1714911403"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null; $type = ""; var sellingStatus if ($isMerge) { $(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: "停產" }