# eCart step 5 of 6 in the field Quantity what is that for?

Thread began 12/03/2009 12:06 pm by xberniex250371773 | Last modified 12/03/2009 4:36 pm by Ray Borduin | 550 views | 1 replies |

## 12/03/2009 12:06 pm  |  #1 xberniex250371773

### eCart step 5 of 6 in the field Quantity what is that for?

eCart step 5 of 6 in the field Quantity what is that for? The reason why I ask is because I want to beable to calculate multi items on one order by weight every 40Lbs. = one box so if a customer orders an order that weighs 160Lbs the calculators knows to divide it by 40lbs so there would be 3 packages at 40lbs x the cost of each package. Is there a way to do that?

## 12/03/2009 4:36 pm  |  #2 Ray BorduinWebAssist

I'd try setting the quantity to the total weight divided by 40. Something like:

<?php echo ((\$eCart1->TotalColumn("TotalWeight")<40)?\$eCart1->TotalColumn("TotalWeight"):\$eCart1->TotalColumn("TotalWeight")/40); ?>

Then set the weight value to:
<?php echo ((\$eCart1->TotalColumn("TotalWeight")<40)?\$eCart1->TotalColumn("TotalWeight"):40); ?>

That may work... The only thing I'm not sure of is it might complain about having a decimal in the quantity field and you might need to use:
<?php echo ((\$eCart1->TotalColumn("TotalWeight")<40)?\$eCart1->TotalColumn("TotalWeight"):ceil(\$eCart1->TotalColumn("TotalWeight")/40)); ?>

In both there will be slight issues. The first technique... if it worked... would assume that a 1lb package was 1/40 the price of a 40lb package. The second technique would charge for a 40lb package even if it only needed a 1lb package... like if someone orderd 41lbs of goods it would treat it as two 40 lb packages.

There is no way to get around this limitation without editing the code by hand.

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

## Everything else!

Close Window

Account or customer service questions?

Need technical support?

Content

Layout

Ease of use

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 Window

## We were unable to retrieve the attached file

Close Window

### Attach and remove files

• Text Formatting
• Insert Element
• Block Formatting
• Cancel
Close Window

Close Window

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