0
我呼籲no.tpl頁面,在此頁面時在select dropdown
Opencart的獲取選擇值控制器,用於過濾
這顯示客戶名稱是代碼: no.tpl
<select name="customer_id" id="customer" style="width: 325px;margin-bottom:10px" class="form-control">
<?php foreach($customerData as $customer){ ?>
<option value=<?php echo $customer['customer_id']?>><?php echo $customer['customer_name']?></option>
<?php }?>
</select>
在控制器頁我要篩選出特定的客戶名單
$queryCustomer = $this->db->query("select customer_id, concat(firstname, ' ',lastname) as name, email from " . DB_PREFIX . "customer where customer_id='6'");
$selectedCustomer = $queryCustomer->row;
$selectedCustomerId = $selectedCustomer['customer_id'];
$selectedCustomerName = $selectedCustomer['name'];
$selectedCustomerEmail = $selectedCustomer['email'];
我想要customer_id='6'
選爲customer_id
。我的意思是通過選擇值到控制器頁面