I just can not understand. There is a csv file, where the base of 10 thousand products ( http://savepic.ru/11935819.jpg ). There are 25 posts.
And there is a MySQL database and OpenCart2 on the hosting. By default there is a certain online store and, accordingly, the database is already full ( http://savepic.ru/11980874.jpg )
I just can not understand how I can put my entire list in the database instead of what is there. I made a table in MySQL, called myshop, and there I added all these 25 points. ( http://savepic.ru/11954250.jpg ) But then I realized that this was nonsense and I don’t know what to do next.
I did not work with the database, but now it is very necessary. How do I properly fill in the table with MySQL and make the goods appear in OpenCart?
I would be grateful for any help: Algorithm of actions, link to instructions, etc.
2 answers
So just your problem is not solved. The fact is that the open-card for storage of goods uses a set of tables, respectively, the data is separated by them.
I recommend you use the module to import data, for example: https://www.opencart.com/index.php?route=extension/extension/info&extension_id=17
Theoretically, the same can be achieved by writing sql queries that will insert the necessary data into the right tables, but for this you will have to qualitatively understand the structure of the tables and sql.
- Thank you, I used the module. True, it imported data is not clear where. It seems to be succesfull, but nowhere are these goods available) I thought it would be much easier to add a base of goods ..: \ - Artyom Oleynichenko
- Did you accurately compare the structure of the tables? Check in the database for the goods matching the store's id and language; there are often problems with this. - Andrew Hobbit
Yes, indeed, information about products in the OS is spread according to different tables in the database, and there are a lot of nuances. You prefer to use any import module. You may also have difficulties with standard import / export modules, because they are “sharpened” for a specific table structure, upload a standard table from one store to OC, upload to the other to the other, and they don’t upload images to the site, they just prescribe in DB the path to them. If you need to load the price with an arbitrary table structure, then you need a more flexible import module / parser of goods. I advise you to look at the free module Liveimport . Very flexible, functional and easy to use: choose the csv / xls file and specify the module, 1 column - product name, 2 column - description, skip 3 column, 5 column - attributes, etc. You can use php functions, conditions, add variables If you break your price into several parts, then even on an inexpensive virtual hosting there will be no problems with import.
- Judging by your description - this is what you need. Now I will try, thank you) - Artyom Oleynichenko
- Try, the solution is working, the author provides active support on the forum. Just do not forget about the backup copies of the database. I advise you to read the documentation for the module, at least briefly and look at the thread on the forum, there are useful tips. - Andrew Hobbit