D
D
Dmitry Baskakov2020-05-28 09:22:31
PHP
Dmitry Baskakov, 2020-05-28 09:22:31

What class/model/controller/file can be used to create a product in webasyst?

I more or less figured out how to add categories through the left file, but I can’t figure out how to add products.
For example, for categories there is a shopCategory.model file, which corresponds to a table in the database and has a number of methods, including the add() method.

However, in the shopProduct file, which should correspond to a table with products, there is only a method for deleting products, but I cannot find the addition

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail Ushenin, 2020-05-28
@usheninmike

See comments at the beginning of this file.

$product = new shopProduct();
$product->name = 'New product';
$product->save();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question