$product = {"id":7411219759203,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Care Bears - Funshine Bear","handle":"iphone-14-plus-mod-nx-magsafe-printable-yb06","description":null,"published_at":"2024-06-11T17:39:06+08:00","created_at":"2024-05-04T23:47:50+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":41896145780835,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-YB06","requires_shipping":true,"taxable":true,"featured_image":{"id":31479881859171,"product_id":7411219759203,"position":5,"created_at":"2024-05-04T23:48:01+08:00","updated_at":"2024-05-04T23:48:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f050714bdf8332345403b347b88f2b229c923288_677ddbbc-b048-4378-b577-c143c3b29dcb.webp?v=1714837681","variant_ids":[41896145780835]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Care Bears - Funshine 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-YB06","featured_media":{"alt":null,"id":23885132300387,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f050714bdf8332345403b347b88f2b229c923288_677ddbbc-b048-4378-b577-c143c3b29dcb.webp?v=1714837681"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9187455cf564f13a371844ed3b9db3ec84fc26a1_bea98cf1-bb10-460d-8e9a-aff7a8dda682.webp?v=1714837672","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bec2ffceacc89f33c5e65907cfacd0fa239461d_91fe745a-ecf8-4f5f-9656-145ef5accab6.webp?v=1714837674","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/628d51356449b36b36018413f57005c61cee60d7_85c859eb-b869-4d4d-ac47-5aa9bd966605.webp?v=1714837677","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b5247a15fdc6ad6412ea55d38afbb2f30375a39_50264755-c824-45e1-86d6-514ad07b3c59.webp?v=1714837679","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f050714bdf8332345403b347b88f2b229c923288_677ddbbc-b048-4378-b577-c143c3b29dcb.webp?v=1714837681","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57035a5d355223a3dab53c9649979feaff96211b_7f10eb04-3d3d-42ee-9c34-8d96ad3d9ca6.webp?v=1714837684","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b39352a3f4bcaf42b021a46748758120fcaaa05_6b9126c5-d22b-4361-b09c-6e635f409949.webp?v=1714837686","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/267d35eefd883d641d5e09e54124b0f3bdd6dddd_6a32079d-110f-4169-9c71-5de7da46d932.webp?v=1714837688","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a0ef5840bd9084d728a03991d25727d9b7a2d57_1e611e96-dd95-4b88-b3ed-61b0de1bfdbf.webp?v=1714837691","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7620a2b6e4f7c459ba911a3eb10698a38529c355_c35e5233-acc6-4588-8c61-8b1edbf17b03.webp?v=1714837693"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9187455cf564f13a371844ed3b9db3ec84fc26a1_bea98cf1-bb10-460d-8e9a-aff7a8dda682.webp?v=1714837672","options":["color"],"media":[{"alt":null,"id":23885130203235,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9187455cf564f13a371844ed3b9db3ec84fc26a1_bea98cf1-bb10-460d-8e9a-aff7a8dda682.webp?v=1714837672"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9187455cf564f13a371844ed3b9db3ec84fc26a1_bea98cf1-bb10-460d-8e9a-aff7a8dda682.webp?v=1714837672","width":2000},{"alt":null,"id":23885130661987,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bec2ffceacc89f33c5e65907cfacd0fa239461d_91fe745a-ecf8-4f5f-9656-145ef5accab6.webp?v=1714837674"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bec2ffceacc89f33c5e65907cfacd0fa239461d_91fe745a-ecf8-4f5f-9656-145ef5accab6.webp?v=1714837674","width":2000},{"alt":null,"id":23885131251811,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/628d51356449b36b36018413f57005c61cee60d7_85c859eb-b869-4d4d-ac47-5aa9bd966605.webp?v=1714837677"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/628d51356449b36b36018413f57005c61cee60d7_85c859eb-b869-4d4d-ac47-5aa9bd966605.webp?v=1714837677","width":2000},{"alt":null,"id":23885131743331,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b5247a15fdc6ad6412ea55d38afbb2f30375a39_50264755-c824-45e1-86d6-514ad07b3c59.webp?v=1714837679"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b5247a15fdc6ad6412ea55d38afbb2f30375a39_50264755-c824-45e1-86d6-514ad07b3c59.webp?v=1714837679","width":2000},{"alt":null,"id":23885132300387,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f050714bdf8332345403b347b88f2b229c923288_677ddbbc-b048-4378-b577-c143c3b29dcb.webp?v=1714837681"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f050714bdf8332345403b347b88f2b229c923288_677ddbbc-b048-4378-b577-c143c3b29dcb.webp?v=1714837681","width":2000},{"alt":null,"id":23885132693603,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57035a5d355223a3dab53c9649979feaff96211b_7f10eb04-3d3d-42ee-9c34-8d96ad3d9ca6.webp?v=1714837684"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57035a5d355223a3dab53c9649979feaff96211b_7f10eb04-3d3d-42ee-9c34-8d96ad3d9ca6.webp?v=1714837684","width":2000},{"alt":null,"id":23885133250659,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b39352a3f4bcaf42b021a46748758120fcaaa05_6b9126c5-d22b-4361-b09c-6e635f409949.webp?v=1714837686"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b39352a3f4bcaf42b021a46748758120fcaaa05_6b9126c5-d22b-4361-b09c-6e635f409949.webp?v=1714837686","width":2000},{"alt":null,"id":23885133643875,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/267d35eefd883d641d5e09e54124b0f3bdd6dddd_6a32079d-110f-4169-9c71-5de7da46d932.webp?v=1714837688"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/267d35eefd883d641d5e09e54124b0f3bdd6dddd_6a32079d-110f-4169-9c71-5de7da46d932.webp?v=1714837688","width":2000},{"alt":null,"id":23885134102627,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a0ef5840bd9084d728a03991d25727d9b7a2d57_1e611e96-dd95-4b88-b3ed-61b0de1bfdbf.webp?v=1714837691"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a0ef5840bd9084d728a03991d25727d9b7a2d57_1e611e96-dd95-4b88-b3ed-61b0de1bfdbf.webp?v=1714837691","width":2000},{"alt":null,"id":23885134561379,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7620a2b6e4f7c459ba911a3eb10698a38529c355_c35e5233-acc6-4588-8c61-8b1edbf17b03.webp?v=1714837693"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7620a2b6e4f7c459ba911a3eb10698a38529c355_c35e5233-acc6-4588-8c61-8b1edbf17b03.webp?v=1714837693","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41896145780835,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-YB06","requires_shipping":true,"taxable":true,"featured_image":{"id":31479881859171,"product_id":7411219759203,"position":5,"created_at":"2024-05-04T23:48:01+08:00","updated_at":"2024-05-04T23:48:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f050714bdf8332345403b347b88f2b229c923288_677ddbbc-b048-4378-b577-c143c3b29dcb.webp?v=1714837681","variant_ids":[41896145780835]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Care Bears - Funshine 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-YB06","featured_media":{"alt":null,"id":23885132300387,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f050714bdf8332345403b347b88f2b229c923288_677ddbbc-b048-4378-b577-c143c3b29dcb.webp?v=1714837681"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41896145780835,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-YB06","requires_shipping":true,"taxable":true,"featured_image":{"id":31479881859171,"product_id":7411219759203,"position":5,"created_at":"2024-05-04T23:48:01+08:00","updated_at":"2024-05-04T23:48:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f050714bdf8332345403b347b88f2b229c923288_677ddbbc-b048-4378-b577-c143c3b29dcb.webp?v=1714837681","variant_ids":[41896145780835]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Care Bears - Funshine 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-YB06","featured_media":{"alt":null,"id":23885132300387,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f050714bdf8332345403b347b88f2b229c923288_677ddbbc-b048-4378-b577-c143c3b29dcb.webp?v=1714837681"}},"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: "停產" }