VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: betterlead on June 12, 2013, 12:27:23 PM

Title: Custom fields - strange calculation of price
Post by: betterlead on June 12, 2013, 12:27:23 PM
I have an issue with the prices in custom fields.

When a version of a product costs some extra or something is added to the product by the customer, in the old VM1.1 I simply wrote +40 in the filed and then that would be added to the price (plus tax/VAT of in my cases mostly 25%) So the result should be 50.

Now, I know I don't need to write the "+" anymore in VM2.0, but the trouble is, the 40 becomes 67,50 with the VAT included. But that is only presented in the field of choices (custom field) for the customer - when the total is summed up, it's correct. That is very confusing for the customer.

My site: http://tingshop.com
Title: Re: Custom fields - strange calculation of price
Post by: Milbo on June 12, 2013, 12:39:42 PM
Please provide a link to the product, which you mean. Then I can take a look.
Title: Re: Custom fields - strange calculation of price
Post by: betterlead on June 13, 2013, 19:08:06 PM
Hi. Thanks for checking it for me.

http://www.tingshop.com/accessoarer/armbandsur-klockor/armbandsur-time-studio-stockholm-33mm-mul-detaljer

Or this one:

http://www.tingshop.com/heminredning/badrummet/necessaer-prick-haengande-detaljer

Cheers
/Dodo
Title: Re: Custom fields - strange calculation of price
Post by: betterlead on June 13, 2013, 19:15:06 PM
In second example the prices should be:

109:- for the "liten" and 179:- for the "Stor" VAT is 25%. So as in VM1 I put 56 (net) in the field. Plus sign is not required any more as I understand. Or?

[attachment cleanup by admin]
Title: Re: Custom fields - strange calculation of price
Post by: betterlead on June 13, 2013, 19:32:28 PM
On my old server, now a place for tests, I made a new Testproduct and same problem here. See the three screen shots. I can give you login credentials to the backend if you'd like to take a closer look.

[attachment cleanup by admin]
Title: Re: Custom fields - strange calculation of price
Post by: betterlead on June 13, 2013, 19:37:06 PM
And here is a forth image: The thriller indeed...

[attachment cleanup by admin]
Title: Re: Custom fields - strange calculation of price
Post by: Milbo on June 14, 2013, 13:36:18 PM
Disable in the vm config that the variant prices are with tax. It helps also to enable first all prices, to understand which prices to display
Title: Re: Custom fields - strange calculation of price
Post by: betterlead on June 14, 2013, 19:31:28 PM
Hi, thanks for the reply. Well it's a bit better that way, but still not good enough. It's confusing for the customers. They add a custom product displaying the price of 80 and then 100 is added to their cart. I am sure not satisfied as a customer when I see such things.

I see now, the problem has been discussed for months on the forum and what can be the problem with fixing this? I am sure, almost everybody selling products to end consumers via VM in EU, need this.

Dear developers, isn't this quite simple to fix? Or am I totally wrong?

In EU we are obliged by the laws to display all prices incl VAT when selling to end consumers. VAT may be displayed too, but alway, the total price per product must be displayed.

In the way VM is configured right now, it's impossible.

Thanks
Title: Re: Custom fields - strange calculation of price
Post by: Milbo on June 14, 2013, 20:49:00 PM
It is fixed. You just do not display the prices correctly. It is a matter of configuration. Look here http://istraxx.com/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=7&virtuemart_category_id=4
Title: Re: Custom fields - strange calculation of price
Post by: betterlead on June 14, 2013, 21:43:35 PM
Oey, for me, just being a simple user of VM, with very little knowledge about the core(?) and programming language or what ever it is called, I simply don't have any idea, what to do with that code you have linked to.

Is there any more help to get?
Title: Re: Custom fields - strange calculation of price
Post by: betterlead on June 15, 2013, 11:24:39 AM
Please, that answer and link really doesn't help a dummie like me.  :P
I have tried all different configurations that comes in mind, but no setting does the job for me.

Could someone just tell me the settings I should do?

I want this:

Shopper sees the price of the product, incl VAT.
Shopper sees the price of "extras" under custom drop down menu incl VAT.
Shopper gets the total price incl VAT in the cart.
Shopper sees the amount of VAT in the cart.

All very logic, it seems to me.

If it's fixed already, why can't I achieve it? Do I have to be a professor to fix it?

So again, please, I need an extra head here.

Cheers
/Betterlead
Title: Re: Custom fields - strange calculation of price
Post by: S. Nalepa on June 16, 2013, 08:30:38 AM
Quote from: Milbo on June 14, 2013, 20:49:00 PM
It is fixed. You just do not display the prices correctly. It is a matter of configuration. Look here http://istraxx.com/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=7&virtuemart_category_id=4
Hello Milbo.
Is your solution possible also if you don't show all the three fields, Sales price, Sales price without tax, and Tax amount, or does this way of showing the prices need to be turned on to include tax in the additional charge showed in the dropdown? Could it work when only showing the Sales prices with tax included?
Title: Re: Custom fields - strange calculation of price
Post by: Milbo on June 16, 2013, 14:34:20 PM
Quote from: betterlead on June 14, 2013, 21:43:35 PM
Oey, for me, just being a simple user of VM, with very little knowledge about the core(?) and programming language or what ever it is called, I simply don't have any idea, what to do with that code you have linked to.

Which code? Did you ever clicked on it? There is just a product with variants, which shows that it is calculating correct and just a matter of your configuration, which is btw exactly working by default. If you misconfigure your VM, we cannot change it.

S. Nalepa, the calculation is NOT in any way depended by the VIEW on it. The reason I say, enable first ALL prices, understand it, choose what you want (we cant know) and configure it as YOU like.
Title: Re: Custom fields - strange calculation of price
Post by: Milbo on June 16, 2013, 15:16:22 PM
I just checked, in the backend are all prices activated, except the unit price.
Title: Re: Custom fields - strange calculation of price
Post by: betterlead on June 16, 2013, 22:52:59 PM
Ok, no code, of course. I was really tired when watching that site you gave a link to. Today I see, the configuration for the chain saw is like I want it to be.
So, it gave me hope and I sure understand it's possible. But, I did as you described and unchecked one item at a time and checked the front end, reloaded every time, but no way José.
What can I possibly do wrong? In the config there isn't any "unit price". Or am I looking and trying to configure in the wrong place. Something in the tax/VAT settings? Or any other place?
Look at the screen shots of the settings. Could you just simply tell me which one of 1-11 a or b I should uncheck? 3a : 4b or what? 3 a+b or?
A simple answer, if it's in this place I should do the configuration to make it work like "the chain saw" in your link.

Best regards
/Betterlead

[attachment cleanup by admin]
Title: Re: Custom fields - strange calculation of price
Post by: betterlead on June 16, 2013, 23:16:31 PM
Btw, the thing I called code, was because of this showing in the link. It just frightened me... Was tired,,,,,zzzz

[attachment cleanup by admin]
Title: Re: Custom fields - strange calculation of price
Post by: Milbo on June 17, 2013, 08:54:23 AM
Everything clear, I think you just had bad luck. Yes I had the debug mode activated. in fact in this example I have checked the "display variants with taxes". Be aware you enter your values always in net! you enter it without tax!
Title: Re: Custom fields - strange calculation of price
Post by: betterlead on June 17, 2013, 09:45:28 AM
Thanks. Yes always in net, I understand. And I have already, also tried all options (I really think so, except for the ones handling discounts.) with the "display variants with taxes". Still not the desired result.

I must be missing something, still...

Could you just be so kind, and check again in the backend which option you have unchecked in the configuration. Then I'll do the same in my.
See the screen shot, for no missunderstanding and give me the coordinates. ;)

Cheers
Title: Re: Custom fields - strange calculation of price
Post by: betterlead on June 17, 2013, 14:42:00 PM
Soon I give up. Tried every possible setting again, and again, and again.

Prices are set net. Still 40 becomes 67,50 in the dropdown menu. Should of course display 50 when VAT/tax is 25%.
And 60 becomes 101. So apr 68% is added and dispalyed in the dropdown menu.

When selecting this "extra" from the dropdown menu the total price of the product is displayed correctly. 100 + 67,5 shows 150!

So, if not in your version of VM, so in my, there must be a bug. Or otherwise, what more can I be doing wrong?

Look here and try for yourself: https://50.116.92.203/accessoarer/armbandsur-klockor/testprodukt-for-anpassade-falt-detaljer
I'd be very glad to let you in to  my test sites back end.
Title: Re: Custom fields - strange calculation of price
Post by: Milbo on June 17, 2013, 16:02:10 PM
You can just give me your backend access and a backendlink to the product you want to change, the values you want to have and I try to understand whats going on there.
Title: Re: Custom fields - strange calculation of price
Post by: betterlead on June 17, 2013, 16:37:14 PM
Hi!

Credentials are sent to your personal messages.
/Betterlead
Title: Re: Custom fields - strange calculation of price
Post by: Milbo on June 17, 2013, 19:05:20 PM
Finally found it!

In fact you use the calculation rules "wrong". You use for all products the overwrites, which should not be used as the normal case. You have a lot of different taxes. To have also the advantages of euvat checker, shoppergroup related stuff, quantity rules and similar, it is better to connect the rules to categories and attach the products to unpublished categories.

But is fixed. Good that we found it. So I am really eager to know if there is any problem left in the next 2.0.21F (coming today, yeh)
Title: Re: Custom fields - strange calculation of price
Post by: betterlead on June 17, 2013, 23:40:22 PM
Many Thanks, Milbo.

I am excited to get the work done right now.
I suspect there might have been something of the problem, connected to the migration from VM1 to VM2.

Cheers