$product = {"id":7416395792483,"title":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - Care Bears - Cheer Bear","handle":"iphone-8-mod-nx-printable-yb03","description":null,"published_at":"2024-06-11T16:57:53+08:00","created_at":"2024-05-06T14:48:21+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 8","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":41919253807203,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-YB03","requires_shipping":true,"taxable":true,"featured_image":{"id":31492020895843,"product_id":7416395792483,"position":8,"created_at":"2024-05-06T14:48:43+08:00","updated_at":"2024-05-06T14:48:43+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88f56b3ae0ef69e4b2fc352567fe435261efb987_478c7551-c431-4384-9e6d-37bc14bbed7d.webp?v=1714978123","variant_ids":[41919253807203]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - Care Bears - Cheer 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":"NPB0105424-YB03","featured_media":{"alt":null,"id":23897434783843,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88f56b3ae0ef69e4b2fc352567fe435261efb987_478c7551-c431-4384-9e6d-37bc14bbed7d.webp?v=1714978123"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45c97ab57782acb2c10814430fee24ae06f4889d_af2dc7ba-623d-49b4-be5f-9441ed594902.webp?v=1714978104","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b52d26837192c76f113b51da13afc1468dc6a8c_7da4445c-9178-4001-972d-2998e80614eb.webp?v=1714978107","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fa6e1cb1b2803ae5f51952b8722e432de2a9dd6_a2f8babe-0489-4998-9da2-c0a2ad9501e7.webp?v=1714978109","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2e337dd6e1e95da777db9f9de7526bac7e9148f_7bb09687-13f3-4afd-89ea-e827469f3094.webp?v=1714978112","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/312b419433c387de650a8ea3eaa3322f6c00c0ac_389ff8ab-a1c0-40fb-af1c-72837f2d9a5a.webp?v=1714978114","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ecaff9d52681973e4e2bc2521845095bfffe0acc_5bfd4b06-48e5-4256-9cff-764b08c13541.webp?v=1714978117","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17281dc929090ab023230bfa8d3f1419083f2a08_f3c08215-884f-47cc-b21e-6dda68d3c16d.webp?v=1714978120","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88f56b3ae0ef69e4b2fc352567fe435261efb987_478c7551-c431-4384-9e6d-37bc14bbed7d.webp?v=1714978123","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c7e2a77b2a3e58e95eeed7c8e8555f1890d9443f_76b163b1-635a-4981-942b-ca753f5e9c24.webp?v=1714978125","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ddc15fa39113873fb79b1b11f298ae8aa5e84af_10afff0b-0bc5-42d2-9a36-dfecb6593688.webp?v=1714978127"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45c97ab57782acb2c10814430fee24ae06f4889d_af2dc7ba-623d-49b4-be5f-9441ed594902.webp?v=1714978104","options":["color"],"media":[{"alt":null,"id":23897433112675,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45c97ab57782acb2c10814430fee24ae06f4889d_af2dc7ba-623d-49b4-be5f-9441ed594902.webp?v=1714978104"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45c97ab57782acb2c10814430fee24ae06f4889d_af2dc7ba-623d-49b4-be5f-9441ed594902.webp?v=1714978104","width":2000},{"alt":null,"id":23897433342051,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b52d26837192c76f113b51da13afc1468dc6a8c_7da4445c-9178-4001-972d-2998e80614eb.webp?v=1714978107"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b52d26837192c76f113b51da13afc1468dc6a8c_7da4445c-9178-4001-972d-2998e80614eb.webp?v=1714978107","width":2000},{"alt":null,"id":23897433866339,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fa6e1cb1b2803ae5f51952b8722e432de2a9dd6_a2f8babe-0489-4998-9da2-c0a2ad9501e7.webp?v=1714978109"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fa6e1cb1b2803ae5f51952b8722e432de2a9dd6_a2f8babe-0489-4998-9da2-c0a2ad9501e7.webp?v=1714978109","width":2000},{"alt":null,"id":23897434128483,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2e337dd6e1e95da777db9f9de7526bac7e9148f_7bb09687-13f3-4afd-89ea-e827469f3094.webp?v=1714978112"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2e337dd6e1e95da777db9f9de7526bac7e9148f_7bb09687-13f3-4afd-89ea-e827469f3094.webp?v=1714978112","width":2000},{"alt":null,"id":23897434226787,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/312b419433c387de650a8ea3eaa3322f6c00c0ac_389ff8ab-a1c0-40fb-af1c-72837f2d9a5a.webp?v=1714978114"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/312b419433c387de650a8ea3eaa3322f6c00c0ac_389ff8ab-a1c0-40fb-af1c-72837f2d9a5a.webp?v=1714978114","width":2000},{"alt":null,"id":23897434325091,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ecaff9d52681973e4e2bc2521845095bfffe0acc_5bfd4b06-48e5-4256-9cff-764b08c13541.webp?v=1714978117"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ecaff9d52681973e4e2bc2521845095bfffe0acc_5bfd4b06-48e5-4256-9cff-764b08c13541.webp?v=1714978117","width":2000},{"alt":null,"id":23897434685539,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17281dc929090ab023230bfa8d3f1419083f2a08_f3c08215-884f-47cc-b21e-6dda68d3c16d.webp?v=1714978120"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17281dc929090ab023230bfa8d3f1419083f2a08_f3c08215-884f-47cc-b21e-6dda68d3c16d.webp?v=1714978120","width":2000},{"alt":null,"id":23897434783843,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88f56b3ae0ef69e4b2fc352567fe435261efb987_478c7551-c431-4384-9e6d-37bc14bbed7d.webp?v=1714978123"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88f56b3ae0ef69e4b2fc352567fe435261efb987_478c7551-c431-4384-9e6d-37bc14bbed7d.webp?v=1714978123","width":2000},{"alt":null,"id":23897434914915,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c7e2a77b2a3e58e95eeed7c8e8555f1890d9443f_76b163b1-635a-4981-942b-ca753f5e9c24.webp?v=1714978125"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c7e2a77b2a3e58e95eeed7c8e8555f1890d9443f_76b163b1-635a-4981-942b-ca753f5e9c24.webp?v=1714978125","width":2000},{"alt":null,"id":23897434947683,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ddc15fa39113873fb79b1b11f298ae8aa5e84af_10afff0b-0bc5-42d2-9a36-dfecb6593688.webp?v=1714978127"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ddc15fa39113873fb79b1b11f298ae8aa5e84af_10afff0b-0bc5-42d2-9a36-dfecb6593688.webp?v=1714978127","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41919253807203,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-YB03","requires_shipping":true,"taxable":true,"featured_image":{"id":31492020895843,"product_id":7416395792483,"position":8,"created_at":"2024-05-06T14:48:43+08:00","updated_at":"2024-05-06T14:48:43+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88f56b3ae0ef69e4b2fc352567fe435261efb987_478c7551-c431-4384-9e6d-37bc14bbed7d.webp?v=1714978123","variant_ids":[41919253807203]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - Care Bears - Cheer 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":"NPB0105424-YB03","featured_media":{"alt":null,"id":23897434783843,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88f56b3ae0ef69e4b2fc352567fe435261efb987_478c7551-c431-4384-9e6d-37bc14bbed7d.webp?v=1714978123"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41919253807203,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-YB03","requires_shipping":true,"taxable":true,"featured_image":{"id":31492020895843,"product_id":7416395792483,"position":8,"created_at":"2024-05-06T14:48:43+08:00","updated_at":"2024-05-06T14:48:43+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88f56b3ae0ef69e4b2fc352567fe435261efb987_478c7551-c431-4384-9e6d-37bc14bbed7d.webp?v=1714978123","variant_ids":[41919253807203]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - Care Bears - Cheer 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":"NPB0105424-YB03","featured_media":{"alt":null,"id":23897434783843,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88f56b3ae0ef69e4b2fc352567fe435261efb987_478c7551-c431-4384-9e6d-37bc14bbed7d.webp?v=1714978123"}},"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: "停產" }