Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Setting Up Your Zen Cart Products / Currencies & Sales Taxes, VAT, GST, etc. / How to get Gross price to show and not nett in store and admin?

How to get Gross price to show and not nett in store and admin?

Locked
This thread is locked. New replies are disabled.
8 Sep 2007, 9:09 AM
#1
hauruapai avatar

hauruapai

New Zenner

Join Date:
Sep 2007
Posts:
36
Plugin Contributions:
0

Post #1 by hauruapai

Hi,

I have set up as follows
Brand new site, clean install, latest version of Zen Cart running on windows server with php Version 5.1.1

Zone Definition - Australia
Tax Rate - 10%
Tax Class- GST

Default and only currency is AUD (Aussie $) and I have updated the currencies in the Localization > currencies as well as updating the english.php to set the default currency to true. There are no other currencies set in the site, the only one there is AUD which is set to the value of 1.00000000

Config > My Store
Country - Australia
Zone - Northern Territory
Display Prices with Tax - true
Display Prices with Tax in Admin - true
Basis of Product Tax - Shipping
Basis of Shipping Tax - Shipping
Sales Tax Display Status - 1

If I add a product for say $110.00 gross the nett calculates properly at 100.00, but when I go to view the product in Admin before adding (or updating) the price there is the 100.00 (nett price) and that is the one that also shows in the shop front.

At the moment I only have put in one product - I want to get this right before I merrily add products!

Could somone point me in the right direction as it is obvous I am missing something!

10 Sep 2007, 1:40 AM
#2
hauruapai avatar

hauruapai

New Zenner

Join Date:
Sep 2007
Posts:
36
Plugin Contributions:
0

Post #2 by hauruapai

Can anyone help with this?

10 Sep 2007, 2:15 AM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #3 by ajeh

You would need to customize the preview as it only shows the one price and not both, at this time ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

10 Sep 2007, 7:18 AM
#4
hauruapai avatar

hauruapai

New Zenner

Join Date:
Sep 2007
Posts:
36
Plugin Contributions:
0

Post #4 by hauruapai

Thank you - now fixing that will that mean that:

  1. The nett price will show in the shop
  2. If a user logs in and their shipping address is NOT in the set zone, their prices will show as exl GST?
10 Sep 2007, 8:04 AM
#5
hauruapai avatar

hauruapai

New Zenner

Join Date:
Sep 2007
Posts:
36
Plugin Contributions:
0

Post #5 by hauruapai

ok, fyi here is how to get the gross price to show in your shop:

admin/includes/modules/product/preview_info.php

around line 56, change ```php

<td class="pageHeading" align="right"><?php echo $currencies->format($pInfo->products_price) . ($pInfo->products_virtual == 1 ? '<span class="errorText">' . '<br />' . TEXT_VIRTUAL_PREVIEW . '</span>' : '') . ($pInfo->product_is_always_free_shipping == 1 ? '<span class="errorText">' . '<br />' . TEXT_FREE_SHIPPING_PREVIEW . '</span>' : '') . ($pInfo->products_priced_by_attribute == 1 ? '<span class="errorText">' . '<br />' . TEXT_PRODUCTS_PRICED_BY_ATTRIBUTES_PREVIEW . '</span>' : '') . ($pInfo->product_is_free == 1 ? '<span class="errorText">' . '<br />' . TEXT_PRODUCTS_IS_FREE_PREVIEW . '</span>' : '') . ($pInfo->product_is_call == 1 ? '<span class="errorText">' . '<br />' . TEXT_PRODUCTS_IS_CALL_PREVIEW . '</span>' : '') . ($pInfo->products_qty_box_status == 0 ? '<span class="errorText">' . '<br />' . TEXT_PRODUCTS_QTY_BOX_STATUS_PREVIEW . '</span>' : '') . ($pInfo->products_priced_by_attribute == 1 ? '<br />' . zen_get_products_display_price($_GET['pID']) : ''); ?></td>

to ```php
<td class="pageHeading" align="right"><?php echo $currencies->format($pInfo->products_price_gross) . ($pInfo->products_virtual == 1 ? '<span class="errorText">' . '<br />' . TEXT_VIRTUAL_PREVIEW . '</span>' : '') . ($pInfo->product_is_always_free_shipping == 1 ? '<span class="errorText">' . '<br />' . TEXT_FREE_SHIPPING_PREVIEW . '</span>' : '') . ($pInfo->products_priced_by_attribute == 1 ? '<span class="errorText">' . '<br />' . TEXT_PRODUCTS_PRICED_BY_ATTRIBUTES_PREVIEW . '</span>' : '') . ($pInfo->product_is_free == 1 ? '<span class="errorText">' . '<br />' . TEXT_PRODUCTS_IS_FREE_PREVIEW . '</span>' : '') . ($pInfo->product_is_call == 1 ? '<span class="errorText">' . '<br />' . TEXT_PRODUCTS_IS_CALL_PREVIEW . '</span>' : '') . ($pInfo->products_qty_box_status == 0 ? '<span class="errorText">' . '<br />' . TEXT_PRODUCTS_QTY_BOX_STATUS_PREVIEW . '</span>' : '') . ($pInfo->products_priced_by_attribute == 1 ? '<br />' . zen_get_products_display_price($_GET['pID']) : ''); ?></td>
         

