Author Topic: drop decimals from product length  (Read 207 times)

BenRoe

  • Beginner
  • *
  • Posts: 16
  • A beginner
  • Skype Name: benjamin_roehling
drop decimals from product length
« 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?
Joomla 3.9.21 - VirtueMart 3.8.4 10335 - PHP 7.3.2

pinochico

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 726
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: drop decimals from product length
« Reply #1 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 :)
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds from products, orders and database table
Virtuemart Email Manager - customs email templates

funny-rabbit

  • Beginner
  • *
  • Posts: 18
  • A beginner
Re: drop decimals from product length
« Reply #2 on: October 06, 2020, 02:05:38 am »
other person got the answer.
[Edited by moderator]
Joomla 3.9.21 - VM 3.8.4 - PHP 7.3.2