VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product pricing => Topic started by: mihailtufan on August 16, 2016, 07:31:45 AM

Title: prices from custom field
Post by: mihailtufan on August 16, 2016, 07:31:45 AM
Hello,

I`m new on that forum, so sorry if I have not posted in the correct category.

I really searched on the Internet these days but i found nothing.

My problem is this:
- this is the link: http://dev.promovaresiteuri.ro/index.php/en/m-collections/agata-detail
- joomla version: 3.6.2 , virtuemart version: 3.0.16
- in the link above is a demo, the base price for the product is 99 lei (for a meter of material). When i add in the custom field value 1 it shows 198 lei (the base price + the price for 1 meter). Can i do something that on the final price, after i add the value in custom field, the price to be displayed without de base price?
So if i add 1 on custom field to be 99 lei, if i add 2 to be 198 lei...and so on
It is possible?

Thanks a lot
Title: Re: prices from custom field
Post by: Jörgen on August 16, 2016, 07:59:35 AM
Set the base price to 0.00001 ?

regards

Jörgen  Kreativ Fotografi
Title: Re: prices from custom field
Post by: mihailtufan on August 16, 2016, 09:56:18 AM
Thanks for the fast reply. The problem is that the client want to see the default price for 1 meter, if i will set the base price 0.00001 the price in store will be 0,00 lei.

It is someone who knows it is possible to change how the price is calculated? To put at base price, value 0?

Thanks

Title: Re: prices from custom field
Post by: PRO on August 16, 2016, 16:29:30 PM
maybe you need this plugin?
http://extensions.virtuemart.net/product/products/custom-size-detail

Title: Re: prices from custom field
Post by: mihailtufan on August 17, 2016, 10:50:50 AM
Hello,

Ok i managed to resolve the problem, i found a solution. If someone has the same problem i modified in numberinput.php
$calcPrice = $value * $custom_price ;
with
$calcPrice = $value * $custom_price - $custom_price ;

Now i have one more question, it is possible if the client enters , or . the function do the same thing?

Now for 2.5 for example it is ok, if it is 2,5 is not working.

Thanks a lot