How to combine arithmetic operators

Author Message

esperion H

Friday 09 December 2005 8:25:31 am

{$product_item.price_inc_vat|l10n(currency)}

I want to both multiply the value output from this variable and use the "round" operator.

How can that be done?

Paul Forsyth

Friday 09 December 2005 12:43:46 pm

Try:

{mul($product_item.price_inc_vat|l10n(currency), $multiplication_number)|round}

or

{mul($product_item.price_inc_vat|l10n(currency)|round, $multiplication_number)}

depending on your need.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 19:10:47
Script start
Timing: Jan 18 2025 19:10:47
Module start 'layout'
Timing: Jan 18 2025 19:10:47
Module start 'content'
Timing: Jan 18 2025 19:10:47
Module end 'content'
Timing: Jan 18 2025 19:10:47
Script end

Main resources:

Total runtime0.0488 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0179 589.4609152.6406
Module start 'layout' 0.01800.0053 742.101639.4609
Module start 'content' 0.02330.0231 781.562589.2422
Module end 'content' 0.04640.0023 870.804730.3047
Script end 0.0488  901.1094 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00367.3154140.0003
Check MTime0.00163.2318140.0001
Mysql Total
Database connection0.00326.564610.0032
Mysqli_queries0.009118.548430.0030
Looping result0.00000.069810.0000
Template Total0.00173.510.0017
Template load0.00112.172410.0011
Template processing0.00071.351810.0007
Override
Cache load0.00071.425010.0007
General
dbfile0.005411.013980.0007
String conversion0.00000.018640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs