Totally Zenned
- Join Date:
- Jan 2004
- Location:
- N of San Antonio TX
- Posts:
- 9,923
- Plugin Contributions:
- 24
Post #1 by dbltoe
Bot Triage stops fake-cart and flood bots before they cost your store anything. It checks every storefront request before Zen Cart starts a session, so refused bots never fill your sessions table, reach the cart, or see a page.
It's free and encapsulated (zc_plugins), for Zen Cart 1.5.8 through 3.0.0 on PHP 7.4 through 8.5.
Download and source: https://github.com/dbltoe/Bot_Triage/releases/latest
Why it exists
One store we look after was getting about half a million requests a day from well over a hundred thousand addresses, most of them making only one or two requests. Fake carts and sessions piled up, and Cloudflare's free plan didn't stop it. What finally did was several tools working together: AbuseIPDB's reputation and country blocking, a few narrow blocks at the web server, and Zen Cart's buy_now check. Bot Triage puts the pieces Zen Cart was missing into one free plugin, so any store can do the same.
What it does
- Finds the real visitor address. Behind Cloudflare or another proxy, it believes forwarded headers only from that proxy and removes them from anyone else, so nobody can fake an address to dodge a limit or get someone else banned.
- Limits how fast one address can ask for pages, with a short ban for anyone who goes over. The defaults come from a week of a real store's traffic: the busiest real buyer made 11 page requests in 10 seconds, and the limit is 20. Instant search and One Page Checkout's ajax calls have their own, higher limit.
- Lets search engines through, verified. Google, Bing, Apple and DuckDuckGo are recognized by the address lists they publish themselves. Calling yourself Googlebot gets you nothing.
- Whitelist and block list. The admin page prints the block list as
.htaccesslines, so the web server can refuse those addresses before PHP even starts. - Cart guards. Zen Cart's own buy_now check for stores older than 2.2.1, and an optional limit on how many different products a guest can put in a cart.
- Signup rules against bogus accounts. No new accounts from hosting, datacenter or VPN networks, a daily cap per address and per network, a record of every attempt, and a Suspect Accounts list to export and remove the fakes. Browsing, logging in and guest checkout are never affected.
Watch mode first
It installs in Watch mode: it records what it would refuse and refuses nothing. Let it watch for a few days, look at the Activity tab under Tools > Bot Triage, whitelist anything that shouldn't be there, then switch Mode to enforce.
Works with
- AbuseIPDB (Zen Cart 2.2.2 and later): turn on its Defer to External Triage setting, and AbuseIPDB skips its lookups for visitors Bot Triage has already handled. Bot Triage can also report confirmed abusers back to AbuseIPDB; that's off unless you switch it on.
- Cloudflare Turnstile (free): with its keys set, a visitor who crosses a limit gets Cloudflare's human check instead of a refusal, so people sharing one address (phones, offices, privacy relays) can carry on.
- Fraud Screen: keep it for card testing at checkout. Bot Triage doesn't look at payments.
What it doesn't change
No core file, template file or .htaccess is edited. Uninstalling from Plugin Manager removes everything it added.
Things to know
On Zen Cart 2.3 and 3.0 behind Cloudflare, also list Cloudflare's addresses in TRUSTED_PROXIES in includes/configure.php, so Zen Cart's own records (orders, Who's Online) show the real address. Bot Triage's own checks get it right either way, and its Status tab tells you if that setting is missing.
It has been run end to end on a 2.2.2 store and a 3.0.0 development store: install, watch, enforce, the lists, the cart limit, a refused signup, every admin tab and a clean uninstall. Every release from 1.5.8 to 3.0.0 is also checked against Zen Cart's own code for each version.
Questions, reports and suggestions are welcome here.
Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com