<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Sorting product by availability</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121394517" />
  <subtitle>Sorting product by availability</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121394517</id>
  <updated>2026-04-04T13:31:52Z</updated>
  <dc:date>2026-04-04T13:31:52Z</dc:date>
  <entry>
    <title>RE: RE: Sorting product by availability</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121395449" />
    <author>
      <name>Russell Bohl</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121395449</id>
    <updated>2022-04-08T14:22:04Z</updated>
    <published>2022-04-08T14:22:04Z</published>
    <summary type="html">&lt;p&gt;So I added a couple of products, and I don't see that they have
  quantity, or availability, or any similar fields indexed in the
  returned document. You can see this if you enable &amp;quot;Show Results
  in Document Form&amp;quot; in the Search Results widget.&lt;/p&gt;</summary>
    <dc:creator>Russell Bohl</dc:creator>
    <dc:date>2022-04-08T14:22:04Z</dc:date>
  </entry>
  <entry>
    <title>RE: RE: Sorting product by availability</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121395343" />
    <author>
      <name>Gennaro Lippiello</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121395343</id>
    <updated>2022-04-08T08:20:53Z</updated>
    <published>2022-04-08T08:20:52Z</published>
    <summary type="html">&lt;p&gt;Hi Russell, yes I saw that and already tried to find some fields.
  Actually I found 2 of them that I thought may work (itemsQuantity and
  quantity). But when I use them to sort my list all the products disappears.&lt;/p&gt;
&lt;p&gt;I also tried the Commerce &amp;gt; Sort widget, but it seems not configurable.&lt;/p&gt;</summary>
    <dc:creator>Gennaro Lippiello</dc:creator>
    <dc:date>2022-04-08T08:20:52Z</dc:date>
  </entry>
  <entry>
    <title>RE: Sorting product by availability</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121394784" />
    <author>
      <name>Russell Bohl</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121394784</id>
    <updated>2022-04-07T14:12:58Z</updated>
    <published>2022-04-07T14:12:58Z</published>
    <summary type="html">&lt;p&gt;Hi Gennaro, I haven't worked with Commerce very much, but you can try
  to &lt;a
    href="https://learn.liferay.com/dxp/latest/en/using-search/search-pages-and-widgets/search-results/sorting-search-results.html#finding-sortable-fields"&gt;find
    sortbale fields&lt;/a&gt; and add the Sort to the Search &amp;gt; Sort widget.
  So, is &amp;quot;availability&amp;quot; an indexed field? If it is, and if its
  data type is sortable (see the linked documentation), you can add a
  sort option (see the same linked documentation).&lt;/p&gt;
&lt;p&gt;But there's also a Commerce &amp;gt; Sort widget. I don't know anything
  about it, but maybe it supports your use case.&lt;/p&gt;</summary>
    <dc:creator>Russell Bohl</dc:creator>
    <dc:date>2022-04-07T14:12:58Z</dc:date>
  </entry>
  <entry>
    <title>Sorting product by availability</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121394516" />
    <author>
      <name>Gennaro Lippiello</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121394516</id>
    <updated>2022-04-07T08:56:37Z</updated>
    <published>2022-04-07T08:56:36Z</published>
    <summary type="html">&lt;p&gt;Hi all, is there a way to sort products by availability in a search
  result widget using the sort widget?&lt;/p&gt;</summary>
    <dc:creator>Gennaro Lippiello</dc:creator>
    <dc:date>2022-04-07T08:56:36Z</dc:date>
  </entry>
</feed>
