$product = {"id":7414971400291,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 黑武士-潮流系列","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb49","description":null,"published_at":"2024-06-11T17:54:30+08:00","created_at":"2024-05-05T19:58:16+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":41910493544547,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB49","requires_shipping":true,"taxable":true,"featured_image":{"id":31487815778403,"product_id":7414971400291,"position":11,"created_at":"2024-05-05T19:58:42+08:00","updated_at":"2024-05-05T19:58:42+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45adc273aed18ba94fc9abffd9aa6240feb0619f_4bbd51d6-b061-4da4-bcab-8f6634fcbc31.webp?v=1714910322","variant_ids":[41910493544547]},"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-PB49","featured_media":{"alt":null,"id":23893159805027,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45adc273aed18ba94fc9abffd9aa6240feb0619f_4bbd51d6-b061-4da4-bcab-8f6634fcbc31.webp?v=1714910322"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9471afe44d7652953b543511029058548ad18b16_c3afb1d7-3b33-4175-8de5-4a52d8d1acd1.webp?v=1714910298","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e04589158a7c0ac93b98e70dad85b81268e55ff2_e37808d2-b680-4076-a464-fcb061c22671.webp?v=1714910301","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01ce8bc58e0dae67826cf85c54f2906cc25db0b9_72e98341-2d7d-4d23-8823-54d4df125124.webp?v=1714910303","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2867c69b82901274587116918fabeed0f141ca0_5fe61170-d19f-4b7f-8cec-c3dac18ff068.webp?v=1714910306","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5513a8d16c7b312ce3b9c86d9eb3f359f2a4a5c8_069e5ede-a06c-4b16-ab12-5a0fe40154df.webp?v=1714910308","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c09b591bd4a214bc609e11d6f2fe24b1a2c6cfb3_0e4923a4-4f0f-4bd6-8cd7-392092f54b97.webp?v=1714910310","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba436b662c5d6e70f9d1450b921b36c4d77f1cd3_24d3457b-e359-4a60-b301-5c0fb6fc6af3.webp?v=1714910313","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c477f65ce751040aabe67a9950854e6df29b8f3_c4f36be7-58c0-4dec-93dd-1bba33058cf1.webp?v=1714910315","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a8a19df4aa0ff12d1fb1deb30c6557dec3c93b3_dac7953f-bb42-4777-9265-80b50cca903f.webp?v=1714910317","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03df3e5ab795f51ce8e90c818e47b05056132677_46282c01-5b7f-4bee-9b37-b6519453c3b1.webp?v=1714910320","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45adc273aed18ba94fc9abffd9aa6240feb0619f_4bbd51d6-b061-4da4-bcab-8f6634fcbc31.webp?v=1714910322"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9471afe44d7652953b543511029058548ad18b16_c3afb1d7-3b33-4175-8de5-4a52d8d1acd1.webp?v=1714910298","options":["color"],"media":[{"alt":null,"id":23893154791523,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9471afe44d7652953b543511029058548ad18b16_c3afb1d7-3b33-4175-8de5-4a52d8d1acd1.webp?v=1714910298"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9471afe44d7652953b543511029058548ad18b16_c3afb1d7-3b33-4175-8de5-4a52d8d1acd1.webp?v=1714910298","width":2000},{"alt":null,"id":23893155217507,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e04589158a7c0ac93b98e70dad85b81268e55ff2_e37808d2-b680-4076-a464-fcb061c22671.webp?v=1714910301"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e04589158a7c0ac93b98e70dad85b81268e55ff2_e37808d2-b680-4076-a464-fcb061c22671.webp?v=1714910301","width":2000},{"alt":null,"id":23893155676259,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01ce8bc58e0dae67826cf85c54f2906cc25db0b9_72e98341-2d7d-4d23-8823-54d4df125124.webp?v=1714910303"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01ce8bc58e0dae67826cf85c54f2906cc25db0b9_72e98341-2d7d-4d23-8823-54d4df125124.webp?v=1714910303","width":2000},{"alt":null,"id":23893156135011,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2867c69b82901274587116918fabeed0f141ca0_5fe61170-d19f-4b7f-8cec-c3dac18ff068.webp?v=1714910306"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2867c69b82901274587116918fabeed0f141ca0_5fe61170-d19f-4b7f-8cec-c3dac18ff068.webp?v=1714910306","width":2000},{"alt":null,"id":23893156790371,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5513a8d16c7b312ce3b9c86d9eb3f359f2a4a5c8_069e5ede-a06c-4b16-ab12-5a0fe40154df.webp?v=1714910308"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5513a8d16c7b312ce3b9c86d9eb3f359f2a4a5c8_069e5ede-a06c-4b16-ab12-5a0fe40154df.webp?v=1714910308","width":2000},{"alt":null,"id":23893157118051,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c09b591bd4a214bc609e11d6f2fe24b1a2c6cfb3_0e4923a4-4f0f-4bd6-8cd7-392092f54b97.webp?v=1714910310"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c09b591bd4a214bc609e11d6f2fe24b1a2c6cfb3_0e4923a4-4f0f-4bd6-8cd7-392092f54b97.webp?v=1714910310","width":2000},{"alt":null,"id":23893157642339,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba436b662c5d6e70f9d1450b921b36c4d77f1cd3_24d3457b-e359-4a60-b301-5c0fb6fc6af3.webp?v=1714910313"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba436b662c5d6e70f9d1450b921b36c4d77f1cd3_24d3457b-e359-4a60-b301-5c0fb6fc6af3.webp?v=1714910313","width":2000},{"alt":null,"id":23893158101091,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c477f65ce751040aabe67a9950854e6df29b8f3_c4f36be7-58c0-4dec-93dd-1bba33058cf1.webp?v=1714910315"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c477f65ce751040aabe67a9950854e6df29b8f3_c4f36be7-58c0-4dec-93dd-1bba33058cf1.webp?v=1714910315","width":2000},{"alt":null,"id":23893158723683,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a8a19df4aa0ff12d1fb1deb30c6557dec3c93b3_dac7953f-bb42-4777-9265-80b50cca903f.webp?v=1714910317"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a8a19df4aa0ff12d1fb1deb30c6557dec3c93b3_dac7953f-bb42-4777-9265-80b50cca903f.webp?v=1714910317","width":2000},{"alt":null,"id":23893159379043,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03df3e5ab795f51ce8e90c818e47b05056132677_46282c01-5b7f-4bee-9b37-b6519453c3b1.webp?v=1714910320"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03df3e5ab795f51ce8e90c818e47b05056132677_46282c01-5b7f-4bee-9b37-b6519453c3b1.webp?v=1714910320","width":2000},{"alt":null,"id":23893159805027,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45adc273aed18ba94fc9abffd9aa6240feb0619f_4bbd51d6-b061-4da4-bcab-8f6634fcbc31.webp?v=1714910322"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45adc273aed18ba94fc9abffd9aa6240feb0619f_4bbd51d6-b061-4da4-bcab-8f6634fcbc31.webp?v=1714910322","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910493544547,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB49","requires_shipping":true,"taxable":true,"featured_image":{"id":31487815778403,"product_id":7414971400291,"position":11,"created_at":"2024-05-05T19:58:42+08:00","updated_at":"2024-05-05T19:58:42+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45adc273aed18ba94fc9abffd9aa6240feb0619f_4bbd51d6-b061-4da4-bcab-8f6634fcbc31.webp?v=1714910322","variant_ids":[41910493544547]},"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-PB49","featured_media":{"alt":null,"id":23893159805027,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45adc273aed18ba94fc9abffd9aa6240feb0619f_4bbd51d6-b061-4da4-bcab-8f6634fcbc31.webp?v=1714910322"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910493544547,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB49","requires_shipping":true,"taxable":true,"featured_image":{"id":31487815778403,"product_id":7414971400291,"position":11,"created_at":"2024-05-05T19:58:42+08:00","updated_at":"2024-05-05T19:58:42+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45adc273aed18ba94fc9abffd9aa6240feb0619f_4bbd51d6-b061-4da4-bcab-8f6634fcbc31.webp?v=1714910322","variant_ids":[41910493544547]},"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-PB49","featured_media":{"alt":null,"id":23893159805027,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45adc273aed18ba94fc9abffd9aa6240feb0619f_4bbd51d6-b061-4da4-bcab-8f6634fcbc31.webp?v=1714910322"}},"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: "停產" }