Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
LukasGr. Posted January 21, 2019 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?
Ryan Ashbrook Posted January 21, 2019 Posted January 21, 2019 Try using the expression plugin. {expression="$record->customFieldDisplayByKey('quantity', 'raw') * $record->customFieldDisplayByKey('price', 'raw')"} Â
LukasGr. Posted January 21, 2019 Author Posted January 21, 2019 lol.. well - thanks! Works exactly as intended. Didnt now about expression. THANK YOU
Recommended Posts
Archived
This topic is now archived and is closed to further replies.