Installation
Requirements
Section titled “Requirements”| Item | Requirement |
|---|---|
| Platform | CS-Cart Multi-Vendor or Multi-Vendor Ultimate 4.17.2 – 4.22.x. The add-on will not install on CS-Cart (Ultimate) because vendor domains only make sense for vendors. |
| PHP | PHP 7.2.5 – 8.3, as supported by your CS-Cart version. The code avoids PHP 8-only syntax. |
| Web server | A virtual host that answers for the vendor hosts and serves the same store (see below). |
| DNS and HTTPS | A wildcard DNS record for the subdomains and a certificate that covers them. Certificates for vendors’ own domains are your responsibility. |
| Other add-ons | None required. Vendor plans is needed only for rules per plan; without it the defaults from the settings apply to every vendor. |
DNS and web server setup (before vendors use it)
Section titled “DNS and web server setup (before vendors use it)”The add-on decides what a host shows. Your server has to deliver the request to the store first.
Subdomains
- Create a wildcard DNS record that points to your store:
*.example.com A 203.0.113.10(use your own IP, or a CNAME to your store host). - Make your web server accept these host names for the same site: in Apache
ServerAlias *.example.com, in nginxserver_name example.com *.example.com;. - Get a wildcard certificate (
*.example.com) and install it for that site. Let’s Encrypt issues wildcard certificates with the DNS-01 challenge.
Vendors’ own domains
- Choose the target the vendors point their domain to: a host name (for example
domains.example.com, a CNAME target) and/or the IP address of your server. Enter it in the add-on settings, section DNS check. - Your web server must accept any host name for the store site (a catch-all or default virtual host), or you add each approved domain.
- HTTPS for each custom domain needs a certificate. Common ways: a web server that obtains certificates on demand (Caddy on-demand TLS), a reverse proxy or CDN service that terminates TLS for customer domains, or certbot per domain after you approve it. The add-on does not issue or install certificates.
Reverse proxies and Varnish. Forward the original Host header to CS-Cart. Do not rewrite or normalize it. If your proxy has to change Host, make it send the visitor’s host in X-Forwarded-Host and turn on Trust the X-Forwarded-Host header in the add-on settings (see Configuration). Strip a client-supplied X-Forwarded-Host at the edge. Varnish’s default vcl_hash already includes the host, which keeps one cached page per host (see Developer notes).
Install from the archive
Section titled “Install from the archive”- In the admin panel, go to Add-ons → Manage add-ons.
- Use the page’s upload option (Manual installation / Upload & install add-on, depending on the version).
- Select
kv_vendor_domains-1.0.0.zipand confirm the upload. - The add-on installs as Active. Open its settings and review the defaults (see Configuration). Set the Base domain if it differs from your marketplace host.
- On the License tab, enter your license key and save. If you bought the add-on on the CS-Cart Marketplace and entered the license number in Add-ons → Manage add-ons, skip this step. Until a key is verified, the add-on works for 14 days (see License).
What the installer does:
- Creates two tables:
cscart_kv_vendor_domainsandcscart_kv_vendor_domains_plan_rules. Core tables are not altered. - Adds two privileges in the Vendors section: Vendor domains: Can view and Vendor domains: Can edit.
- Copies the storefront template hook and script to every installed theme.
- Installs the English language variables.
Install manually (FTP)
Section titled “Install manually (FTP)”- Unpack the archive. It mirrors the CS-Cart root:
app/,design/,js/,var/. - Upload these folders to the store root, keeping the structure.
- Go to Add-ons → Manage add-ons, find Vendor Subdomains & Custom Domains in the Not installed list and click Install.
After installing
Section titled “After installing”- Open Vendors → Vendor domains → Plan rules and decide which plans may use subdomains and custom domains.
- Add the daily re-check to cron (it keeps custom domains honest):
php /path/to/store/admin.php --dispatch=kv_vendor_domains.recheck- Visit a vendor host once. If you see your marketplace home page instead of the vendor page, the host name is not an active domain; if the browser shows a certificate or connection error, fix the DNS or HTTPS setup above.
Upgrading
Section titled “Upgrading”- In Add-ons → Manage add-ons, upload the new package with Manual installation.
- CS-Cart offers two ways: Use the dangerous way (tick I know the risks… first) replaces the files and keeps all data. Choose this one. The safe way uninstalls first and deletes your domains and plan rules.
- Open any admin page. The add-on completes the upgrade by itself (new tables, columns, settings, language variables). Existing data and setting values are kept.
If you bought the add-on on the CS-Cart Marketplace, you can also upgrade it in Administration → Upgrade center.
See the CHANGELOG for what changed in each version.
Uninstalling
Section titled “Uninstalling”Add-ons → Manage add-ons → Vendor Subdomains & Custom Domains → Uninstall removes the tables (all domain records and plan rules), the settings, the privileges, the language variables and the templates. Vendor hosts stop being served: visitors on them are sent to your marketplace by CS-Cart. Products and vendors are never modified.