hominid4
Member
Hi. I'm building a product purchase order form for a printing company to allow one of their customers to re-order brochures. We'll have a product table (id|brochure_name|brochure_description|quantity) that will start out with 2500 brochures initially available, and each time an order is placed it'll deduct from that 2500 quantity; and when the quantity level reaches 300 they need to receive a "quantity is low" alert email.
I'll be using the calc element to deduct from the quantity on submit, and a second calc element to check when the form loads (or maybe use the same calc on submit) the product table's quantity field and if it's (300<) send an alert email to the printing company's owner.
Doing the quantity deducting and checking shouldn't be a problem, but I'm not sure where to start with sending the email. Such as:
Could I please get a push in the right direction on what I should look for?
Thanks!
J! 3
Fabrik: latest GitHub
I'll be using the calc element to deduct from the quantity on submit, and a second calc element to check when the form loads (or maybe use the same calc on submit) the product table's quantity field and if it's (300<) send an alert email to the printing company's owner.
Doing the quantity deducting and checking shouldn't be a problem, but I'm not sure where to start with sending the email. Such as:
Code:
if ($productQty < 300) {
send email; // what would I put here to send/trigger email?
}
Thanks!
J! 3
Fabrik: latest GitHub