Author Topic: custom fields: how to show customer price including tax  (Read 4397 times)

TheBlueMage

  • Beginner
  • *
  • Posts: 4
custom fields: how to show customer price including tax
« on: September 17, 2012, 07:45:37 am »
Our problem sounds simple enough. How to show customer custom field pricing that includes tax. Showing the before tax figure could be construed as misleading and creates confusion. Any price added to 'custom field' in BE is shown in FE exactly same. The product price is then increased by price from 'custom field' +tax!
All we want to do is show the customer how much the price is actually going to increase/decrease by (ie show customer 'custom field price' + tax).

Please can someone tell us how to accomplish this? I've searched the boards but can't seem to find an answer to this problem.
Site specs:
Joomla 2.5.7
VM 2.0.10
10% tax

Any help is appreciated
Regards Ray

p.barg

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 163
    • Barg IT
Re: custom fields: how to show customer price including tax
« Reply #1 on: September 18, 2012, 10:44:04 am »
Yes, I need this too. The prices as shown at the moment are very misleading for the customers...

nils_inv

  • Beginner
  • *
  • Posts: 20
    • inventivo Werbeagentur
Re: custom fields: how to show customer price including tax
« Reply #2 on: September 20, 2012, 18:23:09 pm »
Had the same problem and made a core hack, not the best solution but works:

administrator/components/com_virtuemart/models/customfields.php
Line 864

Use this code, changing * 1.19 for your own tax value.

if ((float)$productCustom->custom_price) {
                  //ORIGINAL: $price = strip_tags ($currency->priceDisplay ($calculator->calculateCustomPriceWithTax ($productCustom->custom_price)));
                  $price = strip_tags ($currency->priceDisplay ($calculator->calculateCustomPriceWithTax ($productCustom->custom_price * 1.19)));
               }
--------------------------------------
http://www.inventivo.de

pixelatumente

  • Beginner
  • *
  • Posts: 14
Re: custom fields: how to show customer price including tax
« Reply #3 on: December 03, 2012, 21:27:02 pm »
Hello,
I tried everything and it does not work. even replace the file with the version 2.0.8


I think the solution is between 966-969 lines... ???
administrator/components/com_virtuemart/models/customfields.php

      if ((float)$customPrice) {
         $price = strip_tags ($currency->priceDisplay ($calculator->calculateCustomPriceWithTax ($customPrice)));
         if ($customPrice >0) {
            $price ="+".$price;

Daniel Sjöstrand

  • Beginner
  • *
  • Posts: 15
Re: custom fields: how to show customer price including tax
« Reply #4 on: December 19, 2012, 01:20:43 am »
It's not pretty, but it works. I had the same problem And this solvedit. Would lika a better solution though.

C-Box

  • Beginner
  • *
  • Posts: 9
  • VirtueMart Version: 2.0.24c
Re: custom fields: how to show customer price including tax
« Reply #5 on: June 04, 2013, 08:37:55 am »
Hi,

I'm using latest version 2.0.20b and wonder why the custom fields doesn't show the price including VAT.

My product has just one VAT defined (+19% german tax rate) and the original price is shown correctly (e.g. net value = 100,-€ so 119,-€ is shown in frontend shop --> so far no problem).
But the custom fields (with cart attribute) in the dropdown shows just the net value and not the gross value?!?!??!

The calculated new total value of the product is correct - but it's quite confusing when +10€ results actually in +11,90€ extra charge!?!??!

Is this still a bug or could this adjusted somewhere in the deep vm2 settings!??!

regards from rainy Germany
C-Box

C-Box

  • Beginner
  • *
  • Posts: 9
  • VirtueMart Version: 2.0.24c
Re: custom fields: how to show customer price including tax
« Reply #6 on: June 07, 2013, 09:31:08 am »
Hi again,

I managed it with this post: http://forum.virtuemart.net/index.php?topic=98140.msg378003#msg378003
I hat to check the "Show VariantPrices with tax" in the store configuration as well! But this alone doesn't work...

So I needed to manipulate the customfields.php in current version 2.0.20b -- not nice as this will be overridden with the next update.

Perhaps this could be solved with the next release as it seems to be a bug!?!??
regards from Germany
C-Box

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9937
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: custom fields: how to show customer price including tax
« Reply #7 on: June 08, 2013, 16:25:53 pm »
C-Box, please test our latest version, I am very intersted in your input http://forum.virtuemart.net/index.php?topic=115877.0
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/