Answers.Body: <p>Are you sure you're not simply hitting the default limit which is 100?</p>
  
  <p>Try this</p>
  
  <pre><code>{% set entryIds = craft.commerce.products({limit: null}).ids() %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-22T16:05:49.497Z
Answers.Text: yup that did it !
Answers.UserDisplayName: celeste.nexus
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-22T12:36:24.060Z
Answers.LastActivityDate: 2017-06-22T12:36:24.060Z
Answers.UserDisplayName: Jamie Pittock
Body: <p>I'm using the following code on a category listing page to list the sub-categories that contain products:</p>
  
  <pre><code>{% set entryIds = craft.commerce.products.ids() %}
  {% if category is defined %}
      {% set currentCategory = craft.request.getSegment(2) %}
      {% set categories = craft.categories.descendantOf(category).relatedTo({ sourceElement: entryIds }).groupId(1).order('title asc').find() %}
  {% else %}
      {% set categories = craft.categories.relatedTo({ sourceElement: entryIds }).groupId(1).level(1).order('title asc').find() %}
  {% endif %}
  </code></pre>
  
  <p>What I'm experiencing is that craft.commerce.products.ids() only returns the ids for products that have a Post Date in the current month. This is not ideal since some products might've been added months ago but still remain active on the site. </p>
  
  <p>Is this normal behaviour for craft.commerce.products.ids() or is this a possible bug ? Any ideas on a workaround ? </p>
  
Tags: <plugin-craftcommerce><categories>
Title: craft.commerce.products.ids() possible bug?
ThreadText: # craft.commerce.products.ids() possible bug?
  
  (Asked by: username_0 on 2017-06-22)
  
  I'm using the following code on a category listing page to list the sub-categories that contain products:
  
  ```
  {% set entryIds = craft.commerce.products.ids() %}
  {% if category is defined %}
      {% set currentCategory = craft.request.getSegment(2) %}
      {% set categories = craft.categories.descendantOf(category).relatedTo({ sourceElement: entryIds }).groupId(1).order('title asc').find() %}
  {% else %}
      {% set categories = craft.categories.relatedTo({ sourceElement: entryIds }).groupId(1).level(1).order('title asc').find() %}
  {% endif %}
  
  ```
  
  What I'm experiencing is that craft.commerce.products.ids() only returns the ids for products that have a Post Date in the current month. This is not ideal since some products might've been added months ago but still remain active on the site.
  
  Is this normal behaviour for craft.commerce.products.ids() or is this a possible bug ? Any ideas on a workaround ?
  
  **Tags:** plugin-craftcommerce, categories
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-06-22. Score: 3 | Accepted answer
  
  Are you sure you're not simply hitting the default limit which is 100?
  
  Try this
  
  ```
  {% set entryIds = craft.commerce.products({limit: null}).ids() %}
  
  ```
  
  > **Comments:**
  > **username_0**: yup that did it !  
  
  ---
  
  