mirror of
https://github.com/christianvidalwolf-prog/CrazeAnalytix.git
synced 2026-08-03 16:45:24 +02:00
debug: Add diagnostics for Buy Box warning issue
This commit is contained in:
@@ -19,6 +19,11 @@ export const BuyBoxWarningBadge: React.FC<BuyBoxWarningBadgeProps> = ({ asin, bu
|
||||
if (!buyBoxLostMap || !asin) return null;
|
||||
|
||||
const data = buyBoxLostMap.get(asin.toUpperCase());
|
||||
|
||||
if (asin.toUpperCase() === 'B0D3874WSD') {
|
||||
console.log(`[BuyBoxBadge Debug] ASIN: ${asin}, Found in map: ${!!data}, Countries: ${data?.countries.join(', ') || 'none'}`);
|
||||
}
|
||||
|
||||
if (!data || data.countries.length === 0) return null;
|
||||
|
||||
return (
|
||||
|
||||
@@ -2216,14 +2216,14 @@ export const processBuyBoxExcel = async (fileOrBuffer: File | ArrayBuffer): Prom
|
||||
const rawReason = String(row[reasonIdx] || '').trim();
|
||||
|
||||
// Debug specific ASIN reported by user
|
||||
if (rawAsin === 'B0D3874WSD' && config.country === 'ES') {
|
||||
console.log(`[BuyBox Debug] ASIN B0D3874WSD found in ES. Raw Reason: "${rawReason}" (Length: ${rawReason.length})`);
|
||||
if (rawAsin === 'B0D3874WSD' || rawAsin.includes('B0D3874WSD')) {
|
||||
console.log(`[BuyBox Debug] ASIN ${rawAsin} found in ${config.country}. Headers:`, headers);
|
||||
console.log(`[BuyBox Debug] Reason at index ${reasonIdx}: "${rawReason}" (Length: ${rawReason.length})`);
|
||||
}
|
||||
|
||||
// Only consider as BB lost if there is an Issue Type / Reason specified
|
||||
// Empty reason or "Fixed" status means no issue = they have the Buy Box
|
||||
const lowReason = rawReason.toLowerCase();
|
||||
if (!rawReason || lowReason === 'fixed' || lowReason === 'ok' || lowReason === 'hecho' || lowReason === 'solucionado') continue;
|
||||
if (!rawReason || lowReason === 'fixed' || lowReason === 'ok' || lowReason === 'hecho' || lowReason === 'solucionado' || lowReason === 'corrected') continue;
|
||||
|
||||
let entry = buyBoxMap.get(rawAsin);
|
||||
if (!entry) {
|
||||
|
||||
Reference in New Issue
Block a user