Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 Customization
 How to add weight and TotalWeight in cart?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

LAZZE
Starting Member

Sweden
18 Posts

Posted - January 11 2006 :  04:40:25  Show Profile  Reply with Quote
I have to use the weight of every product put in the shoppingcart, and also calculate the totalweight of the products in the cart.

does anybody have some info of where i do that?

Lars

rustytec
VP-CART New User

Australia
113 Posts

Posted - January 11 2006 :  05:49:58  Show Profile  Reply with Quote
Hi Lazze,

In the product screen there is the field to record the weight of the product.

When going through checkout, the weight is tallied and a variable Getsess("totalweight") holds this value.

The shipping calcs come in to play and it can look up the appropriate charges based on this cumulative.

Does this help?

regards

Rustytec
Russ
Go to Top of Page

LAZZE
Starting Member

Sweden
18 Posts

Posted - January 12 2006 :  00:37:47  Show Profile  Reply with Quote
well yes and no, Russ

I need this calculation in the shoppingcart. not in the checkout.

and not only weight- another value from the productstable -"pother2" is to be used in much the same way.

the reason we need this is because we have to "force" the customer to shop a filled box, so to speak. each product has a value in pother2, wich tells us how much space it takes up in an box (1,2 or 6 boxunits) . when a box is unfilled no checkout should be possible. this means probably that i have to write a javascript call to a function that gets called when a customer clicks the checkout button. and then i check the products in the cart to se if they are filling up one or more boxes (modulus "filled box value")

the weight is just needed for a real time shipping calculator, where we supply a link to a shipping company, and the cart total weight has to be supplied in the querystring.

so perhaps the session totalweigt is possible to grab in the cart?
on the other hand where and how could i create a session variable for the potyher2 value?

otherwise i assume that i have to fill an array with all the productid's and quantity's that resides in the cart.(they are already there) and then extract from the DB the apropriate values for weight and pother2?

then i can do the calculations i need on the addtocart and display the link to the shipping company as well as the status for the filled/unfilled box?

Lars
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00