(the products_price to products_price_gross)

admin/includes/modules/update_product.php

around line 24 / 25 find ```php
$tmp_value = zen_db_prepare_input($_POST['products_price']);
$products_price = (!zen_not_null($tmp_value) || $tmp_value=='' || $tmp_value == 0) ? 0 : $tmp_value;



replace with
```php
//    $tmp_value = zen_db_prepare_input($_POST['products_price']);
 //   $products_price = (!zen_not_null($tmp_value) || $tmp_value=='' || $tmp_value == 0) ? 0 : $tmp_value;
		
		$tmp_value = zen_db_prepare_input($_POST['products_price_gross']);
    $products_price_gross = (!zen_not_null($tmp_value) || $tmp_value=='' || $tmp_value == 0) ? 0 : $tmp_value;

find around line 44 ```php
'products_price' => $products_price,

and replace with```php
 //  'products_price' => $products_price,
														'products_price' => $products_price_gross,		

BUT, this does NOT change the price in the cart when the customer is outside the "zone" and therefore should not be paying the GST.

So now, How can I get:

  1. nett price to show in cart when the customer is outside the "zone"
  2. gross price to show in cart when the customer is inside the zone

Thank you for your time

10 Sep 2007, 9:32 AM
#6
hauruapai avatar

hauruapai

New Zenner

Join Date:
Sep 2007
Posts:
36
Plugin Contributions:
0

Post #6 by hauruapai

ok, the above solution is NOT A GOOD idea if you want to update ther product as it will then put the gross in the nett and then add the tax on again ....

So, how can I get the gross to show in the shop, with the GST showing in the invoice for the customer within the zone, IE australia and the GST not showing in the invoice if they are outside Australia. I do not have a sales tax showing on ANY scenario .....

Help!

10 Sep 2007, 10:10 AM
#7
hauruapai avatar

hauruapai

New Zenner

Join Date:
Sep 2007
Posts:
36
Plugin Contributions:
0

Post #7 by hauruapai

SolveHad to set the Zones for Tax properly to get the gross showing in the shop.

