0

I am creating a custom module to get categories and regarding products from API and uploading them to the site.

After creating a controller for Categories, in the backend, there are duplicate categories created for some categories.

I am not getting the issue as this is not happening for all other categories.

The issue is every time Cron runs it creates the same category again.

Below is the snapshot of my category page in the backend.

duplicate categories

duplicate categories

6
  • Have you check by disabling your customization? Aug 18, 2020 at 7:00
  • Yes. I checked by doing that.
    – karanrp
    Aug 18, 2020 at 7:10
  • Then what is the result when you disable the customization? Aug 18, 2020 at 8:58
  • There is no data upload when I disable the custom module. Because my module is uploading the categories. If I disable it, any kind of data is not going to upload.
    – karanrp
    Aug 18, 2020 at 10:53
  • If you are reading data from a 3rd party API and creating categories on basis of that in Magento, then you need to keep a track of already imported categories as the API will always return the same data. Is the API returning some unique ID for each of the categories which doesn't change? Aug 18, 2020 at 11:02

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.