fourmarketing Posted May 13, 2022 Share Posted May 13, 2022 Is there a way to increase the number of suggestions when searching an attribute to generate? It only shows 4 rows and in our website that's not enough. We didnt find any config or module that does this Link to comment Share on other sites More sharing options...
Prestachamps Posted May 13, 2022 Share Posted May 13, 2022 Are you sure the attribute has more than 4 values added. I'm asking as I saw clients add features, and those can't be used on combinations. I never saw something similar, that's why my first bet went into a misconfiguration part. Link to comment Share on other sites More sharing options...
fourmarketing Posted May 16, 2022 Author Share Posted May 16, 2022 (edited) @Prestachamps Yes, there are more than 4 values on that attribute Edited May 16, 2022 by fourmarketing (see edit history) Link to comment Share on other sites More sharing options...
Prestachamps Posted May 25, 2022 Share Posted May 25, 2022 Hi, The reason why nobody answered is that this should work as expected. If there is no DB error than this shouldn't be an issue. Here are some further questions : 1. Are you sure that the site admin you're checking is not a development version admin, and not the live one? 2. Inside the Database you should be able to find the attribute with the values added- you can also find products who share the value. 3. This requires debugging made by a developer - there is no magical solution for it. I would recommend to post this to the job section ? That will probably attract more ppl who are interested to solve this. Based upon what you're described there is not much we can say. there are too many variables that can/could cause such misbehavior. Cheers, LEo Link to comment Share on other sites More sharing options...
fourmarketing Posted May 25, 2022 Author Share Posted May 25, 2022 Whos saying that its an error? Im just asking if theres a way to increase number of suggestions when generating combinations... I didnt complain about any error Link to comment Share on other sites More sharing options...
Prestachamps Posted May 25, 2022 Share Posted May 25, 2022 (edited) Hi @fourmarketing, I've had some time and there is a JavaScript solution for this, to show more than 5 suggestions for the combination selector: inside the file: /ADMINFOLDER/themes/default/js/bundle/product/form.js after line 947 add the "limit: 20," to show up to maximum 20 results: /** init input typeahead */ $('#form_step3_attributes').tokenfield({ typeahead: [{ hint: false, cache: false, }, { source(query, syncResults) { engine.search(query, (suggestions) => { syncResults(filter(suggestions)); }); }, display: 'label', limit: 20, }], minWidth: '768px', }); Cheers, Leo. PS; I just realized what you where asking. Keeping things calm can bring you further Edited May 25, 2022 by Prestachamps (see edit history) Link to comment Share on other sites More sharing options...
fourmarketing Posted May 26, 2022 Author Share Posted May 26, 2022 @Prestachamps That works well... thank you! How did you find the file? I got to /src/PrestaShopBundle/Controller/Admin/AttributeController.php (which handles the all attribute list, but there was no limit there) by searching through the files... but i would have never found that one you wrote since theres no direct reference to generating combinations or something like that anyways, thank you! Link to comment Share on other sites More sharing options...
Prestachamps Posted May 26, 2022 Share Posted May 26, 2022 Hi @fourmarketing, it was a tricky one to find it, and to get to the point where that suggestion selector is being created by using typeahead.js , which had the default limit of maximum 5 Cheers, Leo. 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