Totally Zenned
- Join Date:
- Jan 2004
- Location:
- N of San Antonio TX
- Posts:
- 9,775
- Plugin Contributions:
- 10
LLMs.txt Generator
What it is
An llms.txt is to AI assistants what sitemap.xml is to search engines: a plain Markdown file at the root of your site that says what the site is and where the important pages are, following the convention at https://llmstxt.org/. ChatGPT, Claude, Perplexity and the others are increasingly the first place a shopper asks "where can I buy a replacement gear for a Model K mixer?" This file is how you answer.
LLMs.txt Generator writes one for your store from what's already in Zen Cart, and keeps it current without anyone remembering to.
What it produces
# Acme Widgets
> Acme Widgets sells replacement parts and tools for vintage kitchen
> mixers, shipping from Texas to the US and Canada.
- [Website](https://www.example.com/)
- Prices are in: USD
- [Sitemap](https://www.example.com/sitemap.xml)
## Shopping information
- [Shipping and Returns](https://www.example.com/index.php?main_page=shippinginfo)
- [Privacy Notice](https://www.example.com/index.php?main_page=privacy)
- [Conditions of Use](https://www.example.com/index.php?main_page=conditions)
- [Contact Us](https://www.example.com/index.php?main_page=contact_us)
## Categories
- [Mixer Parts](https://www.example.com/index.php?main_page=index&cPath=1): Gears, gaskets and beaters for every model since 1937.
- [Mixer Parts > Gaskets](https://www.example.com/index.php?main_page=index&cPath=1_4)
## Products
- [Planetary Gear, Model K](https://www.example.com/index.php?main_page=product_info&products_id=12): Bronze replacement gear for the Model K. Fits 1948 to 1962. ($24.95)
## More pages
- [About Us](https://www.example.com/index.php?main_page=page&id=3)
Every line comes from something you already maintain. The one thing worth writing by hand is the summary in the blockquote, because it's the first sentence an assistant reads, and there's a setting for it.
How it publishes
- file (the default): a real
llms.txtis written at the store root, next torobots.txt. No other setup. - dynamic: served live by
index.php?main_page=llms_txt, with three lines of.htaccessso/llms.txtreaches it. Nothing written at the root. - both: the file, with the live page as a fallback.
When it rebuilds
- change (the default): when a product, category or EZ-Page is saved in the admin, and whenever a fifteen-minute storefront check finds the catalog has changed.
- daily, weekly or monthly: on that schedule, plus after an admin save.
- manual: only from the Regenerate button.
Zen Cart has no scheduler, so the work happens on a storefront visit, never in the admin. An admin save only sets a flag, so saving a product is as fast as it ever was, and no customer page ever waits for a build.
What it won't do
- Overwrite an
llms.txtyou wrote yourself. It recognizes its own files and leaves anything else alone until you press Replace on the Tools page. - Put files anywhere but
zc_plugins/LlmsTxt/. Nothing lands inadmin/,includes/or your template, which is what makes it safe to remove. - Touch a core file.
Settings
Under Configuration > LLMs.txt Generator: the summary and optional notes, which information pages to list, categories and how deep, categories to exclude, products with a cap and an ordering (sort order, newest, bestsellers, name, most viewed), prices on or off, description length, EZ-Pages, sitemap address, language, and the optional llms-full.txt.
Under Tools > LLMs.txt Generator: a status table (what's published, when it was last built, whether a rebuild is pending and why), a live preview of the current output, Regenerate, Replace, Remove, and the rewrite snippet.
Compatibility
One codebase for Zen Cart v1.5.8 through v3.0.0 on PHP 7.4 through 8.5, installed and exercised through Plugin Manager on all six release branches rather than assumed. Checked with Zen Cart's own phpstan and php-cs-fixer configurations. Every table name goes through the TABLE_* constants, so a store with a database prefix is fine.
Install
Upload zc_plugins/LlmsTxt/ to your store root, then Modules > Plugin Manager > LLMs.txt Generator > Install. The installer writes a first llms.txt straight away if the store root is writable. Then write your summary under Configuration and open https://your-store/llms.txt.
The full manual ships inside the plugin as readme.html, and Plugin Manager links to it from the info panel whether or not the plugin is installed.
Links
- Plugins Library: (to be added)
- GitHub: https://github.com/dbltoe/LLMs_Txt_Generator
- License: GPL-2.0
A Pro edition with AI-crawler analytics and robots control is in the works for Zen Cart 2.2 and later; I'll announce it here.
Questions and bug reports here, please. Say which Zen Cart and PHP version you're on, and what the Tools page shows in its status table; that's usually enough to find it.
A little help with colors.
myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.