$product = {"id":7415105749091,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 尤達-塗鴉藝術","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb36","description":null,"published_at":"2024-06-11T17:58:07+08:00","created_at":"2024-05-05T20:23:57+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":41911928946787,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB36","requires_shipping":true,"taxable":true,"featured_image":{"id":31488175669347,"product_id":7415105749091,"position":3,"created_at":"2024-05-05T20:24:04+08:00","updated_at":"2024-05-05T20:24:04+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40e8282fe895e1e6b33058ea79714d12bf5a7cdd_84bada3d-ee91-4792-8d66-dbefa8efd526.webp?v=1714911844","variant_ids":[41911928946787]},"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-PB36","featured_media":{"alt":null,"id":23893520351331,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40e8282fe895e1e6b33058ea79714d12bf5a7cdd_84bada3d-ee91-4792-8d66-dbefa8efd526.webp?v=1714911844"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e997bb5529b5da56d9d2cb7db4857e830fcaf42f_e7474b29-56b1-41e4-a13f-3dda3c6bda4e.webp?v=1714911840","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c91ed94eeddf6916b4538b227a46a79b9484c7a0_fd4b8f31-9d07-47dd-b190-452610915fa4.webp?v=1714911842","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40e8282fe895e1e6b33058ea79714d12bf5a7cdd_84bada3d-ee91-4792-8d66-dbefa8efd526.webp?v=1714911844","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0dbeba26b03629f95a0d873550c41ace60317206_4e7f39c1-d116-4515-9238-78bab087fc65.webp?v=1714911846","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ba074953c1621cde0c9cedf2433e79824331e5c_6a162c73-226a-456c-9624-a56172bb0889.webp?v=1714911848","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34134028229072c858dd7c6c98bf7a20e0ffb190_d9194983-32bf-46b2-a231-aca0ae8e8e96.webp?v=1714911851","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/49051f7bb0de992ed4ed14fe519c036684d7e28c_356c13e5-8cad-4314-b6da-8707e51ed2ae.webp?v=1714911853","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe6a0a8f6ae07d0ba91803e66eea238ba8ce617b_a2df37f5-1a5a-43f8-a395-ce8878984eb2.webp?v=1714911855","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/227ced13f14da51630690875f6d5de103e24aa22_8fe2835d-c193-400f-bdb7-44f680debe5f.webp?v=1714911857","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02888ed4e989c7862ed82caf2127f21e3f344829_a9102a39-57b2-48cd-ae1c-e93a010d4b62.webp?v=1714911860","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02ce0b31caed0be107c94ca5b1b0eef19f6c1646_4b3f00e6-3c7b-46a6-8e71-269fc8a8c364.webp?v=1714911862"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e997bb5529b5da56d9d2cb7db4857e830fcaf42f_e7474b29-56b1-41e4-a13f-3dda3c6bda4e.webp?v=1714911840","options":["color"],"media":[{"alt":null,"id":23893519269987,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e997bb5529b5da56d9d2cb7db4857e830fcaf42f_e7474b29-56b1-41e4-a13f-3dda3c6bda4e.webp?v=1714911840"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e997bb5529b5da56d9d2cb7db4857e830fcaf42f_e7474b29-56b1-41e4-a13f-3dda3c6bda4e.webp?v=1714911840","width":2000},{"alt":null,"id":23893519695971,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c91ed94eeddf6916b4538b227a46a79b9484c7a0_fd4b8f31-9d07-47dd-b190-452610915fa4.webp?v=1714911842"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c91ed94eeddf6916b4538b227a46a79b9484c7a0_fd4b8f31-9d07-47dd-b190-452610915fa4.webp?v=1714911842","width":2000},{"alt":null,"id":23893520351331,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40e8282fe895e1e6b33058ea79714d12bf5a7cdd_84bada3d-ee91-4792-8d66-dbefa8efd526.webp?v=1714911844"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40e8282fe895e1e6b33058ea79714d12bf5a7cdd_84bada3d-ee91-4792-8d66-dbefa8efd526.webp?v=1714911844","width":2000},{"alt":null,"id":23893520744547,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0dbeba26b03629f95a0d873550c41ace60317206_4e7f39c1-d116-4515-9238-78bab087fc65.webp?v=1714911846"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0dbeba26b03629f95a0d873550c41ace60317206_4e7f39c1-d116-4515-9238-78bab087fc65.webp?v=1714911846","width":2000},{"alt":null,"id":23893521268835,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ba074953c1621cde0c9cedf2433e79824331e5c_6a162c73-226a-456c-9624-a56172bb0889.webp?v=1714911848"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ba074953c1621cde0c9cedf2433e79824331e5c_6a162c73-226a-456c-9624-a56172bb0889.webp?v=1714911848","width":2000},{"alt":null,"id":23893522088035,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34134028229072c858dd7c6c98bf7a20e0ffb190_d9194983-32bf-46b2-a231-aca0ae8e8e96.webp?v=1714911851"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34134028229072c858dd7c6c98bf7a20e0ffb190_d9194983-32bf-46b2-a231-aca0ae8e8e96.webp?v=1714911851","width":2000},{"alt":null,"id":23893522546787,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/49051f7bb0de992ed4ed14fe519c036684d7e28c_356c13e5-8cad-4314-b6da-8707e51ed2ae.webp?v=1714911853"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/49051f7bb0de992ed4ed14fe519c036684d7e28c_356c13e5-8cad-4314-b6da-8707e51ed2ae.webp?v=1714911853","width":2000},{"alt":null,"id":23893523103843,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe6a0a8f6ae07d0ba91803e66eea238ba8ce617b_a2df37f5-1a5a-43f8-a395-ce8878984eb2.webp?v=1714911855"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe6a0a8f6ae07d0ba91803e66eea238ba8ce617b_a2df37f5-1a5a-43f8-a395-ce8878984eb2.webp?v=1714911855","width":2000},{"alt":null,"id":23893523497059,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/227ced13f14da51630690875f6d5de103e24aa22_8fe2835d-c193-400f-bdb7-44f680debe5f.webp?v=1714911857"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/227ced13f14da51630690875f6d5de103e24aa22_8fe2835d-c193-400f-bdb7-44f680debe5f.webp?v=1714911857","width":2000},{"alt":null,"id":23893523923043,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02888ed4e989c7862ed82caf2127f21e3f344829_a9102a39-57b2-48cd-ae1c-e93a010d4b62.webp?v=1714911860"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02888ed4e989c7862ed82caf2127f21e3f344829_a9102a39-57b2-48cd-ae1c-e93a010d4b62.webp?v=1714911860","width":2000},{"alt":null,"id":23893524447331,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02ce0b31caed0be107c94ca5b1b0eef19f6c1646_4b3f00e6-3c7b-46a6-8e71-269fc8a8c364.webp?v=1714911862"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02ce0b31caed0be107c94ca5b1b0eef19f6c1646_4b3f00e6-3c7b-46a6-8e71-269fc8a8c364.webp?v=1714911862","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911928946787,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB36","requires_shipping":true,"taxable":true,"featured_image":{"id":31488175669347,"product_id":7415105749091,"position":3,"created_at":"2024-05-05T20:24:04+08:00","updated_at":"2024-05-05T20:24:04+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40e8282fe895e1e6b33058ea79714d12bf5a7cdd_84bada3d-ee91-4792-8d66-dbefa8efd526.webp?v=1714911844","variant_ids":[41911928946787]},"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-PB36","featured_media":{"alt":null,"id":23893520351331,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40e8282fe895e1e6b33058ea79714d12bf5a7cdd_84bada3d-ee91-4792-8d66-dbefa8efd526.webp?v=1714911844"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911928946787,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB36","requires_shipping":true,"taxable":true,"featured_image":{"id":31488175669347,"product_id":7415105749091,"position":3,"created_at":"2024-05-05T20:24:04+08:00","updated_at":"2024-05-05T20:24:04+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40e8282fe895e1e6b33058ea79714d12bf5a7cdd_84bada3d-ee91-4792-8d66-dbefa8efd526.webp?v=1714911844","variant_ids":[41911928946787]},"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-PB36","featured_media":{"alt":null,"id":23893520351331,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40e8282fe895e1e6b33058ea79714d12bf5a7cdd_84bada3d-ee91-4792-8d66-dbefa8efd526.webp?v=1714911844"}},"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: "停產" }