Kryptronic Software Support Forum

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.

#1 02-11-2014 12:05:05

JayCR48
Member
From: Ohio
Registered: 03-27-2008
Posts: 87
Website

Cart Totals

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.


We distribute high quality steel auto body panels for use in the rust repair industry.

Offline

 

#2 02-12-2014 10:22:26

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Cart Totals

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.


Nick Hendler

Offline

 

Board footer