DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

Using the price view helper

  1. Create a price view helper object:

    $priceViewHelper = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(Tx_Oelib_ViewHelper_Price::class);
    
  2. Set the currency of the price using the ISO 4217 alpha-3 code:

    $priceViewHelper->setCurrencyFromIsoAlpha3Code('EUR');
    
  3. Set the value of the price:

    $priceViewHelper->setValue(1234.567);
    
  4. Render the price in the currency and the format as defined in ISO 4217:

    // Returns “€ 1.234,57”.
    $priceViewHelper->render();