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

rating

trouble adding [charges] to calculation

Thread began 11/21/2009 8:18 am by jonojameskelly309911 | Last modified 11/24/2009 4:56 pm by Eric Mittman | 853 views | 3 replies |

jonojameskelly309911

trouble adding [charges] to calculation

In my calculation column I am trying to add [Charges] into the calculation.

I have the following : [myvat] + [TotalPrice] + [Charges] - myvat is another calculation

This does not work, I just get a blank screen. If I change it to [myvat] + [Totalprice] it works fine but then leaves out the charges.

I have tried different ways of typing [Charges] like Charges, "Charges", ([Charges]) yet nothing works.

I can't just use the default total you get with Ecart (GrandTotal) as it doesn't include [myvat].

Is there anyway to add CHARGES to my calculation and get it to work?

I would really appreciate any help.
Many thanks.

Sign in to reply to this post

Eric Mittman

A calculation is on a per item basis and can only include values from the cart columns. It will not be possible to include other charges from the cart in a calculated column. You could store the total vat for each item with a new column in the cart, then you could setup a charge rule that will be based on the subtotal of this vat column in your cart. Please explain a little about how you would like this working in the end and we can give you some pointers on how to get it that way.

Sign in to reply to this post

jonojameskelly309911

Hi. What I have decided to do is the following:

<?php $vat = $pass->TotalColumn("myvat");
$delivery = $pass->GetCharges();
$subtotal = $pass->TotalColumn("TotalPrice");
$vatdelivery = $vat + $delivery + $subtotal;
echo number_format($vatdelivery,2);
?>

It works great accept for when I use Universal email to send the mail with this code in it. Instead of showing the $vatdelivery amount it is blank. Should I try get this into a session variable or something?

Sign in to reply to this post

Eric Mittman

That is exactly what you should do, storing this value in a session variable will ensure that you can get access to it in the email. Sometimes the scope of variables can be a tricky thing in php, but luckily using the session variables is easy way around this.

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