Where is "TotalTax" field defined in ShoppingCartContent.ascx?

Jerreck McWilliams asked on April 14, 2014 20:42

Where is "TotalTax" field defined in CMSModules\Ecommerce\Controls\ShoppingCart\ShoppingCartContent.ascx?

Is it the TotalTax property of the ShoppingCartInfo object?

Is it within the DataTable of ContentTable of the ShoppingCartInfo object?

Is it within the DataSet of ContentTaxes of the ShoppingCartInfo object?

Correct Answer

Jakub Oravec answered on April 22, 2014 06:44

Hi Jerreck,

The correct answer is B. GridView control in ShoppingCartContent.ascx uses ContentTable of ShoppingCartInfo as data source - see ReloadData() method in code behind. TotalTax column of this table contains tax values for individual items.

Property ShoppingCartInfo.TotalTax contains the sum of taxes for all cart items.

And finally, ShoppingCartInfo.ContentTaxes DataSet serves as a cache for tax classes applicable to (some of) shopping cart items. One will probably only use this in some cases of taxes-related customizations.

1 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.