Number of products in category incorrect

  • Posts: 15
  • Thank you received: 0
11 years 3 weeks ago #98380

I've imported products from a CSV file and the first time after setting up the directory structure everything worked perfectly. I ran the import again today but there were problems and many of the products were either duplicated or not updated so I ended up deleting all products directly from the table. However, for some reason product categories were still displaying a number although they were empty. I did the cycle of deleting the products and re-importing and now the counts are quite bizarre.

There is a total of 3700 products in the table. Normally I use the accordion for browsing product categories but have temporarily enabled the default hikashop category view to see if that also displays the wrong number of products (which it does).

How does hikashop actually arrive at these figures and how can they still show something when the product table is completely empty? :huh:

I tried this solution without any change: www.hikashop.com/en/forum/3-bug-report/5...gories-is-wrong.html

www.benchmarkbuildingsupplies.co.uk/newsite/index.php/products

Deleting and creating the category structure again is not really a sustainable option...

Please Log in or Create an account to join the conversation.

  • Posts: 81597
  • Thank you received: 13081
  • MODERATOR
11 years 3 weeks ago #98523

That's because you deleted the products in the hikashop_product table but not the links between the products and the categories in the hikashop_product_category.
Thus, the counts get screwed because the system still finds the links between the old products which were deleted via the database and the categories on top of the new products links.

Please Log in or Create an account to join the conversation.

  • Posts: 15
  • Thank you received: 0
11 years 3 weeks ago #98528

Ahhh, of course, that makes sense. I'll try deleting the obsolete connections and hopefully that should do the trick

Please Log in or Create an account to join the conversation.

Time to create page: 0.055 seconds
Powered by Kunena Forum