close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Adding More Columns in eCart Object?

Thread began 4/08/2009 1:36 pm by Art | Last modified 7/16/2010 10:42 am by Art | 3679 views | 16 replies

whit368229

flat rate shipping based on CategoryID

OK, where was I.... the price, category and quantity are now slightly different, but the rule should basically the same. The goal is to add flat rate shipping based on CategoryID when 1-10 CategoryID 4 items are added to the cart, the total shipping for those Cat4 items = $9.50.

My calculation: PaperShipping = abs([CategoryID] == 4) * [Quantity]

I have the (slightly modified from your example) rule set up on my WA_Store_Cart_PHP.php as:

php:
//eCart Rule

function WAEC_WA_Store_Cart_Paper()  {
  $totalShipping = 0;
  if (true && (($this->ConditionalTotal("Quantity", "CategoryID", "4") > 0))) {
    $totalShipping += ($this->TotalColumn("PaperShipping") / 10) * 9.50;//Result
  }
  return WA_eCart_FormatNumber($totalShipping, $this->ForceDecimalsC, $this->DecimalPlacesC);
}
//eCart Rule



IF I add 10 items to the cart, all is well with a $9.50 ($0.95 x 10) flat rate charge, but if I add 5 items to the cart, the flat rate = $4.75 ($0.95 x 5).

Thanks for getting me this far!

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