$product = {"id":7415037657187,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Look - 大自然的傑作(亞馬遜雨林)","handle":"iphone-12-mini-mod-nx-magsafe-printable-af09","description":null,"published_at":"2024-06-11T17:56:17+08:00","created_at":"2024-05-05T20:11:13+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Look","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-look","device-iPhone 12 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-look","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":41911199203427,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-AF09","requires_shipping":true,"taxable":true,"featured_image":{"id":31487995936867,"product_id":7415037657187,"position":10,"created_at":"2024-05-05T20:11:37+08:00","updated_at":"2024-05-05T20:11:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40faa16ceff559f1310e3a757e1cb2132fd9021c_99c70a31-ce2f-4255-92b9-eb74accf97be.webp?v=1714911097","variant_ids":[41911199203427]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Look - 大自然的傑作(亞馬遜雨林) - 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-AF09","featured_media":{"alt":null,"id":23893340192867,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40faa16ceff559f1310e3a757e1cb2132fd9021c_99c70a31-ce2f-4255-92b9-eb74accf97be.webp?v=1714911097"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ea3a122a03926e8478acdfe9c07465280b5743d_48ccebdc-6500-4c54-afb4-96bf6414934e.webp?v=1714911075","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e81329b9aa790298135cc343fc9d7b7e200ec5b3_f2a27434-6661-42d9-aa79-232b104598f8.webp?v=1714911077","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8994c36f3cb615a69e49c2a7a6e6579fb4d7e409_91d9f5b9-5d89-4fff-8ea8-748554ccb134.webp?v=1714911080","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/277b17960aebc88699e51a6c9c21a06c76091720_336edb2b-61a8-412a-9d89-419e82880868.webp?v=1714911082","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5510bb422b1690981b36b6a44afd5621bccaf36e_69ac0f3d-d22d-43ee-90c9-982bca1d2b3b.webp?v=1714911085","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a1ef4f6c0ed181e0def07878b66eddb069e843c_b50519f3-7d1b-4d8b-bcb6-4c34ae4adf0f.webp?v=1714911087","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab0b5b26b25a373800bf6d461803b42558d8c624_5eb33b33-b302-478d-a811-ecd137688a2f.webp?v=1714911090","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa1670a28f2fec3875e22e33a7f75fa9b7411566_0aaf6c1b-1983-453b-8050-9a5f60dac621.webp?v=1714911092","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10533285d22b072a49ed3e8a519938797012e9ce_b7cbea73-dfdb-4552-95f5-e7e58568171a.webp?v=1714911095","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40faa16ceff559f1310e3a757e1cb2132fd9021c_99c70a31-ce2f-4255-92b9-eb74accf97be.webp?v=1714911097","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1686e4338d6668dc554faf182e11d3000d3721f8_42a3ed6f-9709-4be3-a841-2122754670a1.webp?v=1714911100"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ea3a122a03926e8478acdfe9c07465280b5743d_48ccebdc-6500-4c54-afb4-96bf6414934e.webp?v=1714911075","options":["color"],"media":[{"alt":null,"id":23893334949987,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ea3a122a03926e8478acdfe9c07465280b5743d_48ccebdc-6500-4c54-afb4-96bf6414934e.webp?v=1714911075"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ea3a122a03926e8478acdfe9c07465280b5743d_48ccebdc-6500-4c54-afb4-96bf6414934e.webp?v=1714911075","width":2000},{"alt":null,"id":23893335572579,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e81329b9aa790298135cc343fc9d7b7e200ec5b3_f2a27434-6661-42d9-aa79-232b104598f8.webp?v=1714911077"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e81329b9aa790298135cc343fc9d7b7e200ec5b3_f2a27434-6661-42d9-aa79-232b104598f8.webp?v=1714911077","width":2000},{"alt":null,"id":23893336031331,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8994c36f3cb615a69e49c2a7a6e6579fb4d7e409_91d9f5b9-5d89-4fff-8ea8-748554ccb134.webp?v=1714911080"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8994c36f3cb615a69e49c2a7a6e6579fb4d7e409_91d9f5b9-5d89-4fff-8ea8-748554ccb134.webp?v=1714911080","width":2000},{"alt":null,"id":23893336490083,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/277b17960aebc88699e51a6c9c21a06c76091720_336edb2b-61a8-412a-9d89-419e82880868.webp?v=1714911082"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/277b17960aebc88699e51a6c9c21a06c76091720_336edb2b-61a8-412a-9d89-419e82880868.webp?v=1714911082","width":2000},{"alt":null,"id":23893337342051,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5510bb422b1690981b36b6a44afd5621bccaf36e_69ac0f3d-d22d-43ee-90c9-982bca1d2b3b.webp?v=1714911085"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5510bb422b1690981b36b6a44afd5621bccaf36e_69ac0f3d-d22d-43ee-90c9-982bca1d2b3b.webp?v=1714911085","width":2000},{"alt":null,"id":23893337833571,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a1ef4f6c0ed181e0def07878b66eddb069e843c_b50519f3-7d1b-4d8b-bcb6-4c34ae4adf0f.webp?v=1714911087"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a1ef4f6c0ed181e0def07878b66eddb069e843c_b50519f3-7d1b-4d8b-bcb6-4c34ae4adf0f.webp?v=1714911087","width":2000},{"alt":null,"id":23893338685539,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab0b5b26b25a373800bf6d461803b42558d8c624_5eb33b33-b302-478d-a811-ecd137688a2f.webp?v=1714911090"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab0b5b26b25a373800bf6d461803b42558d8c624_5eb33b33-b302-478d-a811-ecd137688a2f.webp?v=1714911090","width":2000},{"alt":null,"id":23893339111523,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa1670a28f2fec3875e22e33a7f75fa9b7411566_0aaf6c1b-1983-453b-8050-9a5f60dac621.webp?v=1714911092"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa1670a28f2fec3875e22e33a7f75fa9b7411566_0aaf6c1b-1983-453b-8050-9a5f60dac621.webp?v=1714911092","width":2000},{"alt":null,"id":23893339701347,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10533285d22b072a49ed3e8a519938797012e9ce_b7cbea73-dfdb-4552-95f5-e7e58568171a.webp?v=1714911095"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10533285d22b072a49ed3e8a519938797012e9ce_b7cbea73-dfdb-4552-95f5-e7e58568171a.webp?v=1714911095","width":2000},{"alt":null,"id":23893340192867,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40faa16ceff559f1310e3a757e1cb2132fd9021c_99c70a31-ce2f-4255-92b9-eb74accf97be.webp?v=1714911097"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40faa16ceff559f1310e3a757e1cb2132fd9021c_99c70a31-ce2f-4255-92b9-eb74accf97be.webp?v=1714911097","width":2000},{"alt":null,"id":23893340782691,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1686e4338d6668dc554faf182e11d3000d3721f8_42a3ed6f-9709-4be3-a841-2122754670a1.webp?v=1714911100"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1686e4338d6668dc554faf182e11d3000d3721f8_42a3ed6f-9709-4be3-a841-2122754670a1.webp?v=1714911100","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911199203427,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-AF09","requires_shipping":true,"taxable":true,"featured_image":{"id":31487995936867,"product_id":7415037657187,"position":10,"created_at":"2024-05-05T20:11:37+08:00","updated_at":"2024-05-05T20:11:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40faa16ceff559f1310e3a757e1cb2132fd9021c_99c70a31-ce2f-4255-92b9-eb74accf97be.webp?v=1714911097","variant_ids":[41911199203427]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Look - 大自然的傑作(亞馬遜雨林) - 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-AF09","featured_media":{"alt":null,"id":23893340192867,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40faa16ceff559f1310e3a757e1cb2132fd9021c_99c70a31-ce2f-4255-92b9-eb74accf97be.webp?v=1714911097"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911199203427,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-AF09","requires_shipping":true,"taxable":true,"featured_image":{"id":31487995936867,"product_id":7415037657187,"position":10,"created_at":"2024-05-05T20:11:37+08:00","updated_at":"2024-05-05T20:11:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40faa16ceff559f1310e3a757e1cb2132fd9021c_99c70a31-ce2f-4255-92b9-eb74accf97be.webp?v=1714911097","variant_ids":[41911199203427]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Look - 大自然的傑作(亞馬遜雨林) - 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-AF09","featured_media":{"alt":null,"id":23893340192867,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40faa16ceff559f1310e3a757e1cb2132fd9021c_99c70a31-ce2f-4255-92b9-eb74accf97be.webp?v=1714911097"}},"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: "停產" }