Answer the question
In order to leave comments, you need to log in
Importing OpenCart products from tools.by?
Good afternoon!
Maybe someone faced such a problem:
On the site tools.by there is an opportunity to export goods yml.
I installed the opencart module "Import YML". When I try to import products, everything imports fine EXCEPT the categories.
It gives the following error:
In fact, there are only 2 errors (red and blue), but the red one pops up 1 time, and the blue one for each product.
Code lines:
214)
foreach ($categories->category as $category) {
$categoriesList[ (string)$category['id'] ] = array(
'parent_id' => (int)$category['parentId'],
'name' => trim((string)$category)
);
}
$data = array(
'product_description' => $product_description,
'product_special' => array (),
'product_store' => array(0),
'main_category_id' => $id_category,
'product_category' => array (
$id_category,
),
Answer the question
In order to leave comments, you need to log in
1. Log $categories->category, or better just $categories. There it will be clear what is wrong with the categories.
2. You are using an undeclared $id_category variable. Perhaps the first mistake will solve this issue. If not. Just look where you can get the id of the product category and substitute it into the array.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question