Wählen Sie Ihre Sprache:

<we:calculate>

Since version: - | Requires endtag: yes | Required modules: shop

Description

Use this tag to do all mathematical operations supported by PHP. For example *,/,+,-,(),sqrt,..etc.

Attributes

sum

Default value: - | since version: - | required: no

Set this attribute to the name of the sum.


num_format

Default value: - | since version: - | required: no

Set this attribute to the format required.

Allowed values:

  • german
  • french
  • english
  • swiss

print

Default value: false | since version: - | required: no

Set this attribute to "true" to display the result. If this attribute is set to "false" or not set at all. the result will not be displayed.

Allowed values:

  • true
  • false

cachelifetime

Default value: 0 | since version: 4.2.0.0 | required: no

With this attribute you define the validity of the Cache in seconds for this we:Tag. This attribute is used only if cache type defined in the template is we:Tag Cache or Cache is disabled.


Syntax

<we:calculate [sum="attribute"] [num_format="german|french|english|swiss"] [print="true|false"] [cachelifetime="attribute"]> ... </we:calculate>

Examples

Example

<we:calculate sum="total_price" num_format="german" print="true">
(<we:sessionfield name ="article_sum"/>*(1-<we:field name="rebate_level_1"/>))*(1+(<we:field name="vat"/>/100))
</we:calculate>