In OC 3.0.2 I go in extensions then in order totals and then into sub-total option where I place a number in the field sort order but opencart doesn't save it. I think it's a bug. Any suggestions to fix it?
thanks
Just looked into this and you will need to edit the controller and view files.
Open admin/controller/extension/total/sub_total.php and find
And change it to
Then open admin/view/template/extension/total/sub_total.twig and find
And change it to
Refresh your cache and it should work.
You have the original codes above if needed.
Open admin/controller/extension/total/sub_total.php and find
Code: Select all
if (isset($this->request->post['sub_total_sort_order'])) {
$data['sub_total_sort_order'] = $this->request->post['sub_total_sort_order'];
} else {
$data['sub_total_sort_order'] = $this->config->get('sub_total_sort_order');
}
Code: Select all
if (isset($this->request->post['total_sub_total_sort_order'])) {
$data['total_sub_total_sort_order'] = $this->request->post['total_sub_total_sort_order'];
} else {
$data['total_sub_total_sort_order'] = $this->config->get('total_sub_total_sort_order');
}
Code: Select all
<input type="text" name="sub_total_sort_order" value="{{ sub_total_sort_order }}" placeholder="{{ entry_sort_order }}" id="input-sort-order" class="form-control" />
Code: Select all
<input type="text" name="total_sub_total_sort_order" value="{{ total_sub_total_sort_order }}" placeholder="{{ entry_total_sort_order }}" id="input-sort-order" class="form-control" />
You have the original codes above if needed.
It works in the admin only. I see no effect in the front-end. Subtotal is always first. 

Who is online
Users browsing this forum: No registered users and 22 guests