Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Math operations in Dynamic Email #82

Open
jezmaghuyop opened this issue Jun 27, 2019 · 3 comments
Open

Math operations in Dynamic Email #82

jezmaghuyop opened this issue Jun 27, 2019 · 3 comments

Comments

@jezmaghuyop
Copy link

jezmaghuyop commented Jun 27, 2019

Hi I'm very new to sendgrid's dynamic template and saw some samples that it is possible to use handlebars, my question is how do I do mathematical operations?

I have a list of Items that I need to add Quantity and Price to get the total price for each Item and I can't seem to find a way on how to do it. I saw some Helpers but I'm not sure how to actually implement and it where to put it.



Handlebars.registerHelper("multiply", function(a, b){
    return (a * b);
});


@BoKKeR
Copy link

BoKKeR commented Aug 19, 2021

I would also like to know if this is possible, a simple {{divide 100 variable}} would do it. But it does not seem to work

@madmacc
Copy link

madmacc commented Oct 19, 2021

I don't think this is possible with Sendgrid. It is possible in handlebars on other platforms though.

@pepiyu
Copy link

pepiyu commented Jan 14, 2023

:( So sad

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants