close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Storing Order's Total Weight in Database

Thread began 12/15/2011 12:00 am by martin400112 | Last modified 3/21/2012 6:21 am by Jason Byrnes | 1664 views | 5 replies |

martin400112

Storing Order's Total Weight in Database

Hi,
My client at www.piccolaonline.co.uk would like to store the total weight of orders placed in the database.

My problem is that I cannot find where a session variable or suchlike is stored in order to place the order's total weight in the database. As far as I can see, eCart just keeps the shipping cost in the database.

Can anyone please help me find the total weight or how to calculate it please?

Many thanks,

Martin

Sign in to reply to this post

Nathon Jones Web Design

product weight?

Hi Martin,

I assume each product has a weight value, right? Is your shipping rule calculating the shipping cost based on the total weight of all items in the basket?

If that's the case then doesn't that mean that the weight calculation is already being carried out? You just need to create a session variable, or something similar, and then store that session variable value in the database.

Sorry if I've misunderstood your request.

Nath.

Sign in to reply to this post

martin400112

Hi Nathan,
Thanks for coming back to me a while ago. sorry I've not got back to you.

I think you have misunderstood what I am looking for. Here's the scenario:

sachetsandmore.com (site name has changed since my original request) have a site where the shipping costs are calculated based on the total weight of the cart.

In order to pay their carrier for the shipping, they need to know how much the order is going to weigh, based on the designated shipping costs.

eCart calculates the total weight of the cart correctly and bills the customer appropriately.

However...I have tried to add the TOTALWEIGHT session variable (which I would expect to be the total weight of the cart) to the database which I have managed to do successfully....BUT:

The TOTALWEIGHT session variable does not appear to be the total weight of the cart...it only ever saves the total weight of the first line of the cart to the database and NOT the total weight of the entire cart.

So, herein lies the problem - how do I save the total weight of the cart to the database?

Thanks for your help.

Martin

Sign in to reply to this post

Jason ByrnesWebAssist

sounds like you are using the following code for the binding:

<?php echo $cartName->DisplayInfo("TotalWeight"); ?>

where cartName is the name of your cart object. change that to use the TotalColumn function instead of DisplayInfo

<?php echo $cartName->TotalColumn("TotalWeight"); ?>

Sign in to reply to this post

martin400112

Brilliant. Thanks - worked a treat!

Sign in to reply to this post

Jason ByrnesWebAssist

you're welcome.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...