close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

wrong weight being calculated

Thread began 8/14/2014 1:32 pm by Christopher West | Last modified 8/14/2014 4:30 pm by Christopher West | 1451 views | 9 replies

Christopher WestCommunity Expert

wrong weight being calculated

Hi after conducting a few tests to make sure the correct shipping cost is added to the order. I foudn that the product weight is calculated wrong. I have attached the checkout.php file. the first occurrence of the weight reference is on line 217.

The idea is to add sun the weight for products, product options and then the quantity.

I was wonder what would be the best way to provide more information on this and/or testing methods (currently I am using <?php echo $DinkyCart->DisplayInfo("TotalWeight"); ?> to display the total weight for reference in my testing.

Are you able to tell from the attached php file if the the page is doing the calculation for ((products+product options) x quantity)

in my ecart object is does state weight quantity (but i wonder if it takes into accoutn for product options? attaching screenshot

The odd thing is even if it doesn't take into account product options weight the maths still doesn't add up correctly.

I give you an example:

I did a test order and manually I added up all the weight that stored in the database the total is : 348g
using <?php echo $DinkyCart->DisplayInfo("TotalWeight"); ?>to display the weight in the cart it calculates as 160g

Here are all the products in my cart (fr quantity I just repeated the products:

(main product) ball bracelet is 40g
(product option) Charm Type Small Diamond is 40g
(product option) Charm Type Small Diamond is 40g
(product option) Charm Type Small Heart is 40g

(main product) Ascending Double Print Large Keyring is 40g
(product option) Ascending Small Charm Heart is 0g
(product option) Ascending Large Charm Diamond is 0g

(main product) Ascending Double Print Large Keyring is 40g
(product option) Ascending Small Charm Heart is 0g
(product option) Ascending Large Charm Diamond is 0g

Silver Cleaning Cloth is 1g
Silver Cleaning Cloth is 1g
Silver Cleaning Cloth is 1g
Pandora Charm Carrier is 40g
Sterling Silver Initial is 40g
Dinky Fingerprint Impression Kit is 5g
Dinky Fingerprint Impression Kit is 5g
Dinky Fingerprint Impression Kit is 5g
Dinky Hand/Footprint/Paw Print Kit is 5g
Dinky Hand/Footprint/Paw Print Kit is 5g


I just dont understand where its getting 160g from?! I mean if you look I have 3 products with a weight of 1g each so the calculation should at least end with either a 3 or a 8 (if you take into account the 5g items)


Chris

Attached Files
paypal-checkout.php

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...