$product = {"id":7415996940387,"title":"犀牛盾Mod NX手機殼 - iPhone XS - 【聯名設計款】 - Care Bears - 粉紫樂園","handle":"iphone-xs-mod-nx-printable-yb13","description":null,"published_at":"2024-06-11T16:49:59+08:00","created_at":"2024-05-06T12:39:18+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Care Bears","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-carebears","device-iPhone XS","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-carebears","Top50","type-Mod NX Printable"],"price":90000,"price_min":90000,"price_max":90000,"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":41916340928611,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108424-YB13","requires_shipping":true,"taxable":true,"featured_image":{"id":31490943778915,"product_id":7415996940387,"position":3,"created_at":"2024-05-06T12:39:25+08:00","updated_at":"2024-05-06T12:39:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/617b6bd51d7f9e24d4f847ee5ac56dc3843de819_29081df1-13de-4f60-afb0-bbcaace048c3.webp?v=1714970365","variant_ids":[41916340928611]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS - 【聯名設計款】 - Care Bears - 粉紫樂園 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108424-YB13","featured_media":{"alt":null,"id":23896351113315,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/617b6bd51d7f9e24d4f847ee5ac56dc3843de819_29081df1-13de-4f60-afb0-bbcaace048c3.webp?v=1714970365"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec00970b55a29d3fba5b08bc261022d9f228da66_f54d3a7c-c4e2-4c26-9b33-f20a8b4b15dc.webp?v=1714970361","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/82b1adb01f39031fa0daa112041461026a179f0f_e7464955-d645-4995-8752-db791a053669.webp?v=1714970363","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/617b6bd51d7f9e24d4f847ee5ac56dc3843de819_29081df1-13de-4f60-afb0-bbcaace048c3.webp?v=1714970365","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b601ab5d8b817a8d85ae12616507dcdfa1f1a86e_29442eea-baf9-4561-9846-6f6f66342559.webp?v=1714970368","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a915ce5511007623fa79d9130d420706a23d7022_c72ccb1a-6949-4684-a0b8-2c23044be76f.webp?v=1714970370","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a17e7f9ffaa6f7f06cac039292cbdf88d7c6860_1ccc5009-6039-4dcb-bb06-3555809bf401.webp?v=1714970373","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/035ee5027fcde29306c574e9d40e0b81a816ac41_94a33ea4-d4cb-4bf1-b647-de5cfddcbca4.webp?v=1714970375","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/93517821f745f5695b84a0d0082d684356cb9926_59b748df-3ed4-4582-ab10-a47c561fb736.webp?v=1714970378","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/19237e9792716a9b550f627fa31a47e8697d7a44_97a38167-4ad1-4705-9e9e-a338d6e3d234.webp?v=1714970381","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fe00e232ab17e2b7de89b60e2f9c38398ebfd57_f955cc25-1c47-4c60-94c2-d42753fc3a59.webp?v=1714970383"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec00970b55a29d3fba5b08bc261022d9f228da66_f54d3a7c-c4e2-4c26-9b33-f20a8b4b15dc.webp?v=1714970361","options":["color"],"media":[{"alt":null,"id":23896349474915,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec00970b55a29d3fba5b08bc261022d9f228da66_f54d3a7c-c4e2-4c26-9b33-f20a8b4b15dc.webp?v=1714970361"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec00970b55a29d3fba5b08bc261022d9f228da66_f54d3a7c-c4e2-4c26-9b33-f20a8b4b15dc.webp?v=1714970361","width":2000},{"alt":null,"id":23896350031971,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/82b1adb01f39031fa0daa112041461026a179f0f_e7464955-d645-4995-8752-db791a053669.webp?v=1714970363"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/82b1adb01f39031fa0daa112041461026a179f0f_e7464955-d645-4995-8752-db791a053669.webp?v=1714970363","width":2000},{"alt":null,"id":23896351113315,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/617b6bd51d7f9e24d4f847ee5ac56dc3843de819_29081df1-13de-4f60-afb0-bbcaace048c3.webp?v=1714970365"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/617b6bd51d7f9e24d4f847ee5ac56dc3843de819_29081df1-13de-4f60-afb0-bbcaace048c3.webp?v=1714970365","width":2000},{"alt":null,"id":23896351539299,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b601ab5d8b817a8d85ae12616507dcdfa1f1a86e_29442eea-baf9-4561-9846-6f6f66342559.webp?v=1714970368"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b601ab5d8b817a8d85ae12616507dcdfa1f1a86e_29442eea-baf9-4561-9846-6f6f66342559.webp?v=1714970368","width":2000},{"alt":null,"id":23896352194659,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a915ce5511007623fa79d9130d420706a23d7022_c72ccb1a-6949-4684-a0b8-2c23044be76f.webp?v=1714970370"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a915ce5511007623fa79d9130d420706a23d7022_c72ccb1a-6949-4684-a0b8-2c23044be76f.webp?v=1714970370","width":2000},{"alt":null,"id":23896352817251,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a17e7f9ffaa6f7f06cac039292cbdf88d7c6860_1ccc5009-6039-4dcb-bb06-3555809bf401.webp?v=1714970373"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a17e7f9ffaa6f7f06cac039292cbdf88d7c6860_1ccc5009-6039-4dcb-bb06-3555809bf401.webp?v=1714970373","width":2000},{"alt":null,"id":23896353341539,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/035ee5027fcde29306c574e9d40e0b81a816ac41_94a33ea4-d4cb-4bf1-b647-de5cfddcbca4.webp?v=1714970375"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/035ee5027fcde29306c574e9d40e0b81a816ac41_94a33ea4-d4cb-4bf1-b647-de5cfddcbca4.webp?v=1714970375","width":2000},{"alt":null,"id":23896353800291,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/93517821f745f5695b84a0d0082d684356cb9926_59b748df-3ed4-4582-ab10-a47c561fb736.webp?v=1714970378"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/93517821f745f5695b84a0d0082d684356cb9926_59b748df-3ed4-4582-ab10-a47c561fb736.webp?v=1714970378","width":2000},{"alt":null,"id":23896354324579,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/19237e9792716a9b550f627fa31a47e8697d7a44_97a38167-4ad1-4705-9e9e-a338d6e3d234.webp?v=1714970381"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/19237e9792716a9b550f627fa31a47e8697d7a44_97a38167-4ad1-4705-9e9e-a338d6e3d234.webp?v=1714970381","width":2000},{"alt":null,"id":23896354783331,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fe00e232ab17e2b7de89b60e2f9c38398ebfd57_f955cc25-1c47-4c60-94c2-d42753fc3a59.webp?v=1714970383"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fe00e232ab17e2b7de89b60e2f9c38398ebfd57_f955cc25-1c47-4c60-94c2-d42753fc3a59.webp?v=1714970383","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41916340928611,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108424-YB13","requires_shipping":true,"taxable":true,"featured_image":{"id":31490943778915,"product_id":7415996940387,"position":3,"created_at":"2024-05-06T12:39:25+08:00","updated_at":"2024-05-06T12:39:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/617b6bd51d7f9e24d4f847ee5ac56dc3843de819_29081df1-13de-4f60-afb0-bbcaace048c3.webp?v=1714970365","variant_ids":[41916340928611]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS - 【聯名設計款】 - Care Bears - 粉紫樂園 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108424-YB13","featured_media":{"alt":null,"id":23896351113315,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/617b6bd51d7f9e24d4f847ee5ac56dc3843de819_29081df1-13de-4f60-afb0-bbcaace048c3.webp?v=1714970365"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41916340928611,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108424-YB13","requires_shipping":true,"taxable":true,"featured_image":{"id":31490943778915,"product_id":7415996940387,"position":3,"created_at":"2024-05-06T12:39:25+08:00","updated_at":"2024-05-06T12:39:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/617b6bd51d7f9e24d4f847ee5ac56dc3843de819_29081df1-13de-4f60-afb0-bbcaace048c3.webp?v=1714970365","variant_ids":[41916340928611]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS - 【聯名設計款】 - Care Bears - 粉紫樂園 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108424-YB13","featured_media":{"alt":null,"id":23896351113315,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/617b6bd51d7f9e24d4f847ee5ac56dc3843de819_29081df1-13de-4f60-afb0-bbcaace048c3.webp?v=1714970365"}},"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: "停產" }