Post by Pat073 » Wed Mar 19, 2025 11:42 pm

Hey all,
Version 3.0.4.0 Under admin-> customer-> groups I have
Customer group name sort order
A 3
B (default) 1
C 2

When I go to products->edit->specials tabs and click add to add a product special price, the drop down customer group menu is sorted by name ascending and not sort order ascending, meaning customer group A is the default" drop down menu" choice not default or sort order 1 customer group.
Can not find if it's the settings or something else causing this.

Newbie

Posts

Joined
Wed Feb 21, 2024 3:55 am

Post by ADD Creative » Thu Mar 20, 2025 12:12 am

Name is the default sort in admin. You would need to modify the code to change it.
https://github.com/opencart/opencart/bl ... up.php#L51

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by Pat073 » Thu Mar 20, 2025 1:35 am

Thanks ADD Creative.

Created a file in modification manager with code below, refreshed cache and voila.

Code: Select all

<modification>
    <name>Admin customer sort order</name>
    <version>1</version>
    <code>Admin customer sort order</code>
    <author>Pat</author>
	<file path="admin/model/customer/customer_group.php">
        <operation>
            <search><![CDATA[$sql .= " ORDER BY cgd.name";]]></search>
            <add position="replace"><![CDATA[$sql .= " ORDER BY cg.sort_order";]]>
            </add>
        </operation>	
  </file>
</modification>

Newbie

Posts

Joined
Wed Feb 21, 2024 3:55 am
Who is online

Users browsing this forum: Amazon [Bot] and 21 guests