$product = {"id":7414933586019,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 黑武士-線稿風格","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb51","description":null,"published_at":"2024-06-11T17:53:28+08:00","created_at":"2024-05-05T19:51:33+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 12 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-star-wars","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":41910085976163,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB51","requires_shipping":true,"taxable":true,"featured_image":{"id":31487717146723,"product_id":7414933586019,"position":2,"created_at":"2024-05-05T19:51:38+08:00","updated_at":"2024-05-05T19:51:38+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d4faad2f23c70104fc0672c9d145b362f302d35_8980730a-4295-4f0d-b0a7-665b662b5b80.webp?v=1714909898","variant_ids":[41910085976163]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 黑武士-線稿風格 - 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-PB51","featured_media":{"alt":null,"id":23893061042275,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d4faad2f23c70104fc0672c9d145b362f302d35_8980730a-4295-4f0d-b0a7-665b662b5b80.webp?v=1714909898"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/851e5d63e8c2173cfce2e6dbe5cad1f3a7c7f4da_ad603663-7754-4633-b370-05676ec2d56c.webp?v=1714909896","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d4faad2f23c70104fc0672c9d145b362f302d35_8980730a-4295-4f0d-b0a7-665b662b5b80.webp?v=1714909898","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b31a2c64c8ca36c4e4efeb3a291cf1fb9c341d6b_3100e0a7-282f-4bd4-bff4-aeb4ebcb8007.webp?v=1714909900","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a64f969e4fa2ee3cd8d1245358bf6db1c6050912_e1ac1e50-e301-49a3-a12c-613a6593ac39.webp?v=1714909902","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/caadd5a559038e5757b74c554e2c008209340a71_b5977bbf-6524-4214-b239-43f71b56c498.webp?v=1714909904","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9302dbdcdf4ec807fd2e562a51682a16755e09e2_4355c2b4-4704-4579-a33a-29e832b2733c.webp?v=1714909906","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a2eac084f5aeaf4d891ec5f1326907259777938_1a8a669c-9e31-4bf5-bc5e-45bc9d883c87.webp?v=1714909909","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89c10c97f0f4a38d6c414f2cd4cf7a3663c1590e_1195921c-68cc-41de-a1e3-88c7eb7a1094.webp?v=1714909911","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bdca8cc45dbe155138467012dfb44bcbc3dd9dcb_0ba51028-6bce-43cf-a8c0-94222c2c1f6a.webp?v=1714909913","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5017f12d5635e2b6b204be04d76fdb0a1a448cd7_3365c722-5aab-4c62-8b26-a6de8dd0550c.webp?v=1714909916","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1849206ca0bdf4894e85946137f3dbb66503a59_571b3eff-deb6-481c-b5a7-075a4eefb2a3.webp?v=1714909919"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/851e5d63e8c2173cfce2e6dbe5cad1f3a7c7f4da_ad603663-7754-4633-b370-05676ec2d56c.webp?v=1714909896","options":["color"],"media":[{"alt":null,"id":23893059862627,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/851e5d63e8c2173cfce2e6dbe5cad1f3a7c7f4da_ad603663-7754-4633-b370-05676ec2d56c.webp?v=1714909896"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/851e5d63e8c2173cfce2e6dbe5cad1f3a7c7f4da_ad603663-7754-4633-b370-05676ec2d56c.webp?v=1714909896","width":2000},{"alt":null,"id":23893061042275,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d4faad2f23c70104fc0672c9d145b362f302d35_8980730a-4295-4f0d-b0a7-665b662b5b80.webp?v=1714909898"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d4faad2f23c70104fc0672c9d145b362f302d35_8980730a-4295-4f0d-b0a7-665b662b5b80.webp?v=1714909898","width":2000},{"alt":null,"id":23893061369955,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b31a2c64c8ca36c4e4efeb3a291cf1fb9c341d6b_3100e0a7-282f-4bd4-bff4-aeb4ebcb8007.webp?v=1714909900"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b31a2c64c8ca36c4e4efeb3a291cf1fb9c341d6b_3100e0a7-282f-4bd4-bff4-aeb4ebcb8007.webp?v=1714909900","width":2000},{"alt":null,"id":23893061763171,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a64f969e4fa2ee3cd8d1245358bf6db1c6050912_e1ac1e50-e301-49a3-a12c-613a6593ac39.webp?v=1714909902"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a64f969e4fa2ee3cd8d1245358bf6db1c6050912_e1ac1e50-e301-49a3-a12c-613a6593ac39.webp?v=1714909902","width":2000},{"alt":null,"id":23893062221923,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/caadd5a559038e5757b74c554e2c008209340a71_b5977bbf-6524-4214-b239-43f71b56c498.webp?v=1714909904"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/caadd5a559038e5757b74c554e2c008209340a71_b5977bbf-6524-4214-b239-43f71b56c498.webp?v=1714909904","width":2000},{"alt":null,"id":23893062615139,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9302dbdcdf4ec807fd2e562a51682a16755e09e2_4355c2b4-4704-4579-a33a-29e832b2733c.webp?v=1714909906"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9302dbdcdf4ec807fd2e562a51682a16755e09e2_4355c2b4-4704-4579-a33a-29e832b2733c.webp?v=1714909906","width":2000},{"alt":null,"id":23893063139427,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a2eac084f5aeaf4d891ec5f1326907259777938_1a8a669c-9e31-4bf5-bc5e-45bc9d883c87.webp?v=1714909909"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a2eac084f5aeaf4d891ec5f1326907259777938_1a8a669c-9e31-4bf5-bc5e-45bc9d883c87.webp?v=1714909909","width":2000},{"alt":null,"id":23893063434339,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89c10c97f0f4a38d6c414f2cd4cf7a3663c1590e_1195921c-68cc-41de-a1e3-88c7eb7a1094.webp?v=1714909911"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89c10c97f0f4a38d6c414f2cd4cf7a3663c1590e_1195921c-68cc-41de-a1e3-88c7eb7a1094.webp?v=1714909911","width":2000},{"alt":null,"id":23893063925859,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bdca8cc45dbe155138467012dfb44bcbc3dd9dcb_0ba51028-6bce-43cf-a8c0-94222c2c1f6a.webp?v=1714909913"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bdca8cc45dbe155138467012dfb44bcbc3dd9dcb_0ba51028-6bce-43cf-a8c0-94222c2c1f6a.webp?v=1714909913","width":2000},{"alt":null,"id":23893064613987,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5017f12d5635e2b6b204be04d76fdb0a1a448cd7_3365c722-5aab-4c62-8b26-a6de8dd0550c.webp?v=1714909916"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5017f12d5635e2b6b204be04d76fdb0a1a448cd7_3365c722-5aab-4c62-8b26-a6de8dd0550c.webp?v=1714909916","width":2000},{"alt":null,"id":23893065072739,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1849206ca0bdf4894e85946137f3dbb66503a59_571b3eff-deb6-481c-b5a7-075a4eefb2a3.webp?v=1714909919"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1849206ca0bdf4894e85946137f3dbb66503a59_571b3eff-deb6-481c-b5a7-075a4eefb2a3.webp?v=1714909919","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910085976163,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB51","requires_shipping":true,"taxable":true,"featured_image":{"id":31487717146723,"product_id":7414933586019,"position":2,"created_at":"2024-05-05T19:51:38+08:00","updated_at":"2024-05-05T19:51:38+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d4faad2f23c70104fc0672c9d145b362f302d35_8980730a-4295-4f0d-b0a7-665b662b5b80.webp?v=1714909898","variant_ids":[41910085976163]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 黑武士-線稿風格 - 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-PB51","featured_media":{"alt":null,"id":23893061042275,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d4faad2f23c70104fc0672c9d145b362f302d35_8980730a-4295-4f0d-b0a7-665b662b5b80.webp?v=1714909898"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910085976163,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB51","requires_shipping":true,"taxable":true,"featured_image":{"id":31487717146723,"product_id":7414933586019,"position":2,"created_at":"2024-05-05T19:51:38+08:00","updated_at":"2024-05-05T19:51:38+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d4faad2f23c70104fc0672c9d145b362f302d35_8980730a-4295-4f0d-b0a7-665b662b5b80.webp?v=1714909898","variant_ids":[41910085976163]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 黑武士-線稿風格 - 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-PB51","featured_media":{"alt":null,"id":23893061042275,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d4faad2f23c70104fc0672c9d145b362f302d35_8980730a-4295-4f0d-b0a7-665b662b5b80.webp?v=1714909898"}},"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: "停產" }