$product = {"id":7415949361251,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Care Bears - Best Friend Bear","handle":"iphone-xs-max-mod-nx-printable-yb02","description":null,"published_at":"2024-06-11T16:48:42+08:00","created_at":"2024-05-06T12:30:19+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 Max","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":41915841413219,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-YB02","requires_shipping":true,"taxable":true,"featured_image":{"id":31490815885411,"product_id":7415949361251,"position":9,"created_at":"2024-05-06T12:30:41+08:00","updated_at":"2024-05-06T12:30:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e47e4ed7d6b0bc61d833c396ebaa76748e2e4145_294f2204-114b-4fa2-ae95-e56e3a20c0cb.webp?v=1714969841","variant_ids":[41915841413219]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Care Bears - Best Friend Bear - 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":"NPB0108624-YB02","featured_media":{"alt":null,"id":23896222695523,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e47e4ed7d6b0bc61d833c396ebaa76748e2e4145_294f2204-114b-4fa2-ae95-e56e3a20c0cb.webp?v=1714969841"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72709364506ce3e9bd3adf02d09dfe56a2cd93ad_12d1016d-afc6-4b30-ba85-6aaaa316fae8.webp?v=1714969822","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae9fd34b2406f642dfa71cdec2c256ed12fbfd1a_8d6c94c9-2b67-438f-b29f-8def38133dbc.webp?v=1714969824","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c7d13c956db8fea86845c7167f6bdcaea760881b_69cb2f8e-851a-4ffe-b716-4689b12f7be4.webp?v=1714969826","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba949a48fce419cd3b28106d025290f660821c46_d705fe1b-67e9-413a-a911-cf0dc2144555.webp?v=1714969829","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ccaf729e1fb3928150eac30a75f2eabfacd727d_7a29619d-f6e6-4d50-92ba-f3f2ca4bc001.webp?v=1714969832","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b967e56fb39e02e7a2470c9de163c787179450c3_48fe76e8-25f7-45f2-9bb1-7c3e148578d1.webp?v=1714969834","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58eb9fde6c5589b803bf50b735448678dc997b0f_31bb3a52-4f72-4187-a89f-8f2bff900d41.webp?v=1714969836","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2903b49b167e62829005328d373231a84395c399_32bf5d51-9525-40a1-9700-7a22b6582ebf.webp?v=1714969839","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e47e4ed7d6b0bc61d833c396ebaa76748e2e4145_294f2204-114b-4fa2-ae95-e56e3a20c0cb.webp?v=1714969841","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d4d27458e1a7d49fac62675d304b018bb102668_c7b61338-8e9f-4005-86a0-27e8d74ca900.webp?v=1714969844"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72709364506ce3e9bd3adf02d09dfe56a2cd93ad_12d1016d-afc6-4b30-ba85-6aaaa316fae8.webp?v=1714969822","options":["color"],"media":[{"alt":null,"id":23896218042467,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72709364506ce3e9bd3adf02d09dfe56a2cd93ad_12d1016d-afc6-4b30-ba85-6aaaa316fae8.webp?v=1714969822"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72709364506ce3e9bd3adf02d09dfe56a2cd93ad_12d1016d-afc6-4b30-ba85-6aaaa316fae8.webp?v=1714969822","width":2000},{"alt":null,"id":23896218501219,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae9fd34b2406f642dfa71cdec2c256ed12fbfd1a_8d6c94c9-2b67-438f-b29f-8def38133dbc.webp?v=1714969824"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae9fd34b2406f642dfa71cdec2c256ed12fbfd1a_8d6c94c9-2b67-438f-b29f-8def38133dbc.webp?v=1714969824","width":2000},{"alt":null,"id":23896219058275,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c7d13c956db8fea86845c7167f6bdcaea760881b_69cb2f8e-851a-4ffe-b716-4689b12f7be4.webp?v=1714969826"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c7d13c956db8fea86845c7167f6bdcaea760881b_69cb2f8e-851a-4ffe-b716-4689b12f7be4.webp?v=1714969826","width":2000},{"alt":null,"id":23896219746403,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba949a48fce419cd3b28106d025290f660821c46_d705fe1b-67e9-413a-a911-cf0dc2144555.webp?v=1714969829"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba949a48fce419cd3b28106d025290f660821c46_d705fe1b-67e9-413a-a911-cf0dc2144555.webp?v=1714969829","width":2000},{"alt":null,"id":23896220139619,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ccaf729e1fb3928150eac30a75f2eabfacd727d_7a29619d-f6e6-4d50-92ba-f3f2ca4bc001.webp?v=1714969832"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ccaf729e1fb3928150eac30a75f2eabfacd727d_7a29619d-f6e6-4d50-92ba-f3f2ca4bc001.webp?v=1714969832","width":2000},{"alt":null,"id":23896220729443,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b967e56fb39e02e7a2470c9de163c787179450c3_48fe76e8-25f7-45f2-9bb1-7c3e148578d1.webp?v=1714969834"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b967e56fb39e02e7a2470c9de163c787179450c3_48fe76e8-25f7-45f2-9bb1-7c3e148578d1.webp?v=1714969834","width":2000},{"alt":null,"id":23896221384803,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58eb9fde6c5589b803bf50b735448678dc997b0f_31bb3a52-4f72-4187-a89f-8f2bff900d41.webp?v=1714969836"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58eb9fde6c5589b803bf50b735448678dc997b0f_31bb3a52-4f72-4187-a89f-8f2bff900d41.webp?v=1714969836","width":2000},{"alt":null,"id":23896221778019,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2903b49b167e62829005328d373231a84395c399_32bf5d51-9525-40a1-9700-7a22b6582ebf.webp?v=1714969839"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2903b49b167e62829005328d373231a84395c399_32bf5d51-9525-40a1-9700-7a22b6582ebf.webp?v=1714969839","width":2000},{"alt":null,"id":23896222695523,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e47e4ed7d6b0bc61d833c396ebaa76748e2e4145_294f2204-114b-4fa2-ae95-e56e3a20c0cb.webp?v=1714969841"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e47e4ed7d6b0bc61d833c396ebaa76748e2e4145_294f2204-114b-4fa2-ae95-e56e3a20c0cb.webp?v=1714969841","width":2000},{"alt":null,"id":23896223023203,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d4d27458e1a7d49fac62675d304b018bb102668_c7b61338-8e9f-4005-86a0-27e8d74ca900.webp?v=1714969844"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4d4d27458e1a7d49fac62675d304b018bb102668_c7b61338-8e9f-4005-86a0-27e8d74ca900.webp?v=1714969844","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41915841413219,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-YB02","requires_shipping":true,"taxable":true,"featured_image":{"id":31490815885411,"product_id":7415949361251,"position":9,"created_at":"2024-05-06T12:30:41+08:00","updated_at":"2024-05-06T12:30:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e47e4ed7d6b0bc61d833c396ebaa76748e2e4145_294f2204-114b-4fa2-ae95-e56e3a20c0cb.webp?v=1714969841","variant_ids":[41915841413219]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Care Bears - Best Friend Bear - 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":"NPB0108624-YB02","featured_media":{"alt":null,"id":23896222695523,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e47e4ed7d6b0bc61d833c396ebaa76748e2e4145_294f2204-114b-4fa2-ae95-e56e3a20c0cb.webp?v=1714969841"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41915841413219,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-YB02","requires_shipping":true,"taxable":true,"featured_image":{"id":31490815885411,"product_id":7415949361251,"position":9,"created_at":"2024-05-06T12:30:41+08:00","updated_at":"2024-05-06T12:30:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e47e4ed7d6b0bc61d833c396ebaa76748e2e4145_294f2204-114b-4fa2-ae95-e56e3a20c0cb.webp?v=1714969841","variant_ids":[41915841413219]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Care Bears - Best Friend Bear - 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":"NPB0108624-YB02","featured_media":{"alt":null,"id":23896222695523,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e47e4ed7d6b0bc61d833c396ebaa76748e2e4145_294f2204-114b-4fa2-ae95-e56e3a20c0cb.webp?v=1714969841"}},"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: "停產" }