I would like to add an button on the website to the cart view, that basically would allow the customer to receive a PDF quotation of the current cart products to his/her email. I know how to create an email template, and thought of making a server action that would use the template and send the email. I also managed to create a button to the website. However, I don't know how to call the server action from the website, or if it's even possible in this case where the action is send an email type. If the server action executes python code, there is the "Available on the Website" button available. But not for the send an email action. Does this mean that this type of server action cannot be called from the website?
Anyway, as I currently see it I have three options:
- Somehow call the send an email server action from the website? How?
- Call an execute python code action and use that to call the send an email action? (seems shaky)
- Abandon the server action approach, and figure some other way to do this?
Any help will be greatly appreciated as always. Even if you can just point me on the right direction on options one, two and three above. Thank you!