Author Topic: add a price that is in custom field with the price of the product  (Read 298 times)

lman

  • Beginner
  • *
  • Posts: 6
  • A beginner
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

Jörgen

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3778
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: add a price that is in custom field with the price of the product
« Reply #1 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
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

lman

  • Beginner
  • *
  • Posts: 6
  • A beginner
Re: add a price that is in custom field with the price of the product
« Reply #2 on: December 09, 2021, 14:15:43 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.

lman

  • Beginner
  • *
  • Posts: 6
  • A beginner
Re: add a price that is in custom field with the price of the product
« Reply #3 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

Jörgen

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3778
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: add a price that is in custom field with the price of the product
« Reply #4 on: December 09, 2021, 14:57:57 pm »
You have checked hidden ...

Jörgen
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.