Condition dans un script pour afficher ou non une donnée
Bonjour,
J'aurais aimé savoir comment on peut un condition d'affichage ou non dans un javascript issue d'une synthax en php
c'est ce type de condition que je dois insérer à la ligne //customers_group_id
Code:
if (MODE_B2B_B2C == 'true') {
Merci
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| <table width="100%" cellpadding="5" cellspacing="0" border="0">
<tr>
if (MODE_B2B_B2C == 'true') {
$content .= '
<td>' . $this->app->getDef('table_heading_customers_group') . '</td>
';
}
</tr>
</table>
$output = <<<EOD
<script type="text/javascript"><!--
var quantitydiscount_row = $i;
function addQuantityDiscountValue() {
//customers_group_id
html += '<td>';
html += ' <select name="products_quantitydiscount[' + quantitydiscount_row + '][customers_group_id]" class="form-control">{$customers_group_name}</select>';
html += '</td>';
quantitydiscount_row++;
}
</script>
<br />
EOD; |