1

I customized my cart link using Views to show the cart product count. It's not updating the count. However, the normal cart block that came with drupal 7 and ubercart (in blocks) shows the correct count of my products in cart.

The view FIELDS list contains:

FIELDS
Cart product: qty

then use the replacement pattern: Your cart contains [qty] item(s) within the views Rewrite Output of this field.

Not that my custom cart link does not update but it's erratic. Clearing the cache does not seem to also affect my custom cart link. While the normal view cart block is working fine.

I just needed to be able to customize the cart link to say something like 'Your cart contains 2 item(s) VIEW CART on top of my website. and it seems it does not work though...

Anyone knows this issue?

0

The Ubercart block probably defaults to having DRUPAL_NO_CACHE set, while the view may have a different cache setting per default. Check the cache settings on the view?

May help for you to say whether this behaviour differs for logged-in and anonymous users.

2
  • The view is set to Caching:None and Block Caching: Do not cache and the behaviour is for both logged in and anonymous users.. – jan Dec 7 '11 at 15:25
  • If it helps, I think the main reason for this is because my custom cart items count is only taking into account one product item in the cart. The Views (query) pulls all items in the cart for all user sessions and then shows each qty per product. Aggregation is definitely the key. Summing all qty of all products in the cart, giving you the total items in your CART. I tried but it does not budge. Summing the qty column for the cart session id group does not change anything. Nothing seems to work. – jan Dec 9 '11 at 7:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.