S
S
santime2018-05-29 04:00:23
opencart
santime, 2018-05-29 04:00:23

How to add a product in opencart using PHP?

Actually, you need a script, or help in understanding how to set up a regular addProduct($data) function from admin\model\catalog\product.php of the ModelCatalogProduct class.
I'm not very good with OOP, I can't figure out how to make this function work in my script.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
web-mechanic, 2018-07-17
@amfetamine

$this->model->load('catalog/product);
$this->model_catalog_product->addProduct($data);
where $data is an array with all product data

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question