You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.
Can someone teach me how the cart totals are built? I'd like the cart to continue to build the totals as it currently does, but I'd like to total the amounts from a custom field in the ecom_prod table for display in the checkout totals row. For example if two items are in the cart, product id 1000 and product id 2000, with respective prices of $25.00 and $5.00 and custom fields of $35.00 and $6.00 respectively, I can display in the totals row, "Your price shopping with us $30.00. Your price if you'd have shopped at theotherjackholes.com $41.00", the latter being a total of the custom fields, respective of the quantities of each line item in the cart, of course.
Offline
To do this, you'll need to modify the {private}/apps/ecom/ECOM_Cart/ECOM_Cart.php file. In the build_item() function at the bottom, add your cost field as a key to the $item array. Once that key is added, when looping through the cart in {private}/apps/ecom/ECOM/cartdisplay.php, you can add up the totals of the cost field and present what you like.
Offline