I installed the latest Commerce 7.15 on my EveryLabels.com.au website. All good except that when I went to create new products on the 'Add Content' form, it only showed up a limited number of products - about 50 - and so I could not make up any new products in that category.

For now the solution to my problem has been to go back to Commerce 7.14 and all works again. But I'd like to upgrade to 7.15. Does anyone know if there is a setting to change that will make the products reappear?

Comments

rszrama’s picture

Title: Commerce 7.15 limits the number of products shown on 'Add Content' pages. » Revisit the product query limit introduced in Commerce 7.15
Version: 7.x-1.5 » 7.x-1.x-dev
Category: bug » task

Hmm, yep, this was an intentional decision, but perhaps it wasn't appropriately scoped? Can you paste a screenshot of your form causing the trouble? I'm looking specifically for the type of widget you're using.

willem77’s picture

G'day Ryan,

Thanks for your response.

I can't post a screenshot any more because I have reverted to 7.14, but the widget is Check boxes/ Radio buttons.

Given that some of my categories contain several thousand products that was never going to work for me. I have more than 58 000 products on the website. This is because I took your view that every variation of every product is a separate product with it's own SKU.

Actually, while I am talking about widgets, I would have preferred to use the Select List widget, but because the window provided was only 4 lines high and non extendable it was impossible to use. In one category I had 4 lots of 24 products I had to click. That's 96 each time, and I did that 183 times. I had to break that category up into 3 separate categories, each of which has more than 5000 products, to keep things manageable. I was getting fingertip trauma from clicking after a while. With a decent Select List window I could have used the shift key to highlight 24 at a time. For obvious reasons the Auto-complete widget wasn't practical.

Willem

bojanz’s picture

Can you provide a screenshot of your current node add / edit page?
Would be very interested to know how we can make your use case work better.

Ryan's 50 product limit makes sense for most use cases (though it could definitely be configurable), a setup such as your would usually be served much better with a custom widget.

rszrama’s picture

Yeah, with that many products and such, I'd at least go for an autocomplete textfield widget. But it would be interesting still to get a "wildcard" reference widget going that can easily reference a whole group of products based on SKU or something. What I should probably do is remove the query limit in certain cases, like populating the options list for a select widget on the edit form.

willem77’s picture

StatusFileSize
new134.44 KB

G'day bojanz and Ryan,,

Thanks for your response. I look forward to the solution you guys come up with!

I have attached a screenshot of a node add page from my website. OS is Windows 8, using IE10, metro version. The screenshot refers to this page:

https://everylabels.com.au/node/1686

Ryan's idea of a 'wildcard' reference widget sounds interesting.

Thanks

Willem

zestagio’s picture

Status: Active » Needs review
StatusFileSize
new809 bytes

Hi, I encountered the same problem after the update. Sorry for my English. Here is the patch

zestagio’s picture

Version: 7.x-1.x-dev » 7.x-1.5
StatusFileSize
new809 bytes

sorry, chose the wrong version of the module

rszrama’s picture

The problem is if we just do it with no condition, we may as well revert the patch we put into Commerce 1.5 - I'm pretty sure the change was made specifically because of the way the Entity API was interacting with this options list callback. Maybe we just need to update our property info to reference a separate options list callback that has the limit and revert the original patch.

zestagio’s picture

I also think that the restriction was intended. But I need a current version of the module, so the patch was written as a temporary solution. I think that it is appropriate to write a widget that will allow you to customize the number of products. Sorry for my english

jeffmcnear’s picture

how would I use the patch referenced above?
... never mind I should have tried it before asking
Thanks!

zterry95’s picture

yes, this is change make me surfurring big pressure from our client. :(

I have to look into the code to see why the product select list limited to 50. then found this topic.

a good idea is that we need somewhere (maybe field config) to config the "$limit" so that this won't be a problem any more.

or we have to use the old version, that there are no limits for the product select list.

For now, the limit is 50, and we can't change it at all from any UI interface.

rszrama’s picture

Yep, we'll have a 1.6 release out soon that reverts this; for now just change it in the code. No need to take heat from your client. : )

willem77’s picture

Thanks, Ryan,

I'm looking forward to the 1.6

Willem

rszrama’s picture

Version: 7.x-1.5 » 7.x-1.x-dev
StatusFileSize
new7.84 KB

The attached patch reverts the change so the default value in the function signatures is NULL instead of 50 and adds a field setting for customer profile reference and product reference fields to set an options list limit if desired. If left blank, no limit will be applied; otherwise the setting accepts a positive numeric value and just converts to an integer when actually running the query.

For customer profiles, I set the default value to 50; for product reference fields I set it to NULL (i.e. the default behavior pre-1.5).

rszrama’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.