1
votes

I am working on Drupal 7.12 and Ubercart 3.0 for a store website. While working on Product Categories, I am getting wrong count of items in parent category as well as sub-parent or sub-sub-parent category like:

Cat A(5)
      Cat A-1(3)
            Item 1
            Item 2

I think there is a bug either in Taxonomy module or uc_catalog module. I have searched over the net but didn't find any perfect solution. So anybody there having any workaround for this specific problem as I have to show the count of items in front of their respective category and total in parent category.

It appears that it is not counting only product items but it is also counting category along with product items.

Thanks for your time.

Regards

1
Anyone have answer.....so large drupal community at stackoverflow but no answer yet...is drupal out of the picture.... - user1416732

1 Answers

0
votes

pls refer to this part of code of uc_catalog.module

  $query->entityCondition('entity_type', 'node')
    ->entityCondition('bundle', $types)
    ->propertyCondition('status', 1) // Don't include unpublished products.
    ->propertyCondition('language', array($language->language, 'und')) 
    ->fieldCondition('taxonomy_catalog', 'tid', $branch->tid)
    ->count();
  $num = $query->execute();

the above is an example to count only the nodes with und(neutral language) and current language. This is the deficiency of the ubercart.