$product = {"id":7411302334563,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Care Bears - Best Friend Bear","handle":"iphone-14-plus-mod-nx-magsafe-printable-yb02","description":null,"published_at":"2024-06-11T17:41:16+08:00","created_at":"2024-05-05T00:03:31+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Care Bears","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-carebears","device-iPhone 14 Plus","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-carebears","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":41897176629347,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-YB02","requires_shipping":true,"taxable":true,"featured_image":{"id":31480088887395,"product_id":7411302334563,"position":3,"created_at":"2024-05-05T00:03:38+08:00","updated_at":"2024-05-05T00:03:38+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e49e76aa649020ba2df53cad02eb8fdb46d8b8d_cde095f3-7037-4564-b289-ae134f7e2f12.webp?v=1714838618","variant_ids":[41897176629347]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Care Bears - Best Friend Bear - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126124-YB02","featured_media":{"alt":null,"id":23885339689059,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e49e76aa649020ba2df53cad02eb8fdb46d8b8d_cde095f3-7037-4564-b289-ae134f7e2f12.webp?v=1714838618"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68141b39e7bebc56ccd3faf3d848ea5c67c91fe7_11a62dc6-5271-4228-8b4e-802b05292726.webp?v=1714838614","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f1a1bbc0b5f6d7a2825c9729d326acfb6f533fe_57263f88-b552-4f0d-9aa0-6a9ec577f2b0.webp?v=1714838616","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e49e76aa649020ba2df53cad02eb8fdb46d8b8d_cde095f3-7037-4564-b289-ae134f7e2f12.webp?v=1714838618","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d78d0769201244c0382ab84791a92bb09ff8fb22_939ac0bc-d770-45b5-bb5f-00139a06f1ac.webp?v=1714838621","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2405b802425b98821a1cde7036719e8c98adf75_17370db8-113b-4b9a-96c4-9fdc3e1d5d37.webp?v=1714838623","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9926776bf681a0fe3470a981ff96d49e36a70d5d_5ff10329-390b-4575-937f-54059e6aec99.webp?v=1714838625","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3bb2549bba5bb1098c02f14ba68514399c928988_5baeb5b0-a2b3-41d6-af9f-0ff87e496a19.webp?v=1714838627","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8639fc538d0bf83909a519973db35643f63d594e_393e5034-8c98-43bf-bb0e-daae8ba27823.webp?v=1714838630","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/549a559a89a0cf327b1b661e09bfbc418973c776_96d3f25a-eeb5-406a-aced-4e19d0204aa4.webp?v=1714838632","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e70ade674cec257544cf46883e9885348761e73c_82ef8fdf-2cad-4258-893f-d3feaf61e726.webp?v=1714838635"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68141b39e7bebc56ccd3faf3d848ea5c67c91fe7_11a62dc6-5271-4228-8b4e-802b05292726.webp?v=1714838614","options":["color"],"media":[{"alt":null,"id":23885338443875,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68141b39e7bebc56ccd3faf3d848ea5c67c91fe7_11a62dc6-5271-4228-8b4e-802b05292726.webp?v=1714838614"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68141b39e7bebc56ccd3faf3d848ea5c67c91fe7_11a62dc6-5271-4228-8b4e-802b05292726.webp?v=1714838614","width":2000},{"alt":null,"id":23885338968163,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f1a1bbc0b5f6d7a2825c9729d326acfb6f533fe_57263f88-b552-4f0d-9aa0-6a9ec577f2b0.webp?v=1714838616"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f1a1bbc0b5f6d7a2825c9729d326acfb6f533fe_57263f88-b552-4f0d-9aa0-6a9ec577f2b0.webp?v=1714838616","width":2000},{"alt":null,"id":23885339689059,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e49e76aa649020ba2df53cad02eb8fdb46d8b8d_cde095f3-7037-4564-b289-ae134f7e2f12.webp?v=1714838618"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e49e76aa649020ba2df53cad02eb8fdb46d8b8d_cde095f3-7037-4564-b289-ae134f7e2f12.webp?v=1714838618","width":2000},{"alt":null,"id":23885340311651,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d78d0769201244c0382ab84791a92bb09ff8fb22_939ac0bc-d770-45b5-bb5f-00139a06f1ac.webp?v=1714838621"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d78d0769201244c0382ab84791a92bb09ff8fb22_939ac0bc-d770-45b5-bb5f-00139a06f1ac.webp?v=1714838621","width":2000},{"alt":null,"id":23885340737635,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2405b802425b98821a1cde7036719e8c98adf75_17370db8-113b-4b9a-96c4-9fdc3e1d5d37.webp?v=1714838623"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2405b802425b98821a1cde7036719e8c98adf75_17370db8-113b-4b9a-96c4-9fdc3e1d5d37.webp?v=1714838623","width":2000},{"alt":null,"id":23885341229155,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9926776bf681a0fe3470a981ff96d49e36a70d5d_5ff10329-390b-4575-937f-54059e6aec99.webp?v=1714838625"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9926776bf681a0fe3470a981ff96d49e36a70d5d_5ff10329-390b-4575-937f-54059e6aec99.webp?v=1714838625","width":2000},{"alt":null,"id":23885341622371,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3bb2549bba5bb1098c02f14ba68514399c928988_5baeb5b0-a2b3-41d6-af9f-0ff87e496a19.webp?v=1714838627"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3bb2549bba5bb1098c02f14ba68514399c928988_5baeb5b0-a2b3-41d6-af9f-0ff87e496a19.webp?v=1714838627","width":2000},{"alt":null,"id":23885342670947,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8639fc538d0bf83909a519973db35643f63d594e_393e5034-8c98-43bf-bb0e-daae8ba27823.webp?v=1714838630"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8639fc538d0bf83909a519973db35643f63d594e_393e5034-8c98-43bf-bb0e-daae8ba27823.webp?v=1714838630","width":2000},{"alt":null,"id":23885343129699,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/549a559a89a0cf327b1b661e09bfbc418973c776_96d3f25a-eeb5-406a-aced-4e19d0204aa4.webp?v=1714838632"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/549a559a89a0cf327b1b661e09bfbc418973c776_96d3f25a-eeb5-406a-aced-4e19d0204aa4.webp?v=1714838632","width":2000},{"alt":null,"id":23885343621219,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e70ade674cec257544cf46883e9885348761e73c_82ef8fdf-2cad-4258-893f-d3feaf61e726.webp?v=1714838635"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e70ade674cec257544cf46883e9885348761e73c_82ef8fdf-2cad-4258-893f-d3feaf61e726.webp?v=1714838635","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41897176629347,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-YB02","requires_shipping":true,"taxable":true,"featured_image":{"id":31480088887395,"product_id":7411302334563,"position":3,"created_at":"2024-05-05T00:03:38+08:00","updated_at":"2024-05-05T00:03:38+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e49e76aa649020ba2df53cad02eb8fdb46d8b8d_cde095f3-7037-4564-b289-ae134f7e2f12.webp?v=1714838618","variant_ids":[41897176629347]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Care Bears - Best Friend Bear - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126124-YB02","featured_media":{"alt":null,"id":23885339689059,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e49e76aa649020ba2df53cad02eb8fdb46d8b8d_cde095f3-7037-4564-b289-ae134f7e2f12.webp?v=1714838618"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41897176629347,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-YB02","requires_shipping":true,"taxable":true,"featured_image":{"id":31480088887395,"product_id":7411302334563,"position":3,"created_at":"2024-05-05T00:03:38+08:00","updated_at":"2024-05-05T00:03:38+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e49e76aa649020ba2df53cad02eb8fdb46d8b8d_cde095f3-7037-4564-b289-ae134f7e2f12.webp?v=1714838618","variant_ids":[41897176629347]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Care Bears - Best Friend Bear - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126124-YB02","featured_media":{"alt":null,"id":23885339689059,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e49e76aa649020ba2df53cad02eb8fdb46d8b8d_cde095f3-7037-4564-b289-ae134f7e2f12.webp?v=1714838618"}},"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: "停產" }