$product = {"id":7415039000675,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 眾白風暴兵","handle":"iphone-12-mini-mod-nx-magsafe-printable-pc01","description":null,"published_at":"2024-06-11T17:56:20+08:00","created_at":"2024-05-05T20:11:28+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":41911216504931,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PC01","requires_shipping":true,"taxable":true,"featured_image":{"id":31487995707491,"product_id":7415039000675,"position":3,"created_at":"2024-05-05T20:11:36+08:00","updated_at":"2024-05-05T20:11:36+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c393d5e9148488849cc2ba9ffc9ac6f0d10f03d_d9ac203b-37fc-40da-bc5d-7ae6c5770839.webp?v=1714911096","variant_ids":[41911216504931]},"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-PC01","featured_media":{"alt":null,"id":23893339963491,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c393d5e9148488849cc2ba9ffc9ac6f0d10f03d_d9ac203b-37fc-40da-bc5d-7ae6c5770839.webp?v=1714911096"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d86565d696f745a03465802b2b145cd5d1dcc962_bd0269ef-1c57-49a7-861b-925407ea31d6.webp?v=1714911091","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ed27bba23b3e1b63486390378f8680999226d30_64b7ee55-626f-46af-a8db-fc32fa1f4336.webp?v=1714911094","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c393d5e9148488849cc2ba9ffc9ac6f0d10f03d_d9ac203b-37fc-40da-bc5d-7ae6c5770839.webp?v=1714911096","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28ebea40896d2d0ad1efa95adc251ecee3ebc603_1d4f2b6c-840c-4392-80a4-2c678b219c81.webp?v=1714911099","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10b606fbb23cd47ef29b17f0e7cd431c3baa9d49_edd23fe4-937f-458a-bc9f-6b428248d39d.webp?v=1714911101","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d70056cbff684fea39e5fe475c84b32f5a2d199_0448d3e2-27e0-4ee4-bab6-081aa605187d.webp?v=1714911104","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50092f2c6ff8a24791ab7710f12dae8348b44ba2_9f90f3ae-28d5-43b5-a2f2-fc8220e31861.webp?v=1714911106","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e4cc03f38be60aa2fb8676d8a5df85326666140b_c250b294-f439-48a3-8c1f-d40bc14e29d0.webp?v=1714911109","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d3940e530c77c9fc6e35622c17e5870f7a35171_72470e27-d90f-421a-b1bd-8fc40d395da3.webp?v=1714911111","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a010f46ac4290251304f61d79753b4c065884b77_92bdca75-3fdf-4270-999e-19559e506674.webp?v=1714911114","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c07468a818baf7b1967524ccbb1a6f9a71076e3_097dafc7-7667-4454-84d5-e5e97976b0c8.webp?v=1714911116"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d86565d696f745a03465802b2b145cd5d1dcc962_bd0269ef-1c57-49a7-861b-925407ea31d6.webp?v=1714911091","options":["color"],"media":[{"alt":null,"id":23893338914915,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d86565d696f745a03465802b2b145cd5d1dcc962_bd0269ef-1c57-49a7-861b-925407ea31d6.webp?v=1714911091"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d86565d696f745a03465802b2b145cd5d1dcc962_bd0269ef-1c57-49a7-861b-925407ea31d6.webp?v=1714911091","width":2000},{"alt":null,"id":23893339504739,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ed27bba23b3e1b63486390378f8680999226d30_64b7ee55-626f-46af-a8db-fc32fa1f4336.webp?v=1714911094"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ed27bba23b3e1b63486390378f8680999226d30_64b7ee55-626f-46af-a8db-fc32fa1f4336.webp?v=1714911094","width":2000},{"alt":null,"id":23893339963491,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c393d5e9148488849cc2ba9ffc9ac6f0d10f03d_d9ac203b-37fc-40da-bc5d-7ae6c5770839.webp?v=1714911096"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c393d5e9148488849cc2ba9ffc9ac6f0d10f03d_d9ac203b-37fc-40da-bc5d-7ae6c5770839.webp?v=1714911096","width":2000},{"alt":null,"id":23893340520547,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28ebea40896d2d0ad1efa95adc251ecee3ebc603_1d4f2b6c-840c-4392-80a4-2c678b219c81.webp?v=1714911099"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28ebea40896d2d0ad1efa95adc251ecee3ebc603_1d4f2b6c-840c-4392-80a4-2c678b219c81.webp?v=1714911099","width":2000},{"alt":null,"id":23893341044835,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10b606fbb23cd47ef29b17f0e7cd431c3baa9d49_edd23fe4-937f-458a-bc9f-6b428248d39d.webp?v=1714911101"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10b606fbb23cd47ef29b17f0e7cd431c3baa9d49_edd23fe4-937f-458a-bc9f-6b428248d39d.webp?v=1714911101","width":2000},{"alt":null,"id":23893342027875,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d70056cbff684fea39e5fe475c84b32f5a2d199_0448d3e2-27e0-4ee4-bab6-081aa605187d.webp?v=1714911104"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d70056cbff684fea39e5fe475c84b32f5a2d199_0448d3e2-27e0-4ee4-bab6-081aa605187d.webp?v=1714911104","width":2000},{"alt":null,"id":23893342453859,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50092f2c6ff8a24791ab7710f12dae8348b44ba2_9f90f3ae-28d5-43b5-a2f2-fc8220e31861.webp?v=1714911106"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50092f2c6ff8a24791ab7710f12dae8348b44ba2_9f90f3ae-28d5-43b5-a2f2-fc8220e31861.webp?v=1714911106","width":2000},{"alt":null,"id":23893342978147,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e4cc03f38be60aa2fb8676d8a5df85326666140b_c250b294-f439-48a3-8c1f-d40bc14e29d0.webp?v=1714911109"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e4cc03f38be60aa2fb8676d8a5df85326666140b_c250b294-f439-48a3-8c1f-d40bc14e29d0.webp?v=1714911109","width":2000},{"alt":null,"id":23893343731811,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d3940e530c77c9fc6e35622c17e5870f7a35171_72470e27-d90f-421a-b1bd-8fc40d395da3.webp?v=1714911111"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d3940e530c77c9fc6e35622c17e5870f7a35171_72470e27-d90f-421a-b1bd-8fc40d395da3.webp?v=1714911111","width":2000},{"alt":null,"id":23893344026723,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a010f46ac4290251304f61d79753b4c065884b77_92bdca75-3fdf-4270-999e-19559e506674.webp?v=1714911114"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a010f46ac4290251304f61d79753b4c065884b77_92bdca75-3fdf-4270-999e-19559e506674.webp?v=1714911114","width":2000},{"alt":null,"id":23893344583779,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c07468a818baf7b1967524ccbb1a6f9a71076e3_097dafc7-7667-4454-84d5-e5e97976b0c8.webp?v=1714911116"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c07468a818baf7b1967524ccbb1a6f9a71076e3_097dafc7-7667-4454-84d5-e5e97976b0c8.webp?v=1714911116","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911216504931,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PC01","requires_shipping":true,"taxable":true,"featured_image":{"id":31487995707491,"product_id":7415039000675,"position":3,"created_at":"2024-05-05T20:11:36+08:00","updated_at":"2024-05-05T20:11:36+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c393d5e9148488849cc2ba9ffc9ac6f0d10f03d_d9ac203b-37fc-40da-bc5d-7ae6c5770839.webp?v=1714911096","variant_ids":[41911216504931]},"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-PC01","featured_media":{"alt":null,"id":23893339963491,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c393d5e9148488849cc2ba9ffc9ac6f0d10f03d_d9ac203b-37fc-40da-bc5d-7ae6c5770839.webp?v=1714911096"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911216504931,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PC01","requires_shipping":true,"taxable":true,"featured_image":{"id":31487995707491,"product_id":7415039000675,"position":3,"created_at":"2024-05-05T20:11:36+08:00","updated_at":"2024-05-05T20:11:36+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c393d5e9148488849cc2ba9ffc9ac6f0d10f03d_d9ac203b-37fc-40da-bc5d-7ae6c5770839.webp?v=1714911096","variant_ids":[41911216504931]},"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-PC01","featured_media":{"alt":null,"id":23893339963491,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c393d5e9148488849cc2ba9ffc9ac6f0d10f03d_d9ac203b-37fc-40da-bc5d-7ae6c5770839.webp?v=1714911096"}},"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: "停產" }