I assume you can retrieve the item list in the shopping cart. Then use the aggregate list function to calculate the values. Look at the documentation here: https://world.mendix.com/display/refguide5/Aggregate+List Otherwise specify some more what your problem is exactly.
Regards,
Ronald
You could for example use a before commit event for this on your shopping cart entity. In the before commit you have to retrieve all associated shopping cart lines and do a sum of all the prices. Set the result in an attribute in your shopping cart object.