close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Tax Value (URGENT PLEASE)

Thread began 10/14/2009 2:43 pm by info323054 | Last modified 11/12/2009 4:33 pm by Jason Byrnes | 6707 views | 31 replies |

info323054

Tax Value (URGENT PLEASE)

The cart has to calculate the tax value, but since it is already included on the price item, I need the cart to state the figures like this:

Let’s imagine an article that costs 79,92 euros (that is the amount appearing on the catalogue), then:

The catalogue shows: 79,92 and the cart must show this:

Sub-total: 68,90
Tax base: 68,90
Tax amount: 11,02
Total including tax: 79,92

How can I make my cart to work like that?

Sign in to reply to this post

Jason ByrnesWebAssist

you would need to modify the total price calculation to deduct the tax amount from the sub total, and create a tax calculation to determine the the total tax amount.

You could then create a tax charge to use the tax calculation and display the tax amount as a line item in the cart.


I'm not sure of your exact tax amount, but the totalprice calculation would be:
([Price] - ([Price] * <tax percentage>)) * [Quantity]



Create another calculation called tax:
[Price] - ([Price] * <tax percentage>)

Sign in to reply to this post

info323054

Tax calculation

Hi Jason Byrnes,

Thank you for your reply.

Please note that the tax percentage is passed through a session variable called TaxRate, since it is taken according to the state the customer states on his form.

In that case, what would be the formula of the total price calculation?, since I want the tax is deducted from the total price in the cart.

You wrote this formula:

([Price] - ([Price] * <tax percentage>)) * [Quantity]

Where the <tax percentage> is there should be the session variable called TaxRate that I have created? How shall I write it for it to work?

Shall I use this on the formula < >?

Please tell me the exact formula I have to write on the calculation.

Thank you for your kind help.

Regards,

Israel

Sign in to reply to this post

Jason ByrnesWebAssist

if the name of the session variable is "tax" the calculation would be:
([Price] - ([Price] * $_SESSION['tax'])) * [Quantity]

Sign in to reply to this post

info323054

Originally Said By: Jason Byrnes
  if the name of the session variable is "tax" the calculation would be:
([Price] - ([Price] * $_SESSION['tax'])) * [Quantity]  



Now it works. Thank you so much.

Sign in to reply to this post

Jason ByrnesWebAssist

You're welcome.

Sign in to reply to this post

info323054

Now I have one problem. I have generated 3 pages: cart.php, checkout.php and confirm.php. In order to get all values correctly in the confirm.php, I have to refresh the page manually. Otherwise, the calculation of the Tax, shipping etc is not done properly. How can I manage this?

Sign in to reply to this post

Jason ByrnesWebAssist

Just after the body tag on the confirm page add the following code:

php:
<?php

$<cart Name>->GetContent();
?>





where "<cart Name>" is the name of your eCart object.

Sign in to reply to this post

info323054

You make things so easy !!! Thank you so much indeed. Very professional. It works perfectly. Thank you again.

Sign in to reply to this post

Jason ByrnesWebAssist

Excellent, glad to hear it worked.

Sign in to reply to this post
loading

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