$product = {"id":7414960521315,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Care Bears - Funshine Bear","handle":"iphone-12-mini-mod-nx-magsafe-printable-yb06","description":null,"published_at":"2024-06-11T17:54:12+08:00","created_at":"2024-05-05T19:56:18+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 12 mini","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":41910375579747,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-YB06","requires_shipping":true,"taxable":true,"featured_image":{"id":31487786319971,"product_id":7414960521315,"position":8,"created_at":"2024-05-05T19:56:37+08:00","updated_at":"2024-05-05T19:56:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c4f3a16ae7ef5b1d3dda1c43745223d7939d409_4ed424ad-623d-4529-8470-2c5411c488f2.webp?v=1714910197","variant_ids":[41910375579747]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 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":"MPB0118424-YB06","featured_media":{"alt":null,"id":23893130313827,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c4f3a16ae7ef5b1d3dda1c43745223d7939d409_4ed424ad-623d-4529-8470-2c5411c488f2.webp?v=1714910197"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34b6a4e3f49a2e4207e1ab4c294f8a9101288627_cb1ad22b-038d-495c-878e-2778e23aa4ad.webp?v=1714910180","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dabb15b4956176c2952bc0ecfad4aaf1a0fbff59_8476f2b1-8526-487f-894a-04ff6eda4c58.webp?v=1714910183","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/923b670aed3bec7a11aafbc17305796a1a80b3f7_b031451e-71cb-4704-bcbb-b5c8da54eab7.webp?v=1714910185","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf487477e5a1397a298c00ab695d7bb0ce5fcb59_ea7d1b5e-bb7b-4633-a12c-a69596f10733.webp?v=1714910188","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43bcb44105967fc2bc7e2a81b29013be3f8a0ba3_ae1e2977-d022-46ec-8384-b8f9fe55f179.webp?v=1714910190","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52648a642a1cce3da73f0653b920679d9b309e42_61b2f102-2d70-44fb-8041-f0c23874b223.webp?v=1714910192","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd3143b9309507a5fd3756a5726286e262b45507_0d71b29c-7388-4e32-ac9e-fa1c23fe681b.webp?v=1714910195","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c4f3a16ae7ef5b1d3dda1c43745223d7939d409_4ed424ad-623d-4529-8470-2c5411c488f2.webp?v=1714910197","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6657b6db4f94f431a588b122d690f7032af781c_b1ef0dd0-51d4-4f5d-ba46-44f2ce2c33ac.webp?v=1714910199","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/24b61169b87e012fbdb70f67c1464f349f2cb4f1_565ecb80-ff21-4afa-91d5-32cc512e2971.webp?v=1714910201","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d787e410da97b30f299f12fb8d9999437f67214c_3e812241-6bc3-4b79-83c2-35f268f7b76c.webp?v=1714910204"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34b6a4e3f49a2e4207e1ab4c294f8a9101288627_cb1ad22b-038d-495c-878e-2778e23aa4ad.webp?v=1714910180","options":["color"],"media":[{"alt":null,"id":23893126545507,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34b6a4e3f49a2e4207e1ab4c294f8a9101288627_cb1ad22b-038d-495c-878e-2778e23aa4ad.webp?v=1714910180"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34b6a4e3f49a2e4207e1ab4c294f8a9101288627_cb1ad22b-038d-495c-878e-2778e23aa4ad.webp?v=1714910180","width":2000},{"alt":null,"id":23893127037027,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dabb15b4956176c2952bc0ecfad4aaf1a0fbff59_8476f2b1-8526-487f-894a-04ff6eda4c58.webp?v=1714910183"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dabb15b4956176c2952bc0ecfad4aaf1a0fbff59_8476f2b1-8526-487f-894a-04ff6eda4c58.webp?v=1714910183","width":2000},{"alt":null,"id":23893127463011,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/923b670aed3bec7a11aafbc17305796a1a80b3f7_b031451e-71cb-4704-bcbb-b5c8da54eab7.webp?v=1714910185"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/923b670aed3bec7a11aafbc17305796a1a80b3f7_b031451e-71cb-4704-bcbb-b5c8da54eab7.webp?v=1714910185","width":2000},{"alt":null,"id":23893127888995,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf487477e5a1397a298c00ab695d7bb0ce5fcb59_ea7d1b5e-bb7b-4633-a12c-a69596f10733.webp?v=1714910188"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf487477e5a1397a298c00ab695d7bb0ce5fcb59_ea7d1b5e-bb7b-4633-a12c-a69596f10733.webp?v=1714910188","width":2000},{"alt":null,"id":23893128577123,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43bcb44105967fc2bc7e2a81b29013be3f8a0ba3_ae1e2977-d022-46ec-8384-b8f9fe55f179.webp?v=1714910190"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43bcb44105967fc2bc7e2a81b29013be3f8a0ba3_ae1e2977-d022-46ec-8384-b8f9fe55f179.webp?v=1714910190","width":2000},{"alt":null,"id":23893129232483,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52648a642a1cce3da73f0653b920679d9b309e42_61b2f102-2d70-44fb-8041-f0c23874b223.webp?v=1714910192"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52648a642a1cce3da73f0653b920679d9b309e42_61b2f102-2d70-44fb-8041-f0c23874b223.webp?v=1714910192","width":2000},{"alt":null,"id":23893129953379,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd3143b9309507a5fd3756a5726286e262b45507_0d71b29c-7388-4e32-ac9e-fa1c23fe681b.webp?v=1714910195"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd3143b9309507a5fd3756a5726286e262b45507_0d71b29c-7388-4e32-ac9e-fa1c23fe681b.webp?v=1714910195","width":2000},{"alt":null,"id":23893130313827,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c4f3a16ae7ef5b1d3dda1c43745223d7939d409_4ed424ad-623d-4529-8470-2c5411c488f2.webp?v=1714910197"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c4f3a16ae7ef5b1d3dda1c43745223d7939d409_4ed424ad-623d-4529-8470-2c5411c488f2.webp?v=1714910197","width":2000},{"alt":null,"id":23893130838115,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6657b6db4f94f431a588b122d690f7032af781c_b1ef0dd0-51d4-4f5d-ba46-44f2ce2c33ac.webp?v=1714910199"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6657b6db4f94f431a588b122d690f7032af781c_b1ef0dd0-51d4-4f5d-ba46-44f2ce2c33ac.webp?v=1714910199","width":2000},{"alt":null,"id":23893131198563,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/24b61169b87e012fbdb70f67c1464f349f2cb4f1_565ecb80-ff21-4afa-91d5-32cc512e2971.webp?v=1714910201"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/24b61169b87e012fbdb70f67c1464f349f2cb4f1_565ecb80-ff21-4afa-91d5-32cc512e2971.webp?v=1714910201","width":2000},{"alt":null,"id":23893131755619,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d787e410da97b30f299f12fb8d9999437f67214c_3e812241-6bc3-4b79-83c2-35f268f7b76c.webp?v=1714910204"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d787e410da97b30f299f12fb8d9999437f67214c_3e812241-6bc3-4b79-83c2-35f268f7b76c.webp?v=1714910204","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910375579747,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-YB06","requires_shipping":true,"taxable":true,"featured_image":{"id":31487786319971,"product_id":7414960521315,"position":8,"created_at":"2024-05-05T19:56:37+08:00","updated_at":"2024-05-05T19:56:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c4f3a16ae7ef5b1d3dda1c43745223d7939d409_4ed424ad-623d-4529-8470-2c5411c488f2.webp?v=1714910197","variant_ids":[41910375579747]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 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":"MPB0118424-YB06","featured_media":{"alt":null,"id":23893130313827,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c4f3a16ae7ef5b1d3dda1c43745223d7939d409_4ed424ad-623d-4529-8470-2c5411c488f2.webp?v=1714910197"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910375579747,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-YB06","requires_shipping":true,"taxable":true,"featured_image":{"id":31487786319971,"product_id":7414960521315,"position":8,"created_at":"2024-05-05T19:56:37+08:00","updated_at":"2024-05-05T19:56:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c4f3a16ae7ef5b1d3dda1c43745223d7939d409_4ed424ad-623d-4529-8470-2c5411c488f2.webp?v=1714910197","variant_ids":[41910375579747]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 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":"MPB0118424-YB06","featured_media":{"alt":null,"id":23893130313827,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c4f3a16ae7ef5b1d3dda1c43745223d7939d409_4ed424ad-623d-4529-8470-2c5411c488f2.webp?v=1714910197"}},"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: "停產" }