Skip to content

fix(cart-recovery): filter candidate line counts by active and non-deleted products - #1730

Open
Pratyush-Panda-2006 wants to merge 1 commit into
AnthropicBots:mainfrom
Pratyush-Panda-2006:fix/cart-recovery-withdrawn-products
Open

fix(cart-recovery): filter candidate line counts by active and non-deleted products#1730
Pratyush-Panda-2006 wants to merge 1 commit into
AnthropicBots:mainfrom
Pratyush-Panda-2006:fix/cart-recovery-withdrawn-products

Conversation

@Pratyush-Panda-2006

Copy link
Copy Markdown
Contributor

Description

Fixes erroneous abandoned cart recovery email dispatches for baskets containing only soft-deleted or withdrawn products in \�ackend/services/cartRecoveryService.js. Previously, \ indRecoveryCandidates\ performed a raw subquery count on \cart_items, sending recovery emails for abandoned carts whose items were unpurchasable and resulting in HTTP 410 dead-ends upon clicking the restore link.

Related Issue

Closes #1725

Clean Architecture & Changes

  • Updated the \line_count\ subquery in \ indRecoveryCandidates()\ to join \products p\ and enforce canonical \publicProductCondition('p').
  • Added unit tests in \�ackend/tests/cartRecoveryCandidateFilter.test.js\ validating line count query construction and active/non-deleted product filtering.

Verification

  • Run
    px jest tests/cartRecoveryCandidateFilter.test.js\ (All unit tests passing cleanly).

@hydra-maintainer

Copy link
Copy Markdown

🔍 Quality Gate Report

✅ All quality gates passed!

Status Check Details
Linked Issue PR description references a closing issue ✅

@vercel

vercel Bot commented Aug 28, 2026

Copy link
Copy Markdown

@Pratyush-Panda-2006 is attempting to deploy a commit to the Bhuvansh's projects Team on Vercel.

A member of the Team first needs to authorize it.

@hydra-maintainer

Copy link
Copy Markdown

🤖 AI Code Review

🔴 Score: 50/100 | comment

AI review unavailable at this time.


Automated AI review — a human maintainer will also review.

@hydra-maintainer

Copy link
Copy Markdown

💡 Suggested reviewers based on relevant file history: @Aditya8369, @MOHITKOURAV01

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Recovery Emails Dispatched for Abandoned Baskets Containing Exclusively Withdrawn Products

1 participant