R
R
ReActor Dmitry Vershansky2021-01-19 10:46:29
Online shopping
ReActor Dmitry Vershansky, 2021-01-19 10:46:29

How to fill an online store without a CMS with goods automatically?

Let's assume that there is a .csv or .excel file with product data. This data needs to be parsed (imported) into the corresponding objects of product cards. An important nuance is that the online store does not have a CMS. Is it possible to make automated filling of product data into objects from csv or excel? Like an ajax request looping through data from table cells and pushing them directly into the code?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Ezhov, 2021-01-19
@HunteR-VRX

If you have access to the database, you can try to create queries to insert values.
Let's say that in column A - the name of the product, in column B - the price, then using the formula in column C (in the example below for cell C1) you can get a data set like
=СЦЕПИТЬ ("('",A1,"', ", B, "),")

('Рога', 1000),
 ('Копыта', 1000),

Well, then in a text editor, put all this in a query like
INSERT INTO Goods (GoodName, Price) VALUES
 ('Рога', 1000),
 ('Копыта', 1000)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question