CVS-Tools for Cotonti. Import and export from a CVS or Excel file
How to export products or articles to Cotonti CMS and then import from a CVS or Excel file into the MySQL database of your site.
How to export products or articles to Cotonti CMS and then import from a CVS or Excel file into the MySQL database of your site.
A basic set of tools for exporting and importing data to the Pages module table.
The principle of operation and capabilities of the "CVS-Tools for Cotonti" library:
1. Export articles from the database to a CVS file.
Exporting fields from a database table to a 1400-line file takes 1 second.
When exporting, all fields are unloaded, including extra fields or fields created by other extensions of your site on cotonti.
2. Google spreadsheets (intermediary)
The resulting file is imported into Google tables, edited, supplemented, then downloaded in cvs format, and then imported into your site's database via CVS-Tools for Cotonti.
3. Import articles into the database from a CVS file.
At the moment, the import tool works with the first 16 fields of the Pages module table, which are created by the module during installation, page_id, page_alias, page_state, page_cat, page_title, page_text, and so on, all of which can be viewed here, but without extrapolations.
The entire list of fields:
page_id
page_alias
page_state
page_cat
page_title
page_desc
page_keywords
page_metatitle
page_metadesc
page_text
page_parser
page_author
page_ownerid
page_date
page_begin
page_expire
page_updated
Other fields, if desired, can already be added independently.
The working environment and the list of necessary files in the folder "cvstools":
dbconfig.php
The configuration file for the database connection.
index.php
The entry file, where we get access to tools for importing and exporting data from rows in a table with articles.
fileslist.txt
Here we write down the names of the CVS files that were uploaded to the database import/update form.
exportcsvfile.php
A file with a line-by-line export script to a CVS file.
updateimportcsvfile.php
A file that combines two tools at once in its script is updating a row in the database if there is one and adding it if there is no such row.
importcsvfile.php
this is an import-only file.
The remaining files are not used. for now, they are stored for comparison and as an option.
Although the tools are tailored to the fields of the article module database table, they are not a module or plug-in of the Cotonti engine, and therefore are installed as an independent library.
The installation procedure for "CVS-Tools for Cotonti":
1. Download from the repository using the link below.
2. The downloaded archive contains the folder "cvstools".
We upload it to the root of your site.
3. Connect the database.
Opening it public_html/dbcvstools/dbconfig.php
// DB configuration and connection
const DB_HOST = "localhost";
const DB_USERNAME = "user";
const DB_PASSWORD = "password";
const DB_NAME = "database name";
we register our correct access data.
4. Interface and launch
We write it in the address bar
https://mydomain.com/cvstools/index.php
where, "mydomain.com " of course your domain.
Attention!. Always backup the database before any import.
A forum for discussing and supporting tools for exporting and importing articles from CVS files.
The current version is always available for download on the GitHub public repository.
Доброго здоровья. для импорта товаров лучше использовать плагин "Market Products Import CSV/Excel", но имейте ввиду, от только для модуля "Market PRO v.5". За помощью обратиться можно всегда, смотря какого характера требуется помощь. Лучше писать сразу на форуме, если вопросы общие и не являются заданием
здравствуйте, не получилось разобраться, как можно обратиться за помощью?