Closed (fixed)
Project:
Ubercart
Version:
7.x-3.x-dev
Component:
Taxes
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 May 2011 at 08:55 UTC
Updated:
6 Jun 2011 at 21:51 UTC
In uc_taxes_uc_cart_view_form_alter() and uc_taxes_uc_cart_item() the price of an item in the cart is modified to include taxes where applicable. Can there could first be a check to see if the item is a valid node?
I know that, strictly speaking, there should never be a non-node in the cart, but it's sometimes useful to show something in the cart other than a product, and there's no easy way to do this other than adding it as a "fake" cart item (this is the strategy used by uc_coupon). This currently produces some runtime "property of non-object" notices. The attached patch prevents this.
| Comment | File | Size | Author |
|---|---|---|---|
| uc_taxes-check-for-valid-node.patch | 1.87 KB | wodenx |
Comments
Comment #1
wodenx commentedNote: this is connected to #1156930: uc_product_get_picture should check for valid node. Another, less black-magical way of dealing with this would be to standardize the way uc_cart displays items accross the three contexts (cart page, cart block and cart checkout pane) - say, to use a tapir table in all three. This would make it easier to add something to the cart display without actually adding it to the cart. But that's a more extensive rewrite.
Comment #2
longwaveCommitted, thanks for the patch.