Hi,

I'm currently building a web shop with Commerce that will sell contact lenses. As it stands now, I'm using the Product Bundle module to add two separate products (contact lenses for right and left eye) of product type A to another product type B. Product type B will then be linked to a product display.

Product type B contains two product reference fields (one for the left eye and one for the right) that refer to products of type A. The thing is, apparently certain type of contact lenses can have 6 different attributes with different combinations. So each product reference field can contain more than a 1000 variations.

I have currently encountered a problem where I can only select about 992 (if I counted correctly) products per product of type B, total. So if I select 992 products in the product reference field for the left eye, any other product I select in the product reference field for the right eye is not being saved. This happens as follows:

  • I add a new product of type B
  • I fill in all the required fields and create a new display node in the same form
  • I then select all the variations I want to add for both the right eye as the left eye (2500 entities each)
  • I now click on the button to save my newly created product (of type B)
  • I return to the edit form and only the first 992 variations of my selection in the first product reference field are selected. Any other variation is deselected. Also, the display node I wanted to create was never created.
  • I receive no error message whatsoever

I thought that it might be a memory issue so I moved everything to a VPS where memory should not be an issue. But the problem persists.

Does anyone here know what the problem might be?

Comments

rszrama’s picture

Status: Active » Closed (fixed)

You're just hitting up against an expected limitation; in this case I believe it's a limitation on the sheer amount of data you submit via a POST request. You may be able to adjust that in your PHP settings, but alternatively you could stop showing the widget on the edit form and devise some other way to associate product displays with their referenced products. That's the successful strategy I've seen others implement when their product counts per display stretch into the thousands.