News:

Looking for documentation? Take a look on our wiki

Main Menu

drop decimals from product length

Started by BenRoe, October 05, 2020, 23:23:20 PM

Previous topic - Next topic

BenRoe

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

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 for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

funny-rabbit

#2
other person got the answer.
[Edited by moderator]
Leaning Virtuemart and Joomla
Config: Joomla 3.9.21 - VM 3.8.5 - PHP 7.4