Jump to content

Increase number of suggestions on combinations generator


fourmarketing

Recommended Posts

  • 2 weeks later...

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

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 by Prestachamps (see edit history)
Link to comment
Share on other sites

@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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...