mirror of
https://github.com/christianvidalwolf-prog/CrazeAnalytix.git
synced 2026-08-03 12:35:24 +02:00
debug: Expand logging for Buy Box parsing to see why Spain rows are skipped
This commit is contained in:
@@ -2232,14 +2232,19 @@ export const processBuyBoxExcel = async (fileOrBuffer: File | ArrayBuffer): Prom
|
||||
const rawReason = String(row[reasonIdx] || '').trim();
|
||||
|
||||
// Debug specific ASIN reported by user
|
||||
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})`);
|
||||
const isTargetAsin = rawAsin === 'B0D3874WSD' || rawAsin.includes('B0D3874WSD');
|
||||
if (isTargetAsin) {
|
||||
console.log(`[BuyBox Debug] Found ASIN ${rawAsin} in ${config.country}. Row data at reasonIdx (${reasonIdx}): "${row[reasonIdx]}", Processed Reason: "${rawReason}"`);
|
||||
}
|
||||
|
||||
// Only consider as BB lost if there is an Issue Type / Reason specified
|
||||
const lowReason = rawReason.toLowerCase();
|
||||
if (!rawReason || lowReason === 'fixed' || lowReason === 'ok' || lowReason === 'hecho' || lowReason === 'solucionado' || lowReason === 'corrected') continue;
|
||||
if (!rawReason || lowReason === 'fixed' || lowReason === 'ok' || lowReason === 'hecho' || lowReason === 'solucionado' || lowReason === 'corrected') {
|
||||
if (isTargetAsin) {
|
||||
console.log(`[BuyBox Debug] SKIPPING ASIN ${rawAsin} in ${config.country} because reason is empty or matches positive status list ("${rawReason}")`);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
let entry = buyBoxMap.get(rawAsin);
|
||||
if (!entry) {
|
||||
|
||||
Reference in New Issue
Block a user