Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted January 21, 20196 yr 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?
January 21, 20196 yr Try using the expression plugin. {expression="$record->customFieldDisplayByKey('quantity', 'raw') * $record->customFieldDisplayByKey('price', 'raw')"}
January 21, 20196 yr Author lol.. well - thanks! Works exactly as intended. Didnt now about expression. THANK YOU
Archived
This topic is now archived and is closed to further replies.