$product = {"id":7411365937251,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 迪士尼-星際大戰 Star Wars - K2SO 1-俠盜一號","handle":"iphone-14-plus-mod-nx-magsafe-printable-pb68","description":null,"published_at":"2024-06-11T17:43:00+08:00","created_at":"2024-05-05T00:15:41+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 14 Plus","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":41897981083747,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-PB68","requires_shipping":true,"taxable":true,"featured_image":{"id":31480239784035,"product_id":7411365937251,"position":2,"created_at":"2024-05-05T00:15:45+08:00","updated_at":"2024-05-05T00:15:45+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84099fcf5d410849a6b22e0ee70d870a8e981d39_6de86fe4-760e-47fd-83fe-12237e376d0b.webp?v=1714839345","variant_ids":[41897981083747]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 迪士尼-星際大戰 Star Wars - K2SO 1-俠盜一號 - 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":"MPB0126124-PB68","featured_media":{"alt":null,"id":23885490978915,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84099fcf5d410849a6b22e0ee70d870a8e981d39_6de86fe4-760e-47fd-83fe-12237e376d0b.webp?v=1714839345"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/233ef34ecf29ab5ad4e71195cc5c575bdc1c8570_e96454bf-2876-4dea-8dee-d8a87417c68d.webp?v=1714839343","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84099fcf5d410849a6b22e0ee70d870a8e981d39_6de86fe4-760e-47fd-83fe-12237e376d0b.webp?v=1714839345","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c4e983b4c0b870eee274ab319607b0af9c023f4_fab5ab02-3577-4802-a987-45667f850d35.webp?v=1714839348","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3369946cfff7e3e557477e0d31e4a322f12f978_fefbcee4-6ef2-4b97-8b51-4c5668c7a1fe.webp?v=1714839350","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa6b3335f80b09966fbf5daffed96d11e1a92517_bc2a7bb8-0423-4306-88d9-7549925f2bfd.webp?v=1714839352","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5627b1e4f50b41d5a9328f2077a383e13c472a3c_fc41c42d-9024-4f4a-84df-6d65d84613c3.webp?v=1714839354","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4ee6b010fdf5c92790b21a7c3453f1fa5a58ef10_6734d6fe-a7c2-4f54-86ae-594307cba1f8.webp?v=1714839357","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb3d7f12620f30fc16447f61d97ec413bf26cc55_a395536d-8373-4655-8f96-a304346793ef.webp?v=1714839359","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3cb6652cb5bc6ece8ab537c5cd8c46192bf971d_25df67d9-bb5d-4eb3-8ce6-6e51c78083a9.webp?v=1714839361","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3b2de7c7ff91fee93dea9bb8bf5bbd16e2c21b9_ae6ad4f5-0520-4331-9762-617c261a3788.webp?v=1714839363"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/233ef34ecf29ab5ad4e71195cc5c575bdc1c8570_e96454bf-2876-4dea-8dee-d8a87417c68d.webp?v=1714839343","options":["color"],"media":[{"alt":null,"id":23885490552931,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/233ef34ecf29ab5ad4e71195cc5c575bdc1c8570_e96454bf-2876-4dea-8dee-d8a87417c68d.webp?v=1714839343"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/233ef34ecf29ab5ad4e71195cc5c575bdc1c8570_e96454bf-2876-4dea-8dee-d8a87417c68d.webp?v=1714839343","width":2000},{"alt":null,"id":23885490978915,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84099fcf5d410849a6b22e0ee70d870a8e981d39_6de86fe4-760e-47fd-83fe-12237e376d0b.webp?v=1714839345"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84099fcf5d410849a6b22e0ee70d870a8e981d39_6de86fe4-760e-47fd-83fe-12237e376d0b.webp?v=1714839345","width":2000},{"alt":null,"id":23885491634275,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c4e983b4c0b870eee274ab319607b0af9c023f4_fab5ab02-3577-4802-a987-45667f850d35.webp?v=1714839348"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c4e983b4c0b870eee274ab319607b0af9c023f4_fab5ab02-3577-4802-a987-45667f850d35.webp?v=1714839348","width":2000},{"alt":null,"id":23885491994723,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3369946cfff7e3e557477e0d31e4a322f12f978_fefbcee4-6ef2-4b97-8b51-4c5668c7a1fe.webp?v=1714839350"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3369946cfff7e3e557477e0d31e4a322f12f978_fefbcee4-6ef2-4b97-8b51-4c5668c7a1fe.webp?v=1714839350","width":2000},{"alt":null,"id":23885492453475,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa6b3335f80b09966fbf5daffed96d11e1a92517_bc2a7bb8-0423-4306-88d9-7549925f2bfd.webp?v=1714839352"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa6b3335f80b09966fbf5daffed96d11e1a92517_bc2a7bb8-0423-4306-88d9-7549925f2bfd.webp?v=1714839352","width":2000},{"alt":null,"id":23885493043299,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5627b1e4f50b41d5a9328f2077a383e13c472a3c_fc41c42d-9024-4f4a-84df-6d65d84613c3.webp?v=1714839354"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5627b1e4f50b41d5a9328f2077a383e13c472a3c_fc41c42d-9024-4f4a-84df-6d65d84613c3.webp?v=1714839354","width":2000},{"alt":null,"id":23885493534819,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4ee6b010fdf5c92790b21a7c3453f1fa5a58ef10_6734d6fe-a7c2-4f54-86ae-594307cba1f8.webp?v=1714839357"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4ee6b010fdf5c92790b21a7c3453f1fa5a58ef10_6734d6fe-a7c2-4f54-86ae-594307cba1f8.webp?v=1714839357","width":2000},{"alt":null,"id":23885493928035,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb3d7f12620f30fc16447f61d97ec413bf26cc55_a395536d-8373-4655-8f96-a304346793ef.webp?v=1714839359"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb3d7f12620f30fc16447f61d97ec413bf26cc55_a395536d-8373-4655-8f96-a304346793ef.webp?v=1714839359","width":2000},{"alt":null,"id":23885494550627,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3cb6652cb5bc6ece8ab537c5cd8c46192bf971d_25df67d9-bb5d-4eb3-8ce6-6e51c78083a9.webp?v=1714839361"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3cb6652cb5bc6ece8ab537c5cd8c46192bf971d_25df67d9-bb5d-4eb3-8ce6-6e51c78083a9.webp?v=1714839361","width":2000},{"alt":null,"id":23885495369827,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3b2de7c7ff91fee93dea9bb8bf5bbd16e2c21b9_ae6ad4f5-0520-4331-9762-617c261a3788.webp?v=1714839363"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3b2de7c7ff91fee93dea9bb8bf5bbd16e2c21b9_ae6ad4f5-0520-4331-9762-617c261a3788.webp?v=1714839363","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41897981083747,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-PB68","requires_shipping":true,"taxable":true,"featured_image":{"id":31480239784035,"product_id":7411365937251,"position":2,"created_at":"2024-05-05T00:15:45+08:00","updated_at":"2024-05-05T00:15:45+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84099fcf5d410849a6b22e0ee70d870a8e981d39_6de86fe4-760e-47fd-83fe-12237e376d0b.webp?v=1714839345","variant_ids":[41897981083747]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 迪士尼-星際大戰 Star Wars - K2SO 1-俠盜一號 - 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":"MPB0126124-PB68","featured_media":{"alt":null,"id":23885490978915,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84099fcf5d410849a6b22e0ee70d870a8e981d39_6de86fe4-760e-47fd-83fe-12237e376d0b.webp?v=1714839345"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41897981083747,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-PB68","requires_shipping":true,"taxable":true,"featured_image":{"id":31480239784035,"product_id":7411365937251,"position":2,"created_at":"2024-05-05T00:15:45+08:00","updated_at":"2024-05-05T00:15:45+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84099fcf5d410849a6b22e0ee70d870a8e981d39_6de86fe4-760e-47fd-83fe-12237e376d0b.webp?v=1714839345","variant_ids":[41897981083747]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 迪士尼-星際大戰 Star Wars - K2SO 1-俠盜一號 - 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":"MPB0126124-PB68","featured_media":{"alt":null,"id":23885490978915,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84099fcf5d410849a6b22e0ee70d870a8e981d39_6de86fe4-760e-47fd-83fe-12237e376d0b.webp?v=1714839345"}},"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: "停產" }