Andrew Berezin http://eCommerce-Service.com, @mc12345678 https://github.com/mc12345678, @lat9 https://github.com/lat9
Thanks Special thanks to DivaVocals for the quality of the readme.
This Script generates a Sitemap as described here:
It can be downloaded from the Zen Cart Plugins repository here: https://www.zen-cart.com/downloads.php?do=file&id=367
Note: Version 3.9.9 and later require that the store have a CHARSET
that specifies utf-8
encoding and a database using a DB_CHARSET
of either utf8
or utf8mb4
.
1.5.8[a], 2.0.x
https://www.zen-cart.com/showthread.php?126810-SitemapXML-v-2
None
Yes (creates new records into configuration_group
, configuration
and admin_pages
tables).
Installation of this contribution is done at your own risk. Backup your Zen Cart database and any and all applicable files before proceeding.
Generation of xml-sitemaps for (separate files):
EZ-pages
If the products, categories, reviews have not changed since the last generation (time creation corresponding xml-sitemap file), a new xml-sitemap file not created (using existing xml-sitemap).
Priority is calculated on the basis of the positions in the selection from the database, ie the operator ORDER BY in the sql query. First item have priority=1.00, last=0.10. So can no longer be situations where all items in the file have the same priority.
ORDER BY p.products_sort_order ASC, last_date DESC
ORDER BY c.sort_order ASC, last_date DESC
ORDER BY r.reviews_rating ASC, last_date DESC
ORDER BY p.sidebox_sort_order ASC, last_date DESC
ORDER BY last_date DESC
ORDER BY last_date DESC
inline=yes
. Output file sitemapindex.xml. In Google Webmaster Tools you can define your "Sitemap URL":
https://your_domain/index.php?main_page=sitemapxml&inline=yes ... and every time Google will receive a fresh sitemapindex.xml.genxml=no
. Don't generate xml-files.rebuild=yes
. Force rebuild all sitemap*.xml files.token=xxx
. If the site uses a non-blank "Execution Token", that token must be included for the sitemaps to be generated.Comments and suggestions are welcome. If you need any more sitemaps (faq, news, etc) you may ask me, but I will do only if it matches with my interests.
YOUR_Admin
folder in the sitemapXML
older to match the name of your admin folder.sitemapXML
to the root of your store. Do not upload the sitemapXML
folder, just the contents of this folder and be sure to copy all of the files to your store!! Most issues are caused by store owners who decide to not load all of the module files)./sitemap/
to 777.Note: If you are upgrading from a version prior to v4.0.0 to v4.0.0 or later, there are files to be removed from your site. See this Wiki article for additional information.
YOUR_Admin
folder in the sitemapXML
folder to match the name of your admin folder.sitemapXML
to the root of your store. Do not upload the sitemapXML
folder, just the contents of this folder and be sure to copy all of the files to your store!! Most issues are caused by store owners who decide to not load all of the module files).See this Wiki article for additional information.
Configuration :: Sessions :: Force Cookie Use
is found to be 'True'; search-engine crawlers won't be able to index the site.<?
, usage. Should be <?=
.v4.0.1 02/04/2024 (lat9, torvista)
Zen Cart v2.0.0+ deprecates language::catalog_languages
property.
Correct PHP Warning/Error when creating a new Sitemap file number.
Correct PHP Warnings when /sitemap.xml
doesn't exist.
v4.0.0 08/02/2024 (lat9)
Drops support for Zen Cart versions prior to 1.5.8; testing on PHP versions 7.4 through 8.3 and Zen Cart 1.5.8 through 2.0.0-alpha1.
Removes search-engine "ping", since the SE's no longer support that feature.
Restructure/simplify the installation, see this Wiki article for additional information.
Add messaging regarding a site's robots.txt
file, since it's now important to identify the main XML sitemap there.
"Execution token" characters are limited due to storefront sanitization; messaging added to the admin tool.
Correct various issues when a site compresses, i.e. gzips, the sitemap files.
Main sitemap file didn't appear in the admin tool's file list if its name didn't begin with 'sitemap'.
utf8_encode
function.