Hi,

Just been picking through trying to work out if there's a uc_cart_get_total($cid) function to get the current cart contents subtotal. Seems there isn't, but it would be useful. At the moment the math is done in theme functions, which feels wrong. IMHO it should be a function that calculates the total of all the items presently in the cart. Any thoughts?

Comments

greg.harvey’s picture

Title: Include an API function for cart total » Include an API function for cart's subtotal

Title makes it sound like a duplicate of the already-committed total ITEMS patch. To be clear, this is about subtotal. Title altered.

rszrama’s picture

This is related to #508888: Add API func for the total cart qty... dunno why I didn't knock it out at the same time. :-/

tr’s picture

Version: 6.x-2.x-dev » 7.x-3.x-dev

New features should go into 7.x-3.x first at this point. I'd like to see the whole cart API reviewed for missing and redundant functions, and get some more tests for these.

tr’s picture

Version: 7.x-3.x-dev » 8.x-4.x-dev
Issue summary: View changes