Closed (duplicate)
Project:
Commerce Core
Version:
7.x-1.13
Component:
Product reference
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
12 Apr 2016 at 09:37 UTC
Updated:
11 Nov 2017 at 03:17 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
handkerchiefOk the problem is this: https://www.drupal.org/node/2704341
I use the chose module (https://www.drupal.org/project/chosen) so a huge number of items is not a problem for me. So i set this field settings:
But this doesn't work. Now i must hack the commerce module.
This code does not work correctly in the file sites/all/modules/commerce/modules/product_reference/commerce_product_reference.module:
It should be:
Comment #3
blasthaus commentedSame issue, however in our case, product_reference fields were defined in code (not UI) and therefore 'options_list_limit' was actually NULL, so to catch this case as well, use array_key_exists() instead:
Comment #4
blasthaus commentedHere's a patch to that effect.
Comment #5
blasthaus commentedComment #6
jkellendonk commentedI had the same issue. Instead of modifying code, my solution was to set the option list limit set for the product reference on my display nodes to 99999999. All products are showing up again.
Note: I had to go back and fix a few product display nodes because when I intended to edit only another part of the node, saving the node caused the wrong product because the existing product was not in the option list from this issue. (It changed to the first product in the select list.)
Comment #7
friera commented#4 works for me. Thank you
Comment #8
hansfn commented#4 works for me too. Thx!
Comment #9
andyg5000Based on the form label and the fact that we can simplify this, here's a new patch.
Comment #10
andyg5000Related #2096361: Move Product Match functions from db_select to EntityFieldQuery
Need to make sure we don't go backwards. However, that issue introduced a bug in my opinion because existing sites are expecting the full list to be loaded. When it's not, people get angry :D
Comment #11
blasthaus commented#9: So what's the logic behind removing the default of 10 products?
Comment #12
tzt20 commentedI can confirm that the solution in #6 works without the need to apply a patch.
Steps to solve this:
-Select edit on your Product Reference field
If you're using "Unlimited" as your "Number of Values" option, you'll need to update the "Options list limit," so enter a larger value. I used 9999.
See attached screenshot.
Updated:
Users expecting to see all of their product selections should now see them (up to 9999 of course). This is especially useful for those clients who are expecting to see all of their products rather than be limited to the 10 product options.
Comment #13
andyg5000Clients who have sites pre-dating the limit of 10 commit might expect for this list to not be limited. When it is, they can't select the products that they're expecting to be able to select.
Comment #14
matthiasm11 commentedI can confirm the patch from #9 works. It doesn't make sense to limit a select list in the UI to the 10 first products, a shop administrator should be able to reference the product he/she wants to the current line item.
Comment #15
bpopp commentedThe patch in #9 worked for me!
Comment #16
matthiasm11 commentedComment #17
rszrama commentedFixed by the reversion in #2697017: Revert the EntityFieldQuery based product matcher and arbitrary options list limit.