- Posts: 259
- Thank you received: 22
Sorting Of Addresses in checkout
- rodfarrell
-
Topic Author
- Offline
Less
More
7 years 2 months ago - 7 years 2 months ago #308094
by rodfarrell
Sorting Of Addresses in checkout was created by rodfarrell
I have a site where the head office is placing orders for almost 100 outlets and the outlet addresses are all listed for selection using the dropdown method. I want to sort the display order of the addresses by the city.
To do this I presume I need to modify address_select.php What changes are needed there or am I on the wrong track?
To do this I presume I need to modify address_select.php What changes are needed there or am I on the wrong track?
Last edit: 7 years 2 months ago by rodfarrell.
Please Log in or Create an account to join the conversation.
7 years 2 months ago #308108
by nicolas
Replied by nicolas on topic Sorting Of Addresses in checkout
Hi,
You would have to change the line:
to:
in the file administrator/components/com_hikashop/classes/address.php
You would have to change the line:
Code:
$query = 'SELECT a.* FROM '.hikashop_table('address').' AS a WHERE '.implode(' AND ', $filters).' ORDER BY a.address_default DESC, a.address_id DESC';
Code:
$query = 'SELECT a.* FROM '.hikashop_table('address').' AS a WHERE '.implode(' AND ', $filters).' ORDER BY a.address_city ASC';
Please Log in or Create an account to join the conversation.
- rodfarrell
-
Topic Author
- Offline
Less
More
- Posts: 259
- Thank you received: 22
7 years 2 months ago #308196
by rodfarrell
Replied by rodfarrell on topic Sorting Of Addresses in checkout
Hi Nicolas, you solution worked (of course) but I'm having a bit of a brain fade moment. How do I save that change as a template override?
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
7 years 2 months ago #308199
by Mohamed Thelji
Replied by Mohamed Thelji on topic Sorting Of Addresses in checkout
Hello,
Hikashop classes are different than Hikashop views files so you'll have to re-apply that patch after every updates.
Kind regards,
Mohamed Thelji.
Hikashop classes are different than Hikashop views files so you'll have to re-apply that patch after every updates.
Kind regards,
Mohamed Thelji.
Please Log in or Create an account to join the conversation.
Time to create page: 0.178 seconds