I ve put
Code: Select all
myvariable = '" . $this->db->escape($data['myvariable']) . "'
If i change it to
Code: Select all
myvariable = '" . $this->db->escape($data['telephone']) . "'
Code: Select all
$data['myvariable'] = $order_info['myvariable'];
Code: Select all
myvariable = '" . $this->db->escape($data['myvariable']) . "'
Code: Select all
myvariable = '" . $this->db->escape($data['telephone']) . "'
Code: Select all
$data['myvariable'] = $order_info['myvariable'];
Where and howgerstavros wrote: ↑Thu Nov 21, 2019 6:29 amHello. I ve created a new variable and put it when adding/editing an order from admin panel. while this variable reads properly the new varchar from the order table, it only erases the column when saving.
I ve putin public function addOrder and editOrder at catalog/model/checkout/order.php.Code: Select all
myvariable = '" . $this->db->escape($data['myvariable']) . "'
If i change it toit saves properly the phone into myvariable. However $data['myvariable'] seems properly connected asCode: Select all
myvariable = '" . $this->db->escape($data['telephone']) . "'
in admin controller. Probably need to be assigned to a cataloge controller file but can't find which. Any help please?Code: Select all
$data['myvariable'] = $order_info['myvariable'];
Code: Select all
$data['myvariable']
Custom OpenCart modules and solutions. You can write PM with additional questions... Extensions you can find here
Hello. in admin/model/sale/order.php askestas wrote: ↑Thu Nov 21, 2019 2:39 pmWhere and howis declared?Code: Select all
$data['myvariable']
To retrieve your data in model file for adding or editing, you should declare this data in corresponding controller file.gerstavros wrote: ↑Sat Nov 23, 2019 5:14 amHello. in admin/model/sale/order.php askestas wrote: ↑Thu Nov 21, 2019 2:39 pmWhere and howis declared?Code: Select all
$data['myvariable']
return array(
'myvariable' => $order_query->row['myvariable'],
Custom OpenCart modules and solutions. You can write PM with additional questions... Extensions you can find here
Code: Select all
$data['myvariable'] = $order_info['myvariable'];
Wrong.gerstavros wrote: ↑Sun Nov 24, 2019 8:28 pmyes, i have already declared the variable in admin/controller/sale/order.phpmay should i add to system library like older oc versions? can't see anything relevant there.Code: Select all
$data['myvariable'] = $order_info['myvariable'];
Code: Select all
$this->load->model('checkout/order');
$this->session->data['order_id'] = $this->model_checkout_order->addOrder($order_data);
Custom OpenCart modules and solutions. You can write PM with additional questions... Extensions you can find here
Users browsing this forum: No registered users and 206 guests