$product = {"id":7414965207139,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Care Bears - 雨愛灌溉","handle":"iphone-12-mini-mod-nx-magsafe-printable-yb08","description":null,"published_at":"2024-06-11T17:54:19+08:00","created_at":"2024-05-05T19:57:06+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":41910431154275,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-YB08","requires_shipping":true,"taxable":true,"featured_image":{"id":31487797821539,"product_id":7414965207139,"position":10,"created_at":"2024-05-05T19:57:29+08:00","updated_at":"2024-05-05T19:57:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43cdda915c929fb5990b6638cc0515d6339718e5_bae692f7-833b-40dc-b253-949b53ff93de.webp?v=1714910249","variant_ids":[41910431154275]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Care Bears - 雨愛灌溉 - 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-YB08","featured_media":{"alt":null,"id":23893141848163,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43cdda915c929fb5990b6638cc0515d6339718e5_bae692f7-833b-40dc-b253-949b53ff93de.webp?v=1714910249"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c36bcc9c4fe84da092c37f581e2ba4fc2f5517b5_7251e353-bf26-4104-9b0a-ab5b2720587e.webp?v=1714910228","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8094bcb1cd9a6b1f556633358f6fee90b7f00276_8f601561-234c-492d-aebf-4477d8a7cab3.webp?v=1714910231","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62a0fb2a28cc926a837020177f6bd3d56785919e_f32a3ad6-0bb0-4e1b-8ed6-16b97ffc9bf2.webp?v=1714910233","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/682cef366314e8876dc68d5d595e8bb485ea9258_6a865437-6ee7-46c7-8363-1e95174a4df7.webp?v=1714910235","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f06a04ff83adf09f6f2fae803b3bea0b25885d1a_3c40dffd-f5c4-403e-b16d-a4813f731277.webp?v=1714910238","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b44b57b24b072cdedb419ca54b5e03e9dabe6600_c1f69680-f41e-4d73-837e-884529e3f192.webp?v=1714910240","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b689f602a41d1eea94f8880a31e15d9e72467791_df7992e6-3de6-41aa-8a2a-f9312e0d000b.webp?v=1714910243","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1209b11e6e3c6fd4653c5511d5505c8956a08eee_9c7b7c2f-dd6f-4293-9845-7f19beff5abc.webp?v=1714910245","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d5bea9dc9556c69420a57dde2999ebf9c7accd2_93062d5d-0a14-48f2-997d-553ef6c4e29c.webp?v=1714910247","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43cdda915c929fb5990b6638cc0515d6339718e5_bae692f7-833b-40dc-b253-949b53ff93de.webp?v=1714910249","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f04c2ab04a24c8f54989a7c07b6901f8645f9d79_d732d445-623e-487f-8b44-ded5fbf6e1da.webp?v=1714910252"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c36bcc9c4fe84da092c37f581e2ba4fc2f5517b5_7251e353-bf26-4104-9b0a-ab5b2720587e.webp?v=1714910228","options":["color"],"media":[{"alt":null,"id":23893137358947,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c36bcc9c4fe84da092c37f581e2ba4fc2f5517b5_7251e353-bf26-4104-9b0a-ab5b2720587e.webp?v=1714910228"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c36bcc9c4fe84da092c37f581e2ba4fc2f5517b5_7251e353-bf26-4104-9b0a-ab5b2720587e.webp?v=1714910228","width":2000},{"alt":null,"id":23893137752163,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8094bcb1cd9a6b1f556633358f6fee90b7f00276_8f601561-234c-492d-aebf-4477d8a7cab3.webp?v=1714910231"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8094bcb1cd9a6b1f556633358f6fee90b7f00276_8f601561-234c-492d-aebf-4477d8a7cab3.webp?v=1714910231","width":2000},{"alt":null,"id":23893138276451,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62a0fb2a28cc926a837020177f6bd3d56785919e_f32a3ad6-0bb0-4e1b-8ed6-16b97ffc9bf2.webp?v=1714910233"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62a0fb2a28cc926a837020177f6bd3d56785919e_f32a3ad6-0bb0-4e1b-8ed6-16b97ffc9bf2.webp?v=1714910233","width":2000},{"alt":null,"id":23893139062883,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/682cef366314e8876dc68d5d595e8bb485ea9258_6a865437-6ee7-46c7-8363-1e95174a4df7.webp?v=1714910235"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/682cef366314e8876dc68d5d595e8bb485ea9258_6a865437-6ee7-46c7-8363-1e95174a4df7.webp?v=1714910235","width":2000},{"alt":null,"id":23893139554403,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f06a04ff83adf09f6f2fae803b3bea0b25885d1a_3c40dffd-f5c4-403e-b16d-a4813f731277.webp?v=1714910238"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f06a04ff83adf09f6f2fae803b3bea0b25885d1a_3c40dffd-f5c4-403e-b16d-a4813f731277.webp?v=1714910238","width":2000},{"alt":null,"id":23893139914851,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b44b57b24b072cdedb419ca54b5e03e9dabe6600_c1f69680-f41e-4d73-837e-884529e3f192.webp?v=1714910240"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b44b57b24b072cdedb419ca54b5e03e9dabe6600_c1f69680-f41e-4d73-837e-884529e3f192.webp?v=1714910240","width":2000},{"alt":null,"id":23893140504675,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b689f602a41d1eea94f8880a31e15d9e72467791_df7992e6-3de6-41aa-8a2a-f9312e0d000b.webp?v=1714910243"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b689f602a41d1eea94f8880a31e15d9e72467791_df7992e6-3de6-41aa-8a2a-f9312e0d000b.webp?v=1714910243","width":2000},{"alt":null,"id":23893140963427,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1209b11e6e3c6fd4653c5511d5505c8956a08eee_9c7b7c2f-dd6f-4293-9845-7f19beff5abc.webp?v=1714910245"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1209b11e6e3c6fd4653c5511d5505c8956a08eee_9c7b7c2f-dd6f-4293-9845-7f19beff5abc.webp?v=1714910245","width":2000},{"alt":null,"id":23893141422179,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d5bea9dc9556c69420a57dde2999ebf9c7accd2_93062d5d-0a14-48f2-997d-553ef6c4e29c.webp?v=1714910247"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d5bea9dc9556c69420a57dde2999ebf9c7accd2_93062d5d-0a14-48f2-997d-553ef6c4e29c.webp?v=1714910247","width":2000},{"alt":null,"id":23893141848163,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43cdda915c929fb5990b6638cc0515d6339718e5_bae692f7-833b-40dc-b253-949b53ff93de.webp?v=1714910249"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43cdda915c929fb5990b6638cc0515d6339718e5_bae692f7-833b-40dc-b253-949b53ff93de.webp?v=1714910249","width":2000},{"alt":null,"id":23893142437987,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f04c2ab04a24c8f54989a7c07b6901f8645f9d79_d732d445-623e-487f-8b44-ded5fbf6e1da.webp?v=1714910252"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f04c2ab04a24c8f54989a7c07b6901f8645f9d79_d732d445-623e-487f-8b44-ded5fbf6e1da.webp?v=1714910252","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910431154275,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-YB08","requires_shipping":true,"taxable":true,"featured_image":{"id":31487797821539,"product_id":7414965207139,"position":10,"created_at":"2024-05-05T19:57:29+08:00","updated_at":"2024-05-05T19:57:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43cdda915c929fb5990b6638cc0515d6339718e5_bae692f7-833b-40dc-b253-949b53ff93de.webp?v=1714910249","variant_ids":[41910431154275]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Care Bears - 雨愛灌溉 - 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-YB08","featured_media":{"alt":null,"id":23893141848163,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43cdda915c929fb5990b6638cc0515d6339718e5_bae692f7-833b-40dc-b253-949b53ff93de.webp?v=1714910249"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910431154275,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-YB08","requires_shipping":true,"taxable":true,"featured_image":{"id":31487797821539,"product_id":7414965207139,"position":10,"created_at":"2024-05-05T19:57:29+08:00","updated_at":"2024-05-05T19:57:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43cdda915c929fb5990b6638cc0515d6339718e5_bae692f7-833b-40dc-b253-949b53ff93de.webp?v=1714910249","variant_ids":[41910431154275]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Care Bears - 雨愛灌溉 - 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-YB08","featured_media":{"alt":null,"id":23893141848163,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43cdda915c929fb5990b6638cc0515d6339718e5_bae692f7-833b-40dc-b253-949b53ff93de.webp?v=1714910249"}},"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: "停產" }