6 replies [Last post]
StephenGWills's picture
Offline
Uber DonorBug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Not Kulvik
Joined: 08/07/2007
Juice: 414
Was this information Helpful?

Company wants to see:

Qty, Desc, Unit-Price, and Subtot == (Qty*Unit-Price) as the Cart table row.

I'm going blind trying to find the point at which the qty and price are serialized into the cart in the product module and how to break the data back out.

Is this a reasonable chore?

Thanks

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: Adding Item Price to cart view

That information is part of uc_product_cart_display(). This gets passed to uc_cart_view_table() and the hook_table_alter() you're planning on writing as an element of $form['items']. You can get the description (body) and unit price (sell_price) by using node_load() on the nid contained in the item.

Is that enough to get you started?

zmove's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 1192
Re: Adding Item Price to cart view

I begin to create a little module that make that in the cart view and the order view. I will post it tomorrow (because I'm not on my work PC now).

But it's true, it's should be good to implement that in core, it's very easy to do and this could be usefull for a lot of people

kulvik's picture
Offline
Uber DonorBug FinderEarly adopter... addicted to alphas.Cool profile pic award.Internationalizationizer
Joined: 08/14/2007
Juice: 336
Re: Re: Adding Item Price to cart view

Excellent. This would be useful for me also.

______________
Best regards,
Thomas Kulvik
Ny Media AS
www.nymedia.no

zmove's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 1192
Re: Adding Item Price to cart view

I just posted a contribution that add extra columns to some tables.

It add an unit price to cart as you want

Download it here

arielgold's picture
Offline
Joined: 02/14/2010
Juice: 63
Re: Re: Adding Item Price to cart view

Couldn't figure out how to get the add extra column module to work, but this did:

http://www.ubercart.org/forum/development/8974/insert_item_price_column_...

Hobokoto's picture
Offline
Joined: 04/28/2010
Juice: 100
Re: Adding Item Price to cart view

The snippets people have been posting on this thread, and elsewhere, work great for the regular cart page.

But what about cart review table on the Checkout page? I'm still trying to get that going.

In exploration of this issue I'm simply trying to just affect that cart review table in SOME way but after going through 5 functions I still can't seem to be able to touch it. Like changing the title from "Cart Contents" to anything else. Am I missing something? I'm clear cache on the Performance page, and refreshing admin and/or module pages for the hell of it.