Hi everyone,
I have an order inventory form that has about 80 products listed. Each product has a minimum and maximum quantity (0-500). How do I only email the results of all fields with a result greater than 0.
ex input.
Pens qty selected = 50
folders qty selected = 0
letterhead qty selected = 1
Emailed result
Pens qty selected = 50
letterhead qty selected = 1
Thanks!
I have an order inventory form that has about 80 products listed. Each product has a minimum and maximum quantity (0-500). How do I only email the results of all fields with a result greater than 0.
ex input.
Pens qty selected = 50
folders qty selected = 0
letterhead qty selected = 1
Emailed result
Pens qty selected = 50
letterhead qty selected = 1
Thanks!
Hi acaddy,
Probably you need some PHP in the Email template to scan the results and only output those you want to see.
Bob
Probably you need some PHP in the Email template to scan the results and only output those you want to see.
Bob
Hi acaddy,
Impossible to say exactly without a lot more info. With 80 products I'd probably be storing the critical info in a db table.
But assuming something simpler. Let's just say that you have 4 products to save my typing.
Bob
Impossible to say exactly without a lot more info. With 80 products I'd probably be storing the critical info in a db table.
But assuming something simpler. Let's just say that you have 4 products to save my typing.
<?php
$products = array (
'product1_id' => 'Product 1 title',
'product2_id' => 'Product 2 title',
'product3_id' => 'Product 3 title',
'product4_id' => 'Product 4 title' );
foreach { $product as $k = > $v ) {
$qty = JRequest::getInt($v, 0, 'post');
if ( $qty ) {
echo '<div>$v : qty $k</div>';
}
}
?>
Bob
This topic is locked and no more replies can be posted.