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

Prestashop 8.1.3 - Each new import with file.csv deletes the categories assigned to the products #36183

Open
2 tasks done
Delvezio opened this issue May 17, 2024 · 3 comments
Open
2 tasks done
Labels
8.1.x Branch BO Category: Back Office Bug Type: Bug Import / Export Label: Which BO under menu is concerned New Products Page Label: Which BO under menu is concerned NMI Status: issue needs more information

Comments

@Delvezio
Copy link

Prerequisites

Describe the bug and add attachments

Good morning,
I have a problem with assigning categories and subcategories.
Every day I manually reload a .csv file that I need to update the stocks of the over 1000 products I have on my site, the upload is set with a table that only updates the prices and stocks, all the other columns (name, category, etc) are ignored. After import, however, the categories and subcategories are reset on all products, leaving only one category, the highest among those assigned, even if it had another one set as default, and removing all subsequent subcategories.

Example:
I assign to product A the generic category 1 (Default category), the subcategory 2 and the sub-subcategory 3,
I assign generic category 1, subcategory 2 and sub-subcategory 3 (Default Category) to product B.
I assign only subcategory 2 and sub-subcategory 3 to product C (default category)

After the next import:
Products A and B remain assigned only in category 1, subcategory 2 and sub-subcategory 3 are removed, even if 3 for product B was set as Default.
Product C remains assigned to subcategory 2, and sub-subcategory 3 (set as default) is removed.

The big problem is that if I only assign the sub-subcategory 3, even if it is a daughter of 2 which in turn is a daughter of 1, the product appears only in 3 and does not appear either in category 1 or in subcategory 2.

In practice, the system does not allow me to assign more than one category to each product, or to essentially have subcategories.

website: sanmicheleparafarmacia.com
Prestashop version: 8.1.3
PHP version:7.3
Steps to reproduce the problem:

  1. Import product from file.csv (without modules) from Advanced Parameters -> Import
  2. Add manually category and subcategory to product from edit product page in backend
  3. Update the products with a new.csv file, again going from Advanced parameters -> Import, using a data matching configuration ignoring almost all the columns except reference, stock and price, therefore also ignoring the categories column.

Add-category-1
Add-category-2
1
2
3
4
5
Final-result-after-second-import

Expected behavior

I want the categories and subcategories to remain those assigned manually and not to be deleted each time a new.csv file is imported

Steps to reproduce

  1. Import products from file.csv (without modules) from Advanced Parameters -> Import
  2. Add manually category and subcategory to product from edit product page in backend
  3. Update the products with a new.csv file, again going from Advanced parameters -> Import, using a data matching configuration ignoring almost all the columns except reference, stock and price, therefore also ignoring the categories column.

PrestaShop version(s) where the bug happened

8.1.3

PHP version(s) where the bug happened

7.3

If your bug is related to a module, specify its name and its version

No response

Your company or customer's name goes here (if applicable).

Parafarmacia San Michele s.r.l

@Delvezio Delvezio added Bug Type: Bug New New issue not yet processed by QA labels May 17, 2024
@Delvezio
Copy link
Author

I forgot a detail, the categories and subcategory are deleted only for the products that are present in the new.csv file, but if they are not present the assigned categories remain

@AureRita
Copy link
Contributor

Hi @Delvezio,

Thank you for your clear report. Unfortunately, when I try to reproduce it, I can't have the same behavior than you as you can see :

recording.210.webm

Did I miss something ?

Waiting for your feedback

@AureRita AureRita added Waiting for author Status: action required, waiting for author feedback NMI Status: issue needs more information 8.1.x Branch Import / Export Label: Which BO under menu is concerned BO Category: Back Office New Products Page Label: Which BO under menu is concerned and removed New New issue not yet processed by QA labels May 21, 2024
@Delvezio
Copy link
Author

Delvezio commented May 21, 2024 via email

@paulnoelcholot paulnoelcholot removed the Waiting for author Status: action required, waiting for author feedback label May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.1.x Branch BO Category: Back Office Bug Type: Bug Import / Export Label: Which BO under menu is concerned New Products Page Label: Which BO under menu is concerned NMI Status: issue needs more information
Projects
None yet
Development

No branches or pull requests

3 participants