$product = {"id":7415046406243,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Care Bears - Bedtime Bear","handle":"iphone-12-mini-mod-nx-magsafe-printable-yb04","description":null,"published_at":"2024-06-11T17:56:31+08:00","created_at":"2024-05-05T20:12:46+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":41911298818147,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-YB04","requires_shipping":true,"taxable":true,"featured_image":{"id":31488013107299,"product_id":7415046406243,"position":1,"created_at":"2024-05-05T20:12:49+08:00","updated_at":"2024-05-05T20:12:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc899c52ec3c030d7c441dde5cab082bc9d698c9_9b159d6f-f3fd-4eae-800b-2b65b22dad46.webp?v=1714911169","variant_ids":[41911298818147]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Care Bears - Bedtime 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-YB04","featured_media":{"alt":null,"id":23893357396067,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc899c52ec3c030d7c441dde5cab082bc9d698c9_9b159d6f-f3fd-4eae-800b-2b65b22dad46.webp?v=1714911169"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc899c52ec3c030d7c441dde5cab082bc9d698c9_9b159d6f-f3fd-4eae-800b-2b65b22dad46.webp?v=1714911169","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b50e4084286a4e5ce02786f87c9ff64906638815_4df61fd0-15f3-427a-9007-b3504720066c.webp?v=1714911171","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bc867945367ed505c4007e2c8706e1d9c4d934a_fd22f4a8-fa6c-405e-8729-c75119014a7e.webp?v=1714911174","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2589077718488f76e212fe76dc0c76ca6549588a_98c33c33-bf00-4230-86d7-919c76adb935.webp?v=1714911176","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc1b42edcb951a436ad27fcd1942dc00588a5877_98b4be2e-952c-48f5-852b-2cb9df2a9299.webp?v=1714911178","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/908f712ba67f9048902a6426e7340c331c4ed30e_5ce55f46-f908-4589-a465-209738ece38e.webp?v=1714911181","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2eb8515e019482e278edd59dda822613b3bc45fb_916c7bce-008e-4b93-aa42-9752614d8db5.webp?v=1714911183","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bf5ab7ed8cd6168ae7bd2528076b58e84097470_9dcaec80-4d28-4298-b769-3e3ea2f00105.webp?v=1714911185","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c35a3077ed2086934b926a82cae9fbd827507278_fed0f9eb-bc48-4c99-9458-e792ce48ba1e.webp?v=1714911188","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/643fce7699f9c8c7efb8ee97a6b029069992b3b8_472a1680-44d2-4f81-a9b1-ec0ea8ad783c.webp?v=1714911190","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f494a4ee9a2cf30c9a3fd6d62eb52f17fab81bf_7d44e543-ca8f-4ba3-a768-7d1cbcde6b74.webp?v=1714911193"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc899c52ec3c030d7c441dde5cab082bc9d698c9_9b159d6f-f3fd-4eae-800b-2b65b22dad46.webp?v=1714911169","options":["color"],"media":[{"alt":null,"id":23893357396067,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc899c52ec3c030d7c441dde5cab082bc9d698c9_9b159d6f-f3fd-4eae-800b-2b65b22dad46.webp?v=1714911169"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc899c52ec3c030d7c441dde5cab082bc9d698c9_9b159d6f-f3fd-4eae-800b-2b65b22dad46.webp?v=1714911169","width":2000},{"alt":null,"id":23893358248035,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b50e4084286a4e5ce02786f87c9ff64906638815_4df61fd0-15f3-427a-9007-b3504720066c.webp?v=1714911171"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b50e4084286a4e5ce02786f87c9ff64906638815_4df61fd0-15f3-427a-9007-b3504720066c.webp?v=1714911171","width":2000},{"alt":null,"id":23893358575715,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bc867945367ed505c4007e2c8706e1d9c4d934a_fd22f4a8-fa6c-405e-8729-c75119014a7e.webp?v=1714911174"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bc867945367ed505c4007e2c8706e1d9c4d934a_fd22f4a8-fa6c-405e-8729-c75119014a7e.webp?v=1714911174","width":2000},{"alt":null,"id":23893359198307,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2589077718488f76e212fe76dc0c76ca6549588a_98c33c33-bf00-4230-86d7-919c76adb935.webp?v=1714911176"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2589077718488f76e212fe76dc0c76ca6549588a_98c33c33-bf00-4230-86d7-919c76adb935.webp?v=1714911176","width":2000},{"alt":null,"id":23893359820899,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc1b42edcb951a436ad27fcd1942dc00588a5877_98b4be2e-952c-48f5-852b-2cb9df2a9299.webp?v=1714911178"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc1b42edcb951a436ad27fcd1942dc00588a5877_98b4be2e-952c-48f5-852b-2cb9df2a9299.webp?v=1714911178","width":2000},{"alt":null,"id":23893360345187,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/908f712ba67f9048902a6426e7340c331c4ed30e_5ce55f46-f908-4589-a465-209738ece38e.webp?v=1714911181"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/908f712ba67f9048902a6426e7340c331c4ed30e_5ce55f46-f908-4589-a465-209738ece38e.webp?v=1714911181","width":2000},{"alt":null,"id":23893360738403,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2eb8515e019482e278edd59dda822613b3bc45fb_916c7bce-008e-4b93-aa42-9752614d8db5.webp?v=1714911183"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2eb8515e019482e278edd59dda822613b3bc45fb_916c7bce-008e-4b93-aa42-9752614d8db5.webp?v=1714911183","width":2000},{"alt":null,"id":23893361393763,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bf5ab7ed8cd6168ae7bd2528076b58e84097470_9dcaec80-4d28-4298-b769-3e3ea2f00105.webp?v=1714911185"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bf5ab7ed8cd6168ae7bd2528076b58e84097470_9dcaec80-4d28-4298-b769-3e3ea2f00105.webp?v=1714911185","width":2000},{"alt":null,"id":23893361885283,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c35a3077ed2086934b926a82cae9fbd827507278_fed0f9eb-bc48-4c99-9458-e792ce48ba1e.webp?v=1714911188"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c35a3077ed2086934b926a82cae9fbd827507278_fed0f9eb-bc48-4c99-9458-e792ce48ba1e.webp?v=1714911188","width":2000},{"alt":null,"id":23893362933859,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/643fce7699f9c8c7efb8ee97a6b029069992b3b8_472a1680-44d2-4f81-a9b1-ec0ea8ad783c.webp?v=1714911190"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/643fce7699f9c8c7efb8ee97a6b029069992b3b8_472a1680-44d2-4f81-a9b1-ec0ea8ad783c.webp?v=1714911190","width":2000},{"alt":null,"id":23893363359843,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f494a4ee9a2cf30c9a3fd6d62eb52f17fab81bf_7d44e543-ca8f-4ba3-a768-7d1cbcde6b74.webp?v=1714911193"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f494a4ee9a2cf30c9a3fd6d62eb52f17fab81bf_7d44e543-ca8f-4ba3-a768-7d1cbcde6b74.webp?v=1714911193","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911298818147,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-YB04","requires_shipping":true,"taxable":true,"featured_image":{"id":31488013107299,"product_id":7415046406243,"position":1,"created_at":"2024-05-05T20:12:49+08:00","updated_at":"2024-05-05T20:12:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc899c52ec3c030d7c441dde5cab082bc9d698c9_9b159d6f-f3fd-4eae-800b-2b65b22dad46.webp?v=1714911169","variant_ids":[41911298818147]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Care Bears - Bedtime 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-YB04","featured_media":{"alt":null,"id":23893357396067,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc899c52ec3c030d7c441dde5cab082bc9d698c9_9b159d6f-f3fd-4eae-800b-2b65b22dad46.webp?v=1714911169"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911298818147,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-YB04","requires_shipping":true,"taxable":true,"featured_image":{"id":31488013107299,"product_id":7415046406243,"position":1,"created_at":"2024-05-05T20:12:49+08:00","updated_at":"2024-05-05T20:12:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc899c52ec3c030d7c441dde5cab082bc9d698c9_9b159d6f-f3fd-4eae-800b-2b65b22dad46.webp?v=1714911169","variant_ids":[41911298818147]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Care Bears - Bedtime 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-YB04","featured_media":{"alt":null,"id":23893357396067,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc899c52ec3c030d7c441dde5cab082bc9d698c9_9b159d6f-f3fd-4eae-800b-2b65b22dad46.webp?v=1714911169"}},"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: "停產" }