PDA

View Full Version : Displaying total weight on site


rmorrow
16-Feb-2005, 07:49 PM
Having searched these forums, I've found a couple of references to this and it seems it was requested to be added to the wish list. Does anyone know if this has happened yet? I'd like to display the total weight of the order (just as cart contents displays number of items and total value) so customers can get an idea of how much postage will be.

By the way, are there other variables available using the getCartItem() array - i.e. if getCartItem(1) is value and getCartItem(3) is no. of items, what's getcartitem(2)???!!!

Nadeem
18-Feb-2005, 08:42 AM
Hi Richard,

I'm afraid this has not been acted upon. When ever we add it onto the wishlist, it does not mean it will go onto the next patch. There is no variable for weight, so it would be quite hard in achieving what you want. You could do it with Custom variables and putting in your own javascript code within the Act_Primary.html, but i don't know how to do that.

getCartItem(1) is value and getCartItem(3)
There are only these two variables, have a look in ActinicExtra.js within your site1 folder and you will see:


/***********************************************************************
*
* getCartItem - Gets the Actinic Cart Value & No of Items
*
* Input: nIndex - Cart item index to retrieve
* 1 = TOTAL_VALUE
* 3 = CART_COUNT
*
* Returns: Requested cart item or 0 (zero) if not found
*
************************************************************************/


Kind Regards

DaveT
18-Feb-2005, 10:25 AM
Hi there

I implemented a weight based shipping system that adds up the weight as the browser buys items and the uses it in the checkout to look up live shipping tables (see www.steps-to-memories.com).

If you set a CUSTOMVAR for the weight of each product then you can write that CVAR into the template. Then you can create some script that is fired on an onclick event on the Add to Cart button to check the current weight (stored in a cookie), adds the new weight of the added product (from the CVAR) and resets the cookie with the new total.

On the site above, if you 'View Cart' then press CTRL + A, you'll see the total weight highlighted.