Author Topic: Wrong price: custom fields, two taxes  (Read 4964 times)

webberry

  • Beginner
  • *
  • Posts: 3
Wrong price: custom fields, two taxes
« on: February 16, 2012, 11:10:30 am »
We have products with different sizes. For this we use custom fields.
We also have two different taxes for the products (Tax 8% and tax 2.5%).

Now the product price in the product detail is wrong, both taxes are counted together, although I only chose one tax for the product. The price in the shopping cart is correct.

Please take a loot at the print screens.

Can somebody help us? Is this a bug?

Thanks, Webberry



[attachment cleanup by admin]

rustle

  • Jr. Member
  • **
  • Posts: 83
  • Mad love for the VM project
    • Independent Development
Re: Wrong price: custom fields, two taxes
« Reply #1 on: February 25, 2012, 05:01:52 am »
I was encountering this issue
I solved it by making sure that the tax rules are identified in both a country and subsequent state.
Also in the billing info for the customer they must also select and a country and a state

If you do not do this VM has a tendency to apply multiple taxes when it should not

I hope this helps

webberry

  • Beginner
  • *
  • Posts: 3
Re: Wrong price: custom fields, two taxes
« Reply #2 on: February 27, 2012, 15:50:09 pm »
Hi
Thanks for your reply.
Unfortunately it's still not working. I identified both with a country and state.
We've tried all the settings, with categories, without etc.
The problem exists only at the options.
Have you got an other idea?
Thanks

webberry

  • Beginner
  • *
  • Posts: 3
Re: Wrong price: custom fields, two taxes
« Reply #3 on: March 12, 2012, 09:52:13 am »
Is there anybody who can help us?

rustle

  • Jr. Member
  • **
  • Posts: 83
  • Mad love for the VM project
    • Independent Development
Re: Wrong price: custom fields, two taxes
« Reply #4 on: March 12, 2012, 15:08:47 pm »
Hi Webberry
please read this post in full
http://forum.virtuemart.net/index.php?topic=98912.0

what you have to do is a template override to hide the multiple taxes in the cart until the  checkout process has been completed
then the correct tax will appear based upon the criteria you wold like

it took me awhile to get my head wrapped around it - but it works

Spyros Petrakis

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 101
    • OlympianThemes
  • VirtueMart Version: Always latest Stable
Re: Wrong price: custom fields, two taxes
« Reply #5 on: April 08, 2012, 21:36:47 pm »
I think this is a bug , it makes no sense to calculate custom fields by adding every tax that you create in your shop, when you have set a specific tax for the product.
Fast and simple to use templates with fanatical support
https://www.olympianthemes.com

sebix

  • Beginner
  • *
  • Posts: 3
    • Agence Web
Re: Wrong price: custom fields, two taxes
« Reply #6 on: April 28, 2012, 09:48:19 am »
Is there a solution about this bug ? I spent a lot of time to try to fix this but i still have two additional taxes.

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9838
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Wrong price: custom fields, two taxes
« Reply #7 on: May 30, 2012, 19:05:13 pm »
I think also this is a bug, shouldnt be that way. Seems that the override for a product is not taken for calculation of the variant. Please tell me which custom you are using.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

sven.w

  • Beginner
  • *
  • Posts: 1
Re: Wrong price: custom fields, two taxes
« Reply #8 on: June 12, 2012, 16:06:11 pm »
I think also this is a bug, shouldnt be that way. Seems that the override for a product is not taken for calculation of the variant. Please tell me which custom you are using.

Hello, we're having the same issue here (using the custom field type "cart variant").
Any idea if this issue has been adressed yet? (I'm just wondering as i haven't seen any similar ticket on dev.virtuemart.net)

regards sven

escapezone

  • Beginner
  • *
  • Posts: 24
Re: Wrong price: custom fields, two taxes
« Reply #9 on: July 17, 2012, 01:07:30 am »
Hello, we're having the same issue here (using the custom field type "cart variant").

Does anyone find a solution for this problem plz?

mdelreal

  • Beginner
  • *
  • Posts: 17
Re: Wrong price: custom fields, two taxes
« Reply #10 on: July 24, 2012, 22:46:38 pm »
The same problem.

Until this bug is fixed, somebody knows how to hide the prices of custom fields

Thank
Manuel

easy

  • Jr. Member
  • **
  • Posts: 69
Re: Wrong price: custom fields, two taxes
« Reply #11 on: July 28, 2012, 21:48:33 pm »
search this forum, it was somewhere here, you have to edit one file only

frogybella

  • Beginner
  • *
  • Posts: 25
    • FDBI
a solution for "Wrong price: custom fields, two taxes"
« Reply #12 on: January 25, 2013, 18:33:54 pm »
VM 2.0.18a
Path : /administrator/components/com_virtuemart/models
File : customfields.php

Hi,

We have hacked this file to correct the problem this way :

Line 870-871 :
Code: [Select]
$price = self::_getCustomPrice($productCustom->custom_price, $currency, $calculator, (int)$product->product_tax_id);
$productCustom->text = JText::_ ($productCustom->custom_value) . ' ' . $price ;

We have added a new parameter to the function _getCustomPrice filled with the product's tax id. On second line, JText function has been added for translation support (nothing to do with the subject but it was nice to have it work too...).

Then on line 964, the beginning of the function become :
Code: [Select]
static function _getCustomPrice($customPrice, $currency, $calculator, $idtax) {
if ((float)$customPrice) {
$price = strip_tags ($currency->priceDisplay ($calculator->calculateCustomPriceWithTax ($customPrice, $idtax)));
We declare the new parameter and use it in the calculateCustomPriceWithTax function call.

It might not correct everything and every cases. For each product using the custom file you have to select the tax rate. A better solution could be found... but it works for us, and we can finish the project!

Hope this help,
Regards,
Frogybella

My website : www.fdbi.com