close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Tax-inclusive prices in Power Store 3

Thread began 2/17/2010 6:14 am by info275691 | Last modified 2/24/2010 4:25 pm by Eric Mittman | 1121 views | 10 replies |

info275691Beta Tester

Tax-inclusive prices in Power Store 3

Hi,

I like to show all product prices inclusive the tax. (19%)
But the tax amount needs to be shown in the shopping cart.

How can I can do that without changing a lot of code?

Thanks.

Sign in to reply to this post

Eric Mittman

How exactly would you like to show the tax inclusive price? Would you like it show this instead of the regular price on the details page, or in the cart?

Do you want tax to show as a subtotal for all of the items? Please describe as best as you can how you would like this to look from the perspective of the user that will be adding the items.

In general you can edit about any part of the PowerStore if you have the rite tools and info, but depending on exactly how you would like this to work it may require some custom coding.

Sign in to reply to this post

MagicBeta Tester

Eric,

What I like to achieve is the next:

1- All unit prices in the cart must be tax-included prices.
For example; the tax amount in The Netherlands is 19%. I have a product which costs 100 euro without the taxes. The unit price should be 100+19=119 incl. taxes as default unit price.

2- Total tax amount in the cart
A customer orders 10 of this product. So the cart totaal should be 119x10=1190
I also like to have the sub-totaal 1190.
But stil the total tax amount in the picture = 119.

Sign in to reply to this post

MagicBeta Tester

Any suggestions.....???

Sign in to reply to this post

Eric Mittman

One way you could do this would be to add 19% to the price of the item when it is being inserted by the add to cart server behavior. In your add to cart code find the place where the price is being set like this:

php:
$ATC_itemPrice = floatval("<your price>");// column binding



Just after this add in this line:

php:
$ATC_itemPrice += ($ATC_itemPrice * .19);// column binding



This will ensure that the price of the item in the cart will include the tax in it. Next you can add in a row to the cart display that will show you how much tax was applied to the order. To do this go to your cart display page and look for the "Total:" line. You should add in a new row just above this one that looks like this:

php:
<tr class="">
            <td class="eC_SummaryLabel">Tax:</td>
            <td><?php echo WA_eCart_DisplayMoney($eCart1, ($eCart1->GrandTotal() - ($eCart1->GrandTotal() / 1.19))); ?></td>
</tr>



This will ensure that the users can easily see the amount of tax that has been applied to the order. You will need to update this code to use your cart object instead of the default $eCart1.

Sign in to reply to this post

MagicBeta Tester

Eric,

We were almost there....but...

Issue 1 = The grand total is to much cause the script still counting 19 procent tax from the tax included prices

Example: Product price is 119 (imagine that customer orders just one)
Tax: 22 (?????)
Grabt Total: 141

What I like to see is:

Product price = 119 (imagine that customer orders just one)
Total taxes:19
Grand total: 119

Issue 2 = In the product list all the prices are without taxes

Issue 3 = In the back end I always must enter the tax exclusieve prices

What I tried was to set the TAX rate to 0 (zero) at the back end but than I don't see any tax in the cart page at all.

Sign in to reply to this post

Eric Mittman

Did you use the exact code that I provided you with? With this code I get the exact result that you are looking for in your example, I'm including a screen shot of this for your reference.

If you want to make it so that the regular item price is not seen but only the price that is inclusive of the tax you would just set the price like this in the back end. Then it will show in the product listing pages and in the cart as the tax inclusive price. If you do it like this though you will need to remove $ATC_itemPrice += ($ATC_itemPrice * .19);// column binding from your add to cart page.

The calculation that I posted for the tax row in the cart should take the grand total and divide it by 1.19, this will give you the grand total - 19%. I then subtract this amount from the grand total, the difference is the amount of tax. If you can give me an exampe of an item price and quantity that are not returning the correct amounts I will check into this further.

Sign in to reply to this post

MagicBeta Tester

Eric,

Okay...I like to see everywhere the tax-inclusive prices. So I set the tax amount 19% at the backend, removed the - $ATC_itemPrice += ($ATC_itemPrice * .19);// column binding - at the detail page and added the - ><?php echo WA_eCart_DisplayMoney($eCart1, ($eCart1->GrandTotal() .......($eCart1 = $WA_Store_Cart) in the cart page.

The result is still same.

If you take a look at this item Products_Detail.php?ProductID=8 you can see what is really going on.

Maybe I do something wrong.

Thanks.

Sign in to reply to this post

Eric Mittman

What is the exact line of code that you are using for this part of the cart display? It seems that there is a problem with the way that you have it. I can get the exact same result as you are getting if I just take the total and multiply it by .19. Here is the code and the results I get with it:


item:119 total:119 tax:22

php:
<?php echo WA_eCart_DisplayMoney($eCart1, ($eCart1->GrandTotal() * .19)); ?>



item:119 total:119 tax:19

php:
<?php echo WA_eCart_DisplayMoney($eCart1, ($eCart1->GrandTotal() - ($eCart1->GrandTotal() / 1.19))); ?>



If you have any further trouble with this please post back with the cart display page and the WA_eCart folder from the root of your site. I can do some testing with your files if need be.

Sign in to reply to this post

MagicBeta Tester

Eric,

I attached the requested files.

Attached Files
WA_eCart.zip
cart.zip
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...