Jump to content

PHP Arithmetic


LukasGr.

Recommended Posts

Hi guys,

it might be to late for my braind as I just can't figure out what seems to be rather easy in my head..

I got a database (e.g. Marketplace) - 2 fields, numbers input only, without decimal (e.g. Quantity, Price per Unit) and want to display the TOTAL of both fields in Display template. (Quantity * Price)...

I am missing a part here:

{{ {$record->customFieldDisplayByKey('quantity', 'raw')} * {$record->customFieldDisplayByKey('price', 'raw')} }}

echo (); is not really best practice if I can tell from Help Guides - But now I am confused.. 😞

Can someone help me here, please?

 

PS: I assume field values (despite being "numbers") are stored as STRING, right?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...