[TYPO3-shop] Weight without decimal places (T3 <4.2.3; tt_prod v1.7.1)

Franz Holzinger franz at ttproducts.de
Wed Jan 28 19:14:47 CET 2009


Franz Gutsch a écrit :

> I've got a Problem entering the products' weight in Backend. Saving a 
> product record always pads the value with several decimal places.
> The marker ###PRODUCT_WEIGHT### displays the weight like this: 
> "50.000000 g". I want the output to look like this: "50 g".
> This issue emerged in T3v4.2.4 and is not solved by v4.2.5. I use 
> tt_products v1.7.1

You can use this setup. Today's version 0.1.21 of div2007 is required.

plugin.tt_products.conf.tt_products.ALL {
	field {
	  weight = TEXT
	  weight {
		preUserFunc = tx_div2007_alpha->phpFunc
		preUserFunc {
			php = round($value,2);
		}
	  }
	}
}

> btw: is there any complete reference for the markers to use in the 
> html-template?

We have example shop templates. They contain most of the available markers.


- Franz


More information about the TYPO3-project-tt-products mailing list