Hi,

I am having getting only active and ALL products displayed in a product reference field. Bit of a disaster because I can't display all products at the moment and the site is offline!!

I have two product variation types which are basically the same:

  • Membership Application
  • Membership Renewal

I have disabled all old product variations which used the product variation types.

Each of the product variation types has three option such as domicile (UK, overseas), duration (1 year, 10 years) and with/without a badge. So for each product variation type there will be 6 products variations.

I have then bulk created product variation for the application and renewal variation types.

I have a single content type "Subscription". This has a product reference field which is limited to show product variation types "Membership application" & "Membership renewal".

I have two content nodes: "Membership Application" and "Membership Renewal".

BUT
The product reference field for the membership application and renewal nodes shows 2 disabled products for the membership application and only 4 application product variations. For the renewal product variation, it only shows 2 disabled renewal product variations.

So.... PANIC because I can't display all my products.

I have cleared the Cache many times and also run Cron.

If I set the product reference field in the subscription content type to ONLY display membership applications, all 6 application product variations are shown along with 2 disabled application product variations.

If I set the product reference field in the subscription content type to ONLY display membership REWNEWALS, all 6 application product variations for renewals are shown along with 2 disabled renewal product variations.

I have tried to replace the product reference field with a new one but this makes no difference.

If I uncheck the variation types to show in the product reference field, only MAX 10 products are shown. But this is a real mix and provides nothing useful. Somehow I have the feel that the number of products which are offered is limited to 10.

The field setting is unlimited.

Please help! I'm stuck!!

Thanks
Rich

Comments

Anonymous’s picture

richH created an issue. See original summary.

Anonymous’s picture

Hi,

I've browsed through the code and have found a limit which is set to 10 in the file sites/all/modules/commerce/modules/product_reference/commerce_product_reference.module at line 1048

/**
 * Implements hook_options_list().
 */
function commerce_product_reference_options_list($field, $instance = NULL) {
  $options = array();

  // Look for an options list limit in the field settings.
  if (!empty($field['settings']['options_list_limit'])) {
    $limit = (int) $field['settings']['options_list_limit'];
  }
  else {
    $limit = 10;
  }
...
...

If I change this to 100 I can see all my products.

Can anyone explain why there is a limit set and why this limit is set to 10?

Is there a decent fix to allow "unlimited" options as set in the content type field settings?

thanks
Rich

tomdisher’s picture

Hi Rich

We ran into the same issue before, and it was baffling!

The simplest solution would be to just use a different widget. We're using the autocomplete widget, which does not have a limit on it.

Hope this helps!
Tom

Anonymous’s picture

Category: Support request » Bug report
Anonymous’s picture

Hi,

thanks for the tip. I really hope one of the maintainers can have a look at this shortly and propose a solution.

Rich

rszrama’s picture

Priority: Critical » Normal
Status: Active » Closed (duplicate)

Edit the field and change the limit to 10000 or something similar.

Anonymous’s picture

Hi,

well of course I've done that but what is required is a proper update. If this is a duplicate of an issue that is going to be fixed, that it's fine closing it, but for people finding this in the future and also me, it would be useful to have a link to the duplicate issue so that there is some traceability to the solution.

As always though, thanks for all the hard work.
Rich

rszrama’s picture

It's a duplicate, I just didn't have time to pull it up. Sorry. For anyone looking, search options limit.