ilario Posted January 15 Share Posted January 15 (edited) hello i use prestashop 8.2, product v2, in the filter combinations, i would like to put the attributes in alphabetical order, in the "show dropdown menu" and if possible in the button add a checkbox that selects them all as in the generation of combinations. thanks a lot Edited January 21 by ilario (see edit history) Link to comment Share on other sites More sharing options...
Divine Posted January 21 Share Posted January 21 Hello, you are in the english section of the forum so please translate your message in the appropriate language Link to comment Share on other sites More sharing options...
ilario Posted January 21 Author Share Posted January 21 2 hours ago, Divine said: Hello, you are in the english section of the forum so please translate your message in the appropriate language sorry you're right Link to comment Share on other sites More sharing options...
pallavigodse Posted January 21 Share Posted January 21 Sort attributes alphabetically in the dropdown menu Override or customize the template: Locate the template file that renders the filter combinations dropdown. This is often found in the admin/themes folder or the module's folder. Open the relevant .tpl or .html.twig file. Sort the attribute list before rendering it. For example, in PHP, you can use usort() to order the array of attributes alphabetically. Modify the controller: If the attribute data is retrieved from a controller, modify the query or function to include an ORDER BY clause (for example, ORDER BY name ASC).Cache and Test: After making modifications, clear the PrestaShop cache (under "Advanced Parameters > Performance") and test the attributes are displayed alphabetically. Link to comment Share on other sites More sharing options...
ilario Posted January 21 Author Share Posted January 21 32 minutes ago, pallavigodse said: Sort attributes alphabetically in the dropdown menu Override or customize the template: Locate the template file that renders the filter combinations dropdown. This is often found in the admin/themes folder or the module's folder. Open the relevant .tpl or .html.twig file. Sort the attribute list before rendering it. For example, in PHP, you can use usort() to order the array of attributes alphabetically. Modify the controller: If the attribute data is retrieved from a controller, modify the query or function to include an ORDER BY clause (for example, ORDER BY name ASC).Cache and Test: After making modifications, clear the PrestaShop cache (under "Advanced Parameters > Performance") and test the attributes are displayed alphabetically. hello thank you very much for the answer, I tried to search in the theme folder both default and new-theme, but I did not find the right file. could you tell me if there is a particular module that controls the products/combination section. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now