Post by vaio » Wed Mar 30, 2011 4:20 pm

Hello OC community!
I have been using (well, more learning) Open Cart for about a month. In my oppinion it is a great (not just good) but i have one proposal:

I reccomend that Product should have:
1. price without tax
2. tax selection
3. price with tax

4. costs (for reports)

and system calculates itself: for example i put in price without tax value 100, in tax selection - select 20% in price with tax shows 120 (and reverse).

It is not so convinient to calculate prices to be input as price without tax only. Sometimes you have problem with decimals, it's unnecessary work (recalculating) etc... I think it is better we have options for all prices (tax or no tax) and automatic calculation between them and in order i have mentioned abowe.

Same should be for specials/discounts...

What do others think about it?
Kind regards,
V.

Newbie

Posts

Joined
Thu Mar 03, 2011 12:51 am

Post by mberlant » Wed Mar 30, 2011 4:46 pm

If you are operating a store where you have exactly one tax class and that tax can be either applied or not applied, then what you describe should not be difficult.

If, however, you have more than one tax class (inside my city, inside my county but outside my city, inside my state/province but outside my county, inside my country but outside my state/province, outside my country) how do you propose allowing for all of those variations to be displayed on each product page?

Also, many jurisdictions require that tax be calculated upon the total value of the order and that it cannot be the sum of the tax on each individual item. This is to reduce the accumulation of rounding error.

In addition, some jurisdictions require that tax be applied to Shipping and Handling charges and some jurisdictions do not tax these fees. And some jurisdictions require that tax be charged on the value before applying coupon discounts and other jurisdictions permit coupon discounts to reduce the tax levy.

Given all of these dimensions of variability in the OC world, I personally have a hard time envisioning how to effectively implement what you describe.

Please use proper English at all times, so that all members may understand you.


User avatar
Active Member

Posts

Joined
Sun Mar 13, 2011 8:33 pm

Post by vaio » Wed Mar 30, 2011 5:14 pm

I hope we understand each other...
Open Cart takes value from price without tax, it only converts price with tax to price without tax.
It is just a helper (kind of calculator)....

What do you think about this?

edit: and prices can be on 4 decimal places rounded 0.1234 i think 4 places is enough for all regulations worldwide...

Newbie

Posts

Joined
Thu Mar 03, 2011 12:51 am

Post by SXGuy » Wed Mar 30, 2011 8:59 pm

prices are added to a product excluding tax.

opencart takes that price and adds the default tax rate to the original price and displays this in the product page or cart.

opencart still has the two values, excluding tax and including tax, it just displays one in admin and the other in the shopping cart.

if you want to add prices including tax you would need to add another input field in the product admin and then create a button which takes that value and works out the net cost to place into the original product price input field.

thats the easist way to get what you want, because if you wanted opencart to handle the calculation you are talking about creating a whole new tax calculation.

opencart can easily add a percentage to a price to work out tax, but the other way around requires knowledge of simple fractions and how to convert a percentage to a fraction.

for example £100 + 20% = £120.

£120 *1/6 = £20 (tax)

so opencart tax calculations would need to know 20% is 1/6 in a fraction. it doesnt do this currently.

my advise to you? get a percentage to fraction chart and work out the net cost yourself and input it manually.

Active Member

Posts

Joined
Sun Nov 08, 2009 2:07 am

Post by vaio » Wed Mar 30, 2011 9:34 pm

SXGuy,
thank you for advice - i havedone like this already so far with help of excel. I just thought, it would be easier for price management (like Prestashop).
Let's face it, it is definetely easier for admin/us to enter final price (for example 4,9) than 3,92 (assuming tax is 20%) - just final price he wants to sell it...

Well thank you anyway all for participating, if i manage to do such modification, will share it with all.

Newbie

Posts

Joined
Thu Mar 03, 2011 12:51 am

Post by SXGuy » Thu Mar 31, 2011 5:00 pm

true it may be easier for you, but like i say, tax calculation would have to also include simple fractions to calculate tax on gross amounts, which it doesnt.

not only that, personally, i prefer net cost, then add tax, because if the tax rate changes during the year ( which it can) id want to know that i am still getting the same net cost price for my sale and not losing out on reclaimable tax.

Active Member

Posts

Joined
Sun Nov 08, 2009 2:07 am

Post by Solan » Sat May 07, 2011 5:42 am

