我们正在为餐饮服务构建一个交互式订单,其中屏幕上的总更新,然后详细信息都是使用PHP Mailer向餐厅经理订购的。
除非我们无法通过电子邮件发送总数,否则一切都很有效。当人们填写表格时,总数是通过javascript生成的。
我们认为解决方案是以某种方式显示PHP Mailer将识别的隐藏div或输入中的总数,但我们正在努力解决这个问题,或者即使这是正确的答案。
以下是link to the site,代码如下。谢谢!
注意:我在电子邮件表单中添加了“total”和“emailTotal”以查看是否有效。我们希望这只是订单的美元金额。
<?php
if(isset($_POST['submit']))
{
$message=
'
<table cellspacing="0" cellpadding="6" border="1" style="width:100%;">
<tr border="1">
<td>DANVILLE BANQUET REQUEST</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr border="1">
<td sytle="width:25%">
<strong>Client:</strong>
</td>
<td sytle="width:25%">
'.$_POST['inputName'].'
</td>
<td sytle="width:25%">
<strong>Day & Time:</strong>
</td>
<td sytle="width:25%">
'.$_POST['date'].'<br />
'.$_POST['time'].'
</td>
</tr>
<tr border="1">
<td><strong>'.$_POST['pickupOrDelivery'].'</strong></td>
<td></td>
<td><strong>Guests:</strong></td>
<td>'.$_POST['guestnumber'].'</td>
</tr>
<tr border="1">
<td>
<strong>Phone:</strong>
</td>
<td>'.$_POST['inputPhone'].'</td>
<td></td>
<td></td>
</tr>
<tr border="1">
<td><strong>Email:</strong></td>
<td>'.$_POST['inputEmail'].'</td>
<td></td>
<td></td>
</tr>
<tr border="1">
<td>
<strong>Package:</strong>
</td>
<td>
<strong>'.$_POST['menu'].'</strong><br />
</td>
<td>
<strong>'.$_POST['room'].'</strong><br />
<td></td>
</tr>
<tr border="1">
<td>
<strong>Extras:</strong>
</td>
<td>
'.$_POST['guac'].'<br />
'.$_POST['quesadillas'].'<br />
'.$_POST['floutas'].'<br />
'.$_POST['ducktacos'].'<br />
'.$_POST['nachos'].'<br />
'.$_POST['roastedcorn'].'
</td>
<td></td>
<td></td>
</tr>
<tr border="1">
<td>
<strong>Desserts:</strong>
</td>
<td>
'.$_POST['flan'].'<br />
'.$_POST['limePie'].'<br />
'.$_POST['cremeBruleeCheesecake'].'
</td>
<td></td>
<td></td>
</tr>
<tr>
<td>
<strong>Notes:</strong>
</td>
<td>'.$_POST['notes'].'</td>
<td></td>
<td></td>
</tr>
<tr>
<td>
<strong>Total:</strong>
</td>
<td>'.$_POST['total'].'</td>
<td>'.$_POST['emailTotal'].'</td>
<td></td>
</tr>
</table>
';
(跳过php邮件代码和大部分订单)
<div class="row">
<div class="col-lg-10 offset-lg-1">
<div class="total">
<h2>Total: $<span id="total"></span></h2>
</div>
<br />
<input type="hidden" name="emailTotal" value="help" />
<input type="submit" class="btn btn-success btn-lg btn-block" name="submit" value="Submit Request" />
</div>
</div>
最后是相关的js:
var total = (banquetPrice * numGuests) + (9.5 * numGuac) + (9.5 * numQuesa) + (9.5 * numNachos) + (9.5 * numFloutas) + (12.5 * numDuckTacos) + (4.5 * numRoastedCorn) + (7* numFlanP) + (7* numKeyLimeP) + (7 * numCheesecakeP)
console.log(banquetPrice)
$("#total").html(total.toFixed(2));
console.log(total)
答案 0 :(得分:0)
您的隐藏表单字段名为configure: error: The following required libraries were not found:
libXpm libgif/libungif libtiff
Maybe some development libraries/packages are missing?
If you don't want to link with them give
--with-xpm=no --with-gif=no --with-tiff=no
as options to configure
,但您的JS引用了docker run jenkinsci/jnlp-slave -url http://jenkins-server:port <secret> <slave name>
- 只需将其更改为emailTotal
,您就可以了。