LLMs.txt Generator for Phoenix Cart - Installation Guide

Overview

This module generates an LLMs.txt file for your Phoenix Cart store, providing structured information about your store for AI/LLM systems. The LLMs.txt format is a standardized way to help AI systems understand your website content.
What's Included

    Header Tags Module: Adds LLMs.txt discovery meta tags to your store pages
    LLMs.txt Generator: Creates a properly formatted LLMs.txt file with your store information
    Admin Configuration: Control what information is included in the LLMs.txt file

Installation Steps

Step 1: Upload Files

Upload the following files to your Phoenix Cart installation:

code

/llms.php                                    (root directory)
/includes/modules/header_tags/ht_llms_txt.php
/includes/languages/english/modules/header_tags/ht_llms_txt.php
includes/languages/english/modules/header_tags/ht_llms_txt.php

Step 2: Install the Module

    Log into your Phoenix Cart Admin panel
    Navigate to Modules > Header Tags
    Click Install Module
    Find LLMs.txt Generator in the list
    Click Install
    Configure the settings (see Configuration Options below)

Step 3: Verify Installation

    Visit your store's LLMs.txt file: https://yourstore.com/llms.php
    Check that the content is properly formatted
    Verify that meta tags are added to your store pages (view page source)

Configuration Options

After installation, you can configure the module in Modules > Header Tags > LLMs.txt Generator:
Available Settings

    Enable LLMs.txt Module: Turn the module on/off
    Sort Order: Display order among header tag modules
    Include Product Categories: Whether to include category listings
    Include Pages: Whether to include pages from the database
    Max Products to Include: Maximum number of products to list (0 = no limit)

Recommended Settings

    Include Product Categories: True (helps AI understand your product range)
    Include Pages: True (includes policy pages and additional content)
    Max Products: 20-50 (balance between completeness and file size)

File Permissions

Ensure the following permissions are set:

llms.php - 644 (readable by web server)
includes/modules/header_tags/ht_llms_txt.php - 644
includes/languages/english/modules/header_tags/ht_llms_txt.php - 644

What Information is Included

The generated LLMs.txt file includes:
Store Information

    Store name and URL
    Platform information (Phoenix Cart)
    Store owner details
    Currency and address information

Product Categories

    Category names with descriptions
    Direct links to category pages

Products

    Product names and descriptions
    Prices and model numbers
    Direct links to product pages

Store Policies

    Links to policy pages (privacy, terms, shipping, etc.)
    Both database pages and static files

Contact Information

    Contact form links
    Email and phone information
    Account creation and login links

Troubleshooting

Common Issues

LLMs.txt shows "Error generating" message:

    Check file permissions on llms.php
    Verify database connection
    Check error logs for specific issues

Module doesn't appear in admin:

    Verify file upload locations are correct
    Check that language file is properly uploaded
    Ensure proper file permissions

Missing categories or products:

    Verify database has content in the correct language
    Check module configuration settings
    Ensure products/categories are active

LLMs.txt validation errors:

    The generator creates compliant LLMs.txt format
    If validation fails, check for custom modifications
    Verify all required sections have at least one link

File Structure Check

Verify your files are in the correct locations:

code

your-store/
├── llms.php
└── includes/
    ├── modules/
    │   └── header_tags/
    │       └── ht_llms_txt.php
    └── languages/
        └── english/
            └── modules/
                └── header_tags/
                    └── ht_llms_txt.php

Testing the Installation
1. Basic Functionality Test

Visit: https://yourstore.com/llms.php

    Should display formatted text content
    Should include store information
    Should have proper markdown formatting

2. Meta Tags Test

View source of your homepage:

    Look for <meta name="llms-txt" content="...">
    Look for <link rel="alternate" type="text/plain" href="...llms.php">

3. Validation Test

Use an online LLMs.txt validator such as https://c42.studio/llms-txt-validator-checker/ to check format compliance:

    Should pass all validation rules
    Should have required blockquote description
    Should have proper link formatting in all sections

Customization
Adding Custom Information

You can modify llms.php to include additional store-specific information:

php

// Add custom section in the generate() method
private function addCustomSection() {
    $this->output .= "## Custom Information\n\n";
    $this->output .= "- [Special Services](https://yourstore.com/services)\n";
    $this->output .= "- [Store Locations](https://yourstore.com/locations)\n\n";
}

Modifying Product Limits

Adjust the default product limit in the addProducts() method:

php

$max_products = (int)(MODULE_HEADER_TAGS_LLMS_TXT_MAX_PRODUCTS ?? 25); // Change default

Security Considerations

    The LLMs.txt file is publicly accessible (by design)
    No sensitive information should be included
    Database queries use proper escaping
    Error handling prevents information disclosure

Version Compatibility

This module is designed for:

    Phoenix Cart 1.0.8.x and later
    PHP 7.4 and later
    MySQL 5.7 and later