I would also like to be able to add my products with final price (ink vat).
Today i get productlists that only show final price so in openc way i have to calculate all singel item manually and then insert the products :-(

Active Member

Posts

Joined
Sat Feb 19, 2011 7:34 pm

Post by SXGuy » Sat May 07, 2011 9:52 pm

edit the product page to include a button which when pressed, takes the input from the price field and converts it from gross to net, its easy to do, just need to know to create a button which calls a function. That function grabs the data and changes it based on the math you supply.

Look up php and javascript.

Active Member

Posts

Joined
Sun Nov 08, 2009 2:07 am

Post by Solan » Sun May 08, 2011 12:21 am

Thanks

I found this thread from the netherlands forum:

http://translate.google.se/translate?hl ... 6%23p89300


could that be a good solution?

Active Member

Posts

Joined
Sat Feb 19, 2011 7:34 pm

Post by SXGuy » Sun May 08, 2011 3:00 am

yes thats exactly how you can do it.

Active Member

Posts

Joined
Sun Nov 08, 2009 2:07 am

Post by thegeekz » Tue May 01, 2012 12:44 am

Solan wrote:Thanks

I found this thread from the netherlands forum:

http://translate.google.se/translate?hl ... 6%23p89300


could that be a good solution?
hmm interesting.. but can the coding be used for OC 1.5.2?

I'M looking for a solution to this as well, where my client needs to enter prices Inc GST... and the invoice to show the total tax as well as the final total Inc tax.

I know there is an Auto tax module to buy for this but was wondering if there's a DIY solution...

in essence, my client doesn't even need to show the price exc tax.... on his invoice...

Also is there any free export import tool that can add this field Price Inc tax to the csv or xls file for easy management of products?

thanks..

EDIT : I have found the Solution in UK TAX Input thread -- by Uksitebuilder - Simon.

No more using Apsona, as they are not updated.

  • Every upgrade -- rem. 2 reinstall vqmod & mindful of modules w/ VQmod -- E.g Import / Export Tool by MHC


Active Member

Posts

Joined
Tue Nov 02, 2010 10:24 am

Post by guntis.e » Thu Dec 06, 2012 6:57 pm

Here is a commercial module, that adds a hleper field to all price input fields. As discussed above, it is not very straight forward to automatically detect the tax, therefore there is an option to add the multiplyer manually:
http://www.opencart.com/index.php?route ... on_id=7045

Guntis
ImagePartneris.net


New member

Posts

Joined
Fri Jan 28, 2011 4:20 am

Post by mukulkabra » Sun Jun 30, 2019 2:01 am

In India, MRP (maximum retail price is inclusive of all taxes) unlike US.
But its very cumborsome to adopt opencart method to have a product price without Tax.
All I wanted to do is to put product price in options of the product, calculate tax based on MRP (formula will be MRP * TaxRate / ( 100 + TaxRate)) just to show on the final page and not to add it to total.
Just to elaborate in India Shipping is not taxed so I kept it out in my code while calculating tax.
I have a solution for opencart 3.0
It's very easy.
Go to
catalog/model/extension/total/tax.php

Paste following there

Code: Select all

<?php
class ModelExtensionTotalTax extends Model {
public function getTotal($total) {
foreach ($total['taxes'] as $key => $value) {
if ($value > 0) {
   #### MUKUL 
   # Modified code for Sub Total (without shipping) Inclusive of Tax
   # Tax calculated and shown on sub total
   # but not added to final total
   $sub_total = $this->cart->getSubTotal(); 
   $taxRate = ($value * 100) / $sub_total;
$total['totals'][] = array(
'code'       => 'tax',
'title'      => $this->tax->getRateName($key),
'value'      => $sub_total * $taxRate/ (100 + $taxRate),
'sort_order' => $this->config->get('total_tax_sort_order')
);

#$total['total'] += $value;
}
}
}
}

###### original code for Price  + Tax
#<?php
#class ModelExtensionTotalTax extends Model {
#	public function getTotal($total) {
#	foreach ($total['taxes'] as $key => $value) {
#	if ($value > 0) {
#	$total['totals'][] = array(
#	'code'       => 'tax',
#	'title'      => $this->tax->getRateName($key),
#	'value'      => $value,
#	'sort_order' => $this->config->get('total_tax_sort_order')
#	);
#
#	$total['total'] += $value;
#	}
#	}
#	}
#}

You are sorted.
Now your cart shall also be sorted.
On product page you can just use opencart admin page option for not showing tax in the product price.

Let me know if it helped anyone and if you want to donate paypal.me/mukulkabra . People are charging 20 to 50 USD for this.

Newbie

Posts

Joined
Sun Mar 17, 2019 11:15 pm
Who is online

Users browsing this forum: No registered users and 6 guests