我正在爲opencart創建一個新的發貨模塊。這隻需要從管理員的名稱和成本。但是,在文本框內顯示一個錯誤。 Opencart - 新的發貨模塊中的未定義變量
我被困在這裏,真的想要解決方案。我的看法(.tpl)文件如下。
<div class="box">
<div class="heading">
<h1><img src="view/image/shipping.png" alt="" /> <?php echo $heading_title; ?></h1>
<div class="buttons"><a onclick="$('#form').submit();" class="button"><?php echo $button_save; ?></a><a href="<?php echo $cancel; ?>" class="button"><?php echo $button_cancel; ?></a></div>
</div>
<div class="content">
<form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form">
<table class="form">
<tr>
<td><?php echo $entry_name; ?></td>
<td><input type="text" name="ndz_name" value="<?php echo $ndz_name; ?>" /></td>
</tr>
<tr>
<td><?php echo $entry_amount; ?></td>
<td><input type="text" name="ndz_amount" value="<?php echo $ndz_amount; ?>" /></td>
</tr>
<tr>
<td><?php echo $entry_status; ?></td>
<td><select name="ndz_status">
<?php if ($ndz_status) { ?>
<option value="1" selected="selected"><?php echo $text_enabled; ?></option>
<option value="0"><?php echo $text_disabled; ?></option>
<?php } else { ?>
<option value="1"><?php echo $text_enabled; ?></option>
<option value="0" selected="selected"><?php echo $text_disabled; ?></option>
<?php } ?>
</select></td>
</tr>
<tr>
<td><?php echo $entry_sort_order; ?></td>
<td><input type="text" name="ndz_sort_order" value="<?php echo $ndz_sort_order; ?>" size="1" /></td>
</tr>
</table>
</form>
</div>
</div>
Opencart的版本:1.5
Ar你在控制器中設置這些變量? – Justinas