2
Answers
Vote up!
2
Vote down!

Is there a limit to referenced (product) entities in Drupal 7.2?

  • I am setting up a site using Drupal Commerce with three different product groups defined by both product and content type
  • Each type has 80 individual products
  • A portion of these products are variable – meaning that I am consolidating them by allowing multiple values in the product reference
  • When I was in Drupal core version 7.19 I was able to see all 80 product references to select from when creating display nodes
  • Now that I am in Drupal core version 7.2 the list of available product references cuts off after 50 items
  • So for example if I delete product #1 then product #51 becomes visible – and it doesn’t seem to matter how many different product and related content types exist
  • However if I create the products via a feed they still create just fine with all the relevant information
  • I can see a work-around by fiddling with the sequence of the products listed in my .csv so that the “individual” products come after the 50 item cut off, but it seems less than perfect
  • As I understand it Commerce the product reference is related to the entity module, so does that mean that there is some way that I can increase the threshold of 50? I don’t see anywhere in the entity module where I can configure this.

    Asked by: plasterdog
    on February 25, 2013

    Comments

    Were you able to find a solution to your problem? I am contemplating a downgrade to resolve the issue.

    I am experiencing the same issue since running updates on a website I am developing. I used to be able to reference 1400+ products in a select box widget using a product reference field however now I am limited to only 50.

    Any assistance would be greatly appreciated!

    - Dustin Harrell on March 8, 2013

    If not otherwise you can hack the code (*it is so rude, don't do that*) in /sites/all/modules/commerce/modules/product/commerce_product.module #789.line there is a variable $limit = 50,

    I hope will comes a better sollution for this soon.

    - Benwick on March 21, 2013

    2 Answers

    Vote up!
    1
    Vote down!

    There appears to be a patch that made it into Drupal Commerce 1.5 that maxes out product references at 50. Downgrade and wait for Commerce 1.6 that will have this functionality.

    Fix in the queue: http://drupal.org/node/1925222

    Josh

    Josh Miller
    Answer by: Josh Miller
    Posted: Mar 22, 2013
    Vote up!
    1
    Vote down!

    There is a limit to the widget that references products with commas. There is no physical limit to the number of variations that can be referenced in the database, but keep in mind with each variation that is attached to a product display, there is a performance hit. You might want to consider how you are building your site.

    Josh Miller
    Answer by: Josh Miller
    Posted: Mar 11, 2013

    Comments

    Could you suggest what a reasonable limit could be. I'm working on a store where I moved fabrics to the line item to remove them as variations but on some product displays I still have 300 variations. I was looking at having possible thousands of variations if I left fabrics on the product but thought that would be way to many products in the database; possible hundreds of thousands for 100 product displays with various options.

    I am considering moving all options to the line item and just having 1 variation, but all those options generate a unique SKU that I need.

    Any thoughts. Thanks.

    - erichomanchuk on March 19, 2013