Answer the question
In order to leave comments, you need to log in
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
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 questionAsk a Question
731 491 924 answers to any question