Skip to content

feat: Supplier deny-list drop-ship mode + explainer parity#5

Open
ayeshanisar786 wants to merge 1 commit into
mainfrom
feat/supplier-denylist-mode
Open

feat: Supplier deny-list drop-ship mode + explainer parity#5
ayeshanisar786 wants to merge 1 commit into
mainfrom
feat/supplier-denylist-mode

Conversation

@ayeshanisar786

Copy link
Copy Markdown
Contributor

Summary

Adds a third Drop-Ship Source mode — Supplier deny-list — the inverse of the existing supplier allow-list.

  • Allow-list (existing): eligible only if supplier is on a qualifying list.
  • Deny-list (new): every product eligible EXCEPT those whose supplier is on a deny list AND out of stock. Products with no supplier, a non-listed supplier, or any in-stock product stay eligible.

This models the common "almost everything ships next-day except a handful of slow suppliers" catalogue without having to enumerate every fast supplier. Store-agnostic — supplier names are pure admin config, no hardcoded vendor names.

Changes

File Change
Model/Config.php DROP_SHIP_SOURCE_DENYLIST constant, denylist_suppliers path, getDenylistSupplierNames(); source getter accepts the deny value
Model/SupplierDropShipResolver.php isDenylisted() via a shared matchesSupplierSet() core (refactor — isDropShipEligible() now delegates to it)
Model/EligibilityEvaluator.php Precedence 3b: deny-list branch (eligible UNLESS denylisted AND out of stock)
Model/Source/DropShipSource.php + etc/adminhtml/system.xml New mode option + Deny-List Supplier Names field (depends on supplier_denylist)
Service/EligibilityExplainer.php Fix: admin panel now mirrors the evaluator in every mode — previously ignored Force Standard Shipping Only, used in stock OR backorders instead of in stock AND qty>0, and mis-reported supplier-mode stock fallback. Now mode-aware (flag / allow-list / deny-list)
README.md, CHANGELOG.md Docs + v1.9.0 changelog

Compatibility

Backward compatible. Existing flag and supplier installs unaffected; deny-list mode is opt-in. No schema/data changes. Run bin/magento etechflow:nde:resync after switching modes to recompute stored eligibility.

Verification

Built and validated live on a production catalogue (24.5k products): switching to deny-list mode converged to exactly the intended state (everything eligible except the configured deny suppliers while out of stock). Explainer agreement audit: 600/600 match between panel and stored badge.

🤖 Generated with Claude Code

Adds a third Drop-Ship Source mode — "Supplier deny-list" — the inverse of
the existing supplier allow-list. Every product is next-day eligible EXCEPT
those whose supplier is on a deny list AND out of stock. Products with no
supplier, a non-listed supplier, or any in-stock product stay eligible.
Models the common "almost everything ships next-day except a few slow
suppliers" catalogue without enumerating every fast supplier.

Store-agnostic: supplier names are admin config only; no hardcoded names.

- Config: DROP_SHIP_SOURCE_DENYLIST + getDenylistSupplierNames(); source
  getter now accepts the deny value.
- SupplierDropShipResolver: isDenylisted() via a shared matchesSupplierSet()
  core reused by the existing isDropShipEligible().
- EligibilityEvaluator: precedence 3b deny-list branch.
- system.xml + DropShipSource: new mode option + "Deny-List Supplier Names"
  field (depends on supplier_denylist).
- Fix: admin eligibility explainer now mirrors the evaluator in every mode
  (force-standard, qty>0 AND in-stock, supplier stock-fallback, deny-list).

Backward compatible; opt-in; no schema/data changes. Run
`bin/magento etechflow:nde:resync` after switching modes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant