VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product creation => Topic started by: BenRoe on October 05, 2020, 23:23:20 PM

Title: drop decimals from product length
Post by: BenRoe on October 05, 2020, 23:23:20 PM
product length is shown with 4 decimals "xy.abcd" cm

I found a file which holds the product_length named customfield.php but I dont know how to drop the decimals so that only xy cm shows up.
Can anybody help?
Title: Re: drop decimals from product length
Post by: pinochico on October 06, 2020, 00:03:15 AM
product length is not in customfield, is product parameter.

If you want drop number of drop the decimals, override template, where do you call this value for showing.
Don't change any in administration, but use php function for cut or rounding for echo value.

Result: You must find place where do you call in template in PHP, not me :)
Title: Re: drop decimals from product length
Post by: funny-rabbit on October 06, 2020, 02:05:38 AM
other person got the answer.
[Edited by moderator]