feat: Supplier deny-list drop-ship mode + explainer parity#5
Open
ayeshanisar786 wants to merge 1 commit into
Open
feat: Supplier deny-list drop-ship mode + explainer parity#5ayeshanisar786 wants to merge 1 commit into
ayeshanisar786 wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a third Drop-Ship Source mode — Supplier deny-list — the inverse of the existing supplier allow-list.
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
Model/Config.phpDROP_SHIP_SOURCE_DENYLISTconstant,denylist_supplierspath,getDenylistSupplierNames(); source getter accepts the deny valueModel/SupplierDropShipResolver.phpisDenylisted()via a sharedmatchesSupplierSet()core (refactor —isDropShipEligible()now delegates to it)Model/EligibilityEvaluator.phpeligible UNLESS denylisted AND out of stock)Model/Source/DropShipSource.php+etc/adminhtml/system.xmlsupplier_denylist)Service/EligibilityExplainer.phpForce Standard Shipping Only, usedin stock OR backordersinstead ofin stock AND qty>0, and mis-reported supplier-mode stock fallback. Now mode-aware (flag / allow-list / deny-list)README.md,CHANGELOG.mdCompatibility
Backward compatible. Existing
flagandsupplierinstalls unaffected; deny-list mode is opt-in. No schema/data changes. Runbin/magento etechflow:nde:resyncafter 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