$product = {"id":7415070720099,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Batman - 小丑拳擊學院","handle":"iphone-12-mini-mod-nx-magsafe-printable-sb07","description":null,"published_at":"2024-06-11T17:57:11+08:00","created_at":"2024-05-05T20:17:09+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Batman","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-batman","device-iPhone 12 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-batman","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":41911555522659,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-SB07","requires_shipping":true,"taxable":true,"featured_image":{"id":31488081002595,"product_id":7415070720099,"position":8,"created_at":"2024-05-05T20:17:27+08:00","updated_at":"2024-05-05T20:17:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca8c887d07cfc02a48015c72379e5ccf87ea52b6_f0f285d6-7a5d-4806-a4c0-efb5c8237ac2.webp?v=1714911447","variant_ids":[41911555522659]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Batman - 小丑拳擊學院 - 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":"MPB0118424-SB07","featured_media":{"alt":null,"id":23893425389667,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca8c887d07cfc02a48015c72379e5ccf87ea52b6_f0f285d6-7a5d-4806-a4c0-efb5c8237ac2.webp?v=1714911447"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb9bbacb6f1c398de67e9db46a66852e40dd0cb1_1dac945b-4051-45f2-8f03-2faee095a371.webp?v=1714911431","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/13ddf6f4a6aaf4186b9af0c7808dacc159b713c1_fe95dee8-f2a8-44be-8547-d2fe2e514bd2.webp?v=1714911433","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e7d0f872b4c909994d70a469af3e0ce00ed8643_6fd1c9c6-d113-434b-b104-c42560b94932.webp?v=1714911436","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9feead101e1e8d8846160afcad87bb37bef687f0_e6843782-22a4-484f-bf5f-05b8db535da2.webp?v=1714911438","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f57c78440be574d4925f725aa26b52b6e3372b3_90056dc8-6151-40a3-be69-0c495dbd70ba.webp?v=1714911440","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3ff04e90472760a4a08d5e9f75eba5100b3e7150_60be7c1e-d5ca-4347-af57-c21c7d456b90.webp?v=1714911442","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d00f8967b3edb4f5907c26077e0e749903310205_5debd321-107e-44d0-b00f-880667c4f4ea.webp?v=1714911445","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca8c887d07cfc02a48015c72379e5ccf87ea52b6_f0f285d6-7a5d-4806-a4c0-efb5c8237ac2.webp?v=1714911447","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b833b7b60cde6231a80b881e35576c55d2d3ffc9_d279a1a9-3052-4c03-bdc1-efa4e756f674.webp?v=1714911450","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a4c0e877e26a1cc1f9a0ab6d6eeb7984a5d523cf_424f7d16-c878-4ae2-897e-908d9d2ecbc8.webp?v=1714911452","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77afc16af72596a811fd49ec95c33f84bebb96b7_13ca025a-f11b-40a5-8df3-f18fe0863dc4.webp?v=1714911454"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb9bbacb6f1c398de67e9db46a66852e40dd0cb1_1dac945b-4051-45f2-8f03-2faee095a371.webp?v=1714911431","options":["color"],"media":[{"alt":null,"id":23893421326435,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb9bbacb6f1c398de67e9db46a66852e40dd0cb1_1dac945b-4051-45f2-8f03-2faee095a371.webp?v=1714911431"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb9bbacb6f1c398de67e9db46a66852e40dd0cb1_1dac945b-4051-45f2-8f03-2faee095a371.webp?v=1714911431","width":2000},{"alt":null,"id":23893421785187,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/13ddf6f4a6aaf4186b9af0c7808dacc159b713c1_fe95dee8-f2a8-44be-8547-d2fe2e514bd2.webp?v=1714911433"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/13ddf6f4a6aaf4186b9af0c7808dacc159b713c1_fe95dee8-f2a8-44be-8547-d2fe2e514bd2.webp?v=1714911433","width":2000},{"alt":null,"id":23893422342243,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e7d0f872b4c909994d70a469af3e0ce00ed8643_6fd1c9c6-d113-434b-b104-c42560b94932.webp?v=1714911436"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e7d0f872b4c909994d70a469af3e0ce00ed8643_6fd1c9c6-d113-434b-b104-c42560b94932.webp?v=1714911436","width":2000},{"alt":null,"id":23893422932067,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9feead101e1e8d8846160afcad87bb37bef687f0_e6843782-22a4-484f-bf5f-05b8db535da2.webp?v=1714911438"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9feead101e1e8d8846160afcad87bb37bef687f0_e6843782-22a4-484f-bf5f-05b8db535da2.webp?v=1714911438","width":2000},{"alt":null,"id":23893423456355,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f57c78440be574d4925f725aa26b52b6e3372b3_90056dc8-6151-40a3-be69-0c495dbd70ba.webp?v=1714911440"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f57c78440be574d4925f725aa26b52b6e3372b3_90056dc8-6151-40a3-be69-0c495dbd70ba.webp?v=1714911440","width":2000},{"alt":null,"id":23893423882339,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3ff04e90472760a4a08d5e9f75eba5100b3e7150_60be7c1e-d5ca-4347-af57-c21c7d456b90.webp?v=1714911442"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3ff04e90472760a4a08d5e9f75eba5100b3e7150_60be7c1e-d5ca-4347-af57-c21c7d456b90.webp?v=1714911442","width":2000},{"alt":null,"id":23893424832611,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d00f8967b3edb4f5907c26077e0e749903310205_5debd321-107e-44d0-b00f-880667c4f4ea.webp?v=1714911445"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d00f8967b3edb4f5907c26077e0e749903310205_5debd321-107e-44d0-b00f-880667c4f4ea.webp?v=1714911445","width":2000},{"alt":null,"id":23893425389667,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca8c887d07cfc02a48015c72379e5ccf87ea52b6_f0f285d6-7a5d-4806-a4c0-efb5c8237ac2.webp?v=1714911447"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca8c887d07cfc02a48015c72379e5ccf87ea52b6_f0f285d6-7a5d-4806-a4c0-efb5c8237ac2.webp?v=1714911447","width":2000},{"alt":null,"id":23893425717347,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b833b7b60cde6231a80b881e35576c55d2d3ffc9_d279a1a9-3052-4c03-bdc1-efa4e756f674.webp?v=1714911450"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b833b7b60cde6231a80b881e35576c55d2d3ffc9_d279a1a9-3052-4c03-bdc1-efa4e756f674.webp?v=1714911450","width":2000},{"alt":null,"id":23893426372707,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a4c0e877e26a1cc1f9a0ab6d6eeb7984a5d523cf_424f7d16-c878-4ae2-897e-908d9d2ecbc8.webp?v=1714911452"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a4c0e877e26a1cc1f9a0ab6d6eeb7984a5d523cf_424f7d16-c878-4ae2-897e-908d9d2ecbc8.webp?v=1714911452","width":2000},{"alt":null,"id":23893426896995,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77afc16af72596a811fd49ec95c33f84bebb96b7_13ca025a-f11b-40a5-8df3-f18fe0863dc4.webp?v=1714911454"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77afc16af72596a811fd49ec95c33f84bebb96b7_13ca025a-f11b-40a5-8df3-f18fe0863dc4.webp?v=1714911454","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911555522659,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-SB07","requires_shipping":true,"taxable":true,"featured_image":{"id":31488081002595,"product_id":7415070720099,"position":8,"created_at":"2024-05-05T20:17:27+08:00","updated_at":"2024-05-05T20:17:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca8c887d07cfc02a48015c72379e5ccf87ea52b6_f0f285d6-7a5d-4806-a4c0-efb5c8237ac2.webp?v=1714911447","variant_ids":[41911555522659]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Batman - 小丑拳擊學院 - 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":"MPB0118424-SB07","featured_media":{"alt":null,"id":23893425389667,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca8c887d07cfc02a48015c72379e5ccf87ea52b6_f0f285d6-7a5d-4806-a4c0-efb5c8237ac2.webp?v=1714911447"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911555522659,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-SB07","requires_shipping":true,"taxable":true,"featured_image":{"id":31488081002595,"product_id":7415070720099,"position":8,"created_at":"2024-05-05T20:17:27+08:00","updated_at":"2024-05-05T20:17:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca8c887d07cfc02a48015c72379e5ccf87ea52b6_f0f285d6-7a5d-4806-a4c0-efb5c8237ac2.webp?v=1714911447","variant_ids":[41911555522659]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Batman - 小丑拳擊學院 - 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":"MPB0118424-SB07","featured_media":{"alt":null,"id":23893425389667,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca8c887d07cfc02a48015c72379e5ccf87ea52b6_f0f285d6-7a5d-4806-a4c0-efb5c8237ac2.webp?v=1714911447"}},"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: "停產" }