in admin/includes/modules/product/preview_info.php
around line 56 find ```php

<?php echo $currencies->format($pInfo->products_price_gross) . ($pInfo->products_virtual == 1 ? '<span class="errorText">' . '<br />' . TEXT_VIRTUAL_PREVIEW . '</span>' : '') . ($pInfo->product_is_always_free_shipping == 1 ? '<span class="errorText">' . '<br />' . TEXT_FREE_SHIPPING_PREVIEW . '</span>' : '') . ($pInfo->products_priced_by_attribute == 1 ? '<span class="errorText">' . '<br />' . TEXT_PRODUCTS_PRICED_BY_ATTRIBUTES_PREVIEW . '</span>' : '') . ($pInfo->product_is_free == 1 ? '<span class="errorText">' . '<br />' . TEXT_PRODUCTS_IS_FREE_PREVIEW . '</span>' : '') . ($pInfo->product_is_call == 1 ? '<span class="errorText">' . '<br />' . TEXT_PRODUCTS_IS_CALL_PREVIEW . '</span>' : '') . ($pInfo->products_qty_box_status == 0 ? '<span class="errorText">' . '<br />' . TEXT_PRODUCTS_QTY_BOX_STATUS_PREVIEW . '</span>' : '') . ($pInfo->products_priced_by_attribute == 1 ? '<br />' . zen_get_products_display_price($_GET['pID']) : ''); ?>

Change to ```php
<?php echo $currencies->format($pInfo->products_price) . '<br>(GROSS:): ' .$currencies->format($pInfo->products_price_gross) . ($pInfo->products_virtual == 1 ? '<span class="errorText">' . '<br />' .  TEXT_VIRTUAL_PREVIEW . '</span>' : '') . ($pInfo->product_is_always_free_shipping == 1 ? '<span class="errorText">' . '<br />' . TEXT_FREE_SHIPPING_PREVIEW . '</span>' : '') . ($pInfo->products_priced_by_attribute == 1 ? '<span class="errorText">' . '<br />' . TEXT_PRODUCTS_PRICED_BY_ATTRIBUTES_PREVIEW . '</span>' : '') . ($pInfo->product_is_free == 1 ? '<span class="errorText">' . '<br />' . TEXT_PRODUCTS_IS_FREE_PREVIEW . '</span>' : '') . ($pInfo->product_is_call == 1 ? '<span class="errorText">' . '<br />' . TEXT_PRODUCTS_IS_CALL_PREVIEW . '</span>' : '') . ($pInfo->products_qty_box_status == 0 ? '<span class="errorText">' . '<br />' . TEXT_PRODUCTS_QTY_BOX_STATUS_PREVIEW . '</span>' : '') . ($pInfo->products_priced_by_attribute == 1 ? '<br />' . zen_get_products_display_price($_GET['pID']) : ''); ?>

This will show the nett and gross price on the preview page.

14 Feb 2009, 4:38 PM
#8
jason_barnett avatar

jason_barnett

New Zenner

Join Date:
Feb 2009
Posts:
2
Plugin Contributions:
0

Post #8 by jason_barnett

I know this post is old but just in case anyone comes across and wants a simple answer.....

In v1.3.8a:

Admin - Configuration - My Store:
Display Prices with Tax = True
Display Prices with Tax in Admin = True

You may also need:
Basis of Product Tax = Shipping
Basis of Shipping Tax = Shipping

Cheers,

JB

4 Jun 2009, 10:06 AM
#9
fragha avatar

fragha

New Zenner

Join Date:
Feb 2009
Posts:
5
Plugin Contributions:
0

Post #9 by fragha

Thank you Jason Barnett for taking the time to post your answer. It helped me a lot :smile:

23 Jul 2009, 1:33 PM
#10
silentavatar avatar

silentavatar

New Zenner

Join Date:
Oct 2008
Location:
Australia
Posts:
34
Plugin Contributions:
0

Post #10 by silentavatar

Thanks for this simple fix for what has been a 2 hour forum search for the answer!

:P

MG Page
"The Silent Avatar Speaks"
http://www.silentavatar.com/blog/

1 Dec 2009, 11:23 AM
#11
nialler avatar

nialler

New Zenner

Join Date:
Nov 2009
Posts:
14
Plugin Contributions:
0

Post #11 by nialler

I also want to give this a thumbs up. :clap:

Having spent ages looking at threads talking about code changes etc , a simple config change is such a relief

29 Mar 2010, 3:57 AM
#12
jenpen avatar

jenpen

Zen Follower

Join Date:
Sep 2007
Location:
Far South Coast, NSW, Australia
Posts:
427
Plugin Contributions:
0

Post #12 by jenpen

I have both admin and store prices set to include tax (as above,
Admin - Configuration - My Store:
Display Prices with Tax = True
Display Prices with Tax in Admin = True)

but my products in the store are displaying prices without tax. Ie, product in Admin, $25.00, same product in store, $22.73. Is there some other setting I've missed?

3 May 2010, 10:34 AM
#13
jeffgranite avatar

jeffgranite

New Zenner

Join Date:
Jun 2009
Posts:
4
Plugin Contributions:
0

Post #13 by jeffgranite

i to am having the same problems..

does anyone have the answer??

20 Nov 2010, 11:08 PM
#14
tesefoti avatar

tesefoti

New Zenner

Join Date:
Jul 2010
Location:
Italy
Posts:
66
Plugin Contributions:
0

Post #14 by tesefoti

I just had the same problem. I updated with easypopulate all the prices, and suddently all the prices became net, instead of gross.