nicolas wrote: Unfortunately, I can't fix errors I didn't see yet 
Sorry, not meant to be a reproach!
nicolas wrote: Now, the new error says that you apparently have something which is not a number in the pfand custom field in one of the products.
I found the problem: I typed in "3,75" instead of "3.75".
This problem comes to account because I changed the decimal system in the currencies configuration. I have replaced "," by "." and vice versa. But the new custom field doesn't "know" this. I think I need to change the formula to convert the "." to "," so that the formula could calculate correctly.
Here I need help (if I think the right way). How to change to formula so that it can convert the custom field decimal system?
Next: The formula works ... more or less as expected. Currently the value of the custom field is multiplied by the product price. I replaced "product.price" with "order.price" for testing reasons. I think I have to multiply the custom field value with the product quantitiy. But I could not find the correct variable. I tried "product.quantity" but this doesn't work.
What do I want to achive?
Let's talk about the cart view ...
Each product line has [custom field] and [quantity] and [price]
-> for each line I have to calculate: [custom field sum] = [custom field] * [quantity]
The summary line of the cart already contains a "sum field" for the custom field. That is great. But it works not as needed.
Here I need: SUM("all product lines [custom field sum]
example of a cart:
IMG -- PRODUCT NAME -- CUSTOM FIELD -- SINLGE PRICE -- QUANTITY -- TOTAL PRICE
------------------------------------------------------------------------------
img -- product 1 -- 3,75 -- 8,80 -- 2 -- 17,60
img -- product 2 -- 2,00 -- 8,80 -- 1 -- 8,80
------------------------------------------------------------------------------
Subtotal 26,40
Sum of Custom fields 9,50
TAX 19% 4,22
------------------------------------------------------------------------------
Total 32,15
How to achive this?
And here comes another important thing: How to apply the tax configuration to the custom field?
"Technical - financial" correct would it be if the custom field's tax is linked to the tax configuration of its product. How to achive this?
In this case we would calculate: ( ( [SUBTOTAL] + [SUM OF CUSTOM FIELDS] ) * TAX ) / 100 * TAX
In the example cart above, the correct TAX would be: 5,73