Post by opensab677 » Tue Jun 26, 2018 2:59 am

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

New member

Posts

Joined
Mon Sep 04, 2017 7:54 pm

Post by cyclops12 » Tue Jun 26, 2018 4:28 am

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

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');
		}
And change it to

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');
		}
Then open admin/view/template/extension/total/sub_total.twig and find

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" />
And change it to

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" />
Refresh your cache and it should work.
You have the original codes above if needed.

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by opensab677 » Tue Jun 26, 2018 4:57 am

thanks

New member

Posts

Joined
Mon Sep 04, 2017 7:54 pm

Post by one2012 » Fri Jul 13, 2018 5:22 pm

Thank you cyclops12, your solution works for me too!

New member

Posts

Joined
Wed Feb 06, 2013 11:22 pm

Post by iSaulius » Wed Feb 27, 2019 9:05 pm

Thanks a lot!!!!
working on 3.0.3.1

Newbie

Posts

Joined
Tue Oct 16, 2012 2:02 am

Post by xseon » Wed Feb 10, 2021 6:48 pm

It works in the admin only. I see no effect in the front-end. Subtotal is always first. :(

Deeper and Better Category Module
Mass Product Price Change


User avatar
New member

Posts

Joined
Thu Dec 01, 2011 3:04 pm
Location - Bulgaria
Who is online

Users browsing this forum: No registered users and 22 guests