VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product pricing => Topic started by: lman on December 09, 2021, 12:49:55 PM

Title: add a price that is in custom field with the price of the product
Post by: lman on December 09, 2021, 12:49:55 PM
Hello dear virtuemarters.

I have a joomla site version 3.9.24 and vm3.8.8

I have create a string custom field (see the picture) and what I want is to add an extra VAT to product price.
To be more clear: Product Price + Extra Cost

And also I want to show this extra cost on product page, cart and checkout page.

My custom field does not work and I don't know where to start.

What I found so far is the path of the page I need to edit: administrator/components/com_virtuemart/helpers/calculationh.php

Is there an easy way to do it? or at least where edit lines?

Thanks in advance
Title: Re: add a price that is in custom field with the price of the product
Post by: Jörgen on December 09, 2021, 13:21:38 PM
Do You have a template position called extravat ?

Have You added the customfield to the product ?

Jörgen
Title: Re: add a price that is in custom field with the price of the product
Post by: lman on December 09, 2021, 14:15:43 PM
Quote from: Jörgen on December 09, 2021, 13:21:38 PM
Do You have a template position called extravat ?

Have You added the customfield to the product ?

Jörgen

Hello Jörgen , thank you for your reply.

What do you mean about the position? Do I need to create this position in my theme?

Yes I have add the customfield to the product and I have add the extra cost to 1euro but nothing is happened. The price does not change.
Title: Re: add a price that is in custom field with the price of the product
Post by: lman on December 09, 2021, 14:43:00 PM
Ok I have manage to show the custom field on product page by add it to an existing template position.

What I need now is:
1) to show it also on cart add on checkout.
2) to sum it with the total price
Title: Re: add a price that is in custom field with the price of the product
Post by: Jörgen on December 09, 2021, 14:57:57 PM
You have checked hidden ...

Jörgen