$product = {"id":7411224215651,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Care Bears - 雨愛灌溉","handle":"iphone-14-plus-mod-nx-magsafe-printable-yb08","description":null,"published_at":"2024-06-11T17:39:13+08:00","created_at":"2024-05-04T23:48:36+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":41896206696547,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-YB08","requires_shipping":true,"taxable":true,"featured_image":{"id":31479892082787,"product_id":7411224215651,"position":6,"created_at":"2024-05-04T23:48:51+08:00","updated_at":"2024-05-04T23:48:51+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e166b1196f40b5f8be64179c84939954c01819d_21c87bdd-c782-4ae7-9556-fc88eb736733.webp?v=1714837731","variant_ids":[41896206696547]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 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":"MPB0126124-YB08","featured_media":{"alt":null,"id":23885142556771,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e166b1196f40b5f8be64179c84939954c01819d_21c87bdd-c782-4ae7-9556-fc88eb736733.webp?v=1714837731"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f56b1dc3c40a4bc23a3c41365abd49c30c2566b5_a2c32595-0a1c-4a2a-ae29-81d36a31e81e.webp?v=1714837719","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52c90376e6160504a71cc8a175dc6958b7a950f0_596cf1c8-4e08-47c8-940b-4a3e15f77f85.webp?v=1714837722","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8bd7a4724c713ec4e8d0e12e22668b5fd0d655b1_1e7668b6-5de4-44d5-97b3-87e96eb21d31.webp?v=1714837724","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c3b118b9afc18df4c7856836234f097ad7294b2a_c205d07f-8876-4333-bee3-65ef470cb473.webp?v=1714837726","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/56efd3531a8ed806ae579137153054869105222f_31a6ca19-6a57-4bfd-9313-fb0258ef997e.webp?v=1714837728","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e166b1196f40b5f8be64179c84939954c01819d_21c87bdd-c782-4ae7-9556-fc88eb736733.webp?v=1714837731","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ce05389bae296a0b81b1730ce10a6783283fad8_11cda70d-9f0e-4da7-b378-950370e8dbf8.webp?v=1714837733","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/090cdf98885251c729a4584b06de1a162b60d68c_c9d25791-0334-4e23-818e-66ca4b68c595.webp?v=1714837735","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7718038f82a889680d32b8de4b5c161b18dd3971_2c31b9c4-24ad-479a-9843-7394cf81e7d1.webp?v=1714837738","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a007c1f8918869858586d4464dfd3f77a949d5c1_64f0fb55-aa3f-4557-bff4-208fd1cfae2a.webp?v=1714837740"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f56b1dc3c40a4bc23a3c41365abd49c30c2566b5_a2c32595-0a1c-4a2a-ae29-81d36a31e81e.webp?v=1714837719","options":["color"],"media":[{"alt":null,"id":23885140263011,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f56b1dc3c40a4bc23a3c41365abd49c30c2566b5_a2c32595-0a1c-4a2a-ae29-81d36a31e81e.webp?v=1714837719"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f56b1dc3c40a4bc23a3c41365abd49c30c2566b5_a2c32595-0a1c-4a2a-ae29-81d36a31e81e.webp?v=1714837719","width":2000},{"alt":null,"id":23885140656227,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52c90376e6160504a71cc8a175dc6958b7a950f0_596cf1c8-4e08-47c8-940b-4a3e15f77f85.webp?v=1714837722"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52c90376e6160504a71cc8a175dc6958b7a950f0_596cf1c8-4e08-47c8-940b-4a3e15f77f85.webp?v=1714837722","width":2000},{"alt":null,"id":23885141213283,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8bd7a4724c713ec4e8d0e12e22668b5fd0d655b1_1e7668b6-5de4-44d5-97b3-87e96eb21d31.webp?v=1714837724"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8bd7a4724c713ec4e8d0e12e22668b5fd0d655b1_1e7668b6-5de4-44d5-97b3-87e96eb21d31.webp?v=1714837724","width":2000},{"alt":null,"id":23885141606499,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c3b118b9afc18df4c7856836234f097ad7294b2a_c205d07f-8876-4333-bee3-65ef470cb473.webp?v=1714837726"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c3b118b9afc18df4c7856836234f097ad7294b2a_c205d07f-8876-4333-bee3-65ef470cb473.webp?v=1714837726","width":2000},{"alt":null,"id":23885142032483,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/56efd3531a8ed806ae579137153054869105222f_31a6ca19-6a57-4bfd-9313-fb0258ef997e.webp?v=1714837728"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/56efd3531a8ed806ae579137153054869105222f_31a6ca19-6a57-4bfd-9313-fb0258ef997e.webp?v=1714837728","width":2000},{"alt":null,"id":23885142556771,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e166b1196f40b5f8be64179c84939954c01819d_21c87bdd-c782-4ae7-9556-fc88eb736733.webp?v=1714837731"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e166b1196f40b5f8be64179c84939954c01819d_21c87bdd-c782-4ae7-9556-fc88eb736733.webp?v=1714837731","width":2000},{"alt":null,"id":23885142917219,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ce05389bae296a0b81b1730ce10a6783283fad8_11cda70d-9f0e-4da7-b378-950370e8dbf8.webp?v=1714837733"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ce05389bae296a0b81b1730ce10a6783283fad8_11cda70d-9f0e-4da7-b378-950370e8dbf8.webp?v=1714837733","width":2000},{"alt":null,"id":23885143572579,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/090cdf98885251c729a4584b06de1a162b60d68c_c9d25791-0334-4e23-818e-66ca4b68c595.webp?v=1714837735"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/090cdf98885251c729a4584b06de1a162b60d68c_c9d25791-0334-4e23-818e-66ca4b68c595.webp?v=1714837735","width":2000},{"alt":null,"id":23885144064099,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7718038f82a889680d32b8de4b5c161b18dd3971_2c31b9c4-24ad-479a-9843-7394cf81e7d1.webp?v=1714837738"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7718038f82a889680d32b8de4b5c161b18dd3971_2c31b9c4-24ad-479a-9843-7394cf81e7d1.webp?v=1714837738","width":2000},{"alt":null,"id":23885144621155,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a007c1f8918869858586d4464dfd3f77a949d5c1_64f0fb55-aa3f-4557-bff4-208fd1cfae2a.webp?v=1714837740"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a007c1f8918869858586d4464dfd3f77a949d5c1_64f0fb55-aa3f-4557-bff4-208fd1cfae2a.webp?v=1714837740","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41896206696547,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-YB08","requires_shipping":true,"taxable":true,"featured_image":{"id":31479892082787,"product_id":7411224215651,"position":6,"created_at":"2024-05-04T23:48:51+08:00","updated_at":"2024-05-04T23:48:51+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e166b1196f40b5f8be64179c84939954c01819d_21c87bdd-c782-4ae7-9556-fc88eb736733.webp?v=1714837731","variant_ids":[41896206696547]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 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":"MPB0126124-YB08","featured_media":{"alt":null,"id":23885142556771,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e166b1196f40b5f8be64179c84939954c01819d_21c87bdd-c782-4ae7-9556-fc88eb736733.webp?v=1714837731"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41896206696547,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-YB08","requires_shipping":true,"taxable":true,"featured_image":{"id":31479892082787,"product_id":7411224215651,"position":6,"created_at":"2024-05-04T23:48:51+08:00","updated_at":"2024-05-04T23:48:51+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e166b1196f40b5f8be64179c84939954c01819d_21c87bdd-c782-4ae7-9556-fc88eb736733.webp?v=1714837731","variant_ids":[41896206696547]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 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":"MPB0126124-YB08","featured_media":{"alt":null,"id":23885142556771,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e166b1196f40b5f8be64179c84939954c01819d_21c87bdd-c782-4ae7-9556-fc88eb736733.webp?v=1714837731"}},"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: "停產" }