I'm using the ubercart cart block on my site. The default behaviour ist that the block shows the total number of items.
I'm looking for a solution to display only the total count of the selected products, not the item count.

For example: I have 2 products in my cart, each 10 items. The block now shows a total count of 20 items.
Instead, I need just the "2 products" quantity in my cart block.

Any suggestions to do this are very welcome...

Comments

DanZ’s picture

One way would be to make your own module that defines a block. You could copy-and-paste the current cart block code into the new module, but change the bit that does the counting. Then, use your custom cart block instead of the standard cart block.

longwave’s picture

#1391454: The uc_cart block should only increment $item_count if $display_item is not empty is related, but more to do with the way product kits are counted.

TR’s picture

Category: Feature request » Support request
Issue summary: View changes
Status: Active » Closed (works as designed)

As this can be done easily through theming or through defining your own block, I don't see the need for adding this as a feature.