<?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>Search Results Template and default image URL</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121376488" />
  <subtitle>Search Results Template and default image URL</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121376488</id>
  <updated>2026-04-06T14:41:21Z</updated>
  <dc:date>2026-04-06T14:41:21Z</dc:date>
  <entry>
    <title>Search Results Template and default image URL</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121376487" />
    <author>
      <name>Gennaro Lippiello</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121376487</id>
    <updated>2022-03-11T17:05:31Z</updated>
    <published>2022-03-10T12:05:14Z</published>
    <summary type="html">&lt;p&gt;Hello everyone,&lt;/p&gt;
&lt;p&gt;I'm creating a Widget Template (Search Results Template). &lt;/p&gt;
&lt;p&gt;I'm working with CPCatalogEntry class and I'm wondering how can I get
  the url of default image. Unfortunately the
  method CPCatalogEntry.&lt;strong&gt;getDefaultImageFileUrl() &lt;/strong&gt;doesn't
  work in my Liferay version (Liferay Community Edition Portal 7.4.3.13
  CE GA13)&lt;/p&gt;
&lt;p&gt;
  &lt;u&gt;
    &lt;strong&gt;UPDATE&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;
&lt;p&gt;I was able to get the URL in this way:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;&amp;lt;#assign CPDefinitionLocalService = serviceLocator.findService(&amp;quot;com.liferay.commerce.product.service.CPDefinitionLocalService&amp;quot;)
			CPAttachmentFileEntry = CPDefinitionLocalService.getDefaultImageCPAttachmentFileEntry(curCPCatalogEntry.getCPDefinitionId())
			FileEntry = CPAttachmentFileEntry.fetchFileEntry()
			DLUtil = staticUtil[&amp;quot;com.liferay.document.library.kernel.util.DLUtil&amp;quot;]
			imageURl = DLUtil.getPreviewURL(FileEntry, FileEntry.getFileVersion(), themeDisplay, &amp;quot;&amp;quot;)
/&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now I have another problem, how can I get the list of specification
  of a product?&lt;/p&gt;</summary>
    <dc:creator>Gennaro Lippiello</dc:creator>
    <dc:date>2022-03-10T12:05:14Z</dc:date>
  </entry>
</feed>
