LukasGr. Posted January 21, 2019 Share Posted January 21, 2019 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 More sharing options...
Ryan Ashbrook Posted January 21, 2019 Share Posted January 21, 2019 Try using the expression plugin. {expression="$record->customFieldDisplayByKey('quantity', 'raw') * $record->customFieldDisplayByKey('price', 'raw')"} Â Link to comment Share on other sites More sharing options...
LukasGr. Posted January 21, 2019 Author Share Posted January 21, 2019 lol.. well - thanks! Works exactly as intended. Didnt now about expression. THANK YOU Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.