Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Product position is reset to zero after product import/update #100

Open
JoostWan opened this issue Jul 31, 2019 · 1 comment
Open

Product position is reset to zero after product import/update #100

JoostWan opened this issue Jul 31, 2019 · 1 comment

Comments

@JoostWan
Copy link

JoostWan commented Jul 31, 2019

When we run the import to update qty of products, the position of that product will be reset to zero in the category.

We use $this->setBehavior(Import::BEHAVIOR_ADD_UPDATE);

   $productStock[] = [
                        'sku' => $row[1],
                        'use_config_manage_stock' => 0,
                        'use_config_backorders' => 0,
                        'manage_stock' => 1,
                        'backorders' => 1,
                        'is_in_stock' => $stockStatus,
                        'levertijd' => $row[7],
                        'qty' => $qty
                    ];

I tested it also with the normal import function in the backend. Then the product position in the category will be the same and not reset to zero.

@ReichhartTom
Copy link

I had the same problem today. After a long research I noticed on the import page the dropdown shows Add/Update but the behavior is append. If not ::BEHAVIOR_APPEND is used all affected entries in catalog_category_product are always deleted and then added again with position 0. For whatever reason.

look here: dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ProductTest.php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants