Enabling Commerce Products as Related Assets
You can connect products to other assets in Liferay by using the related assets relationship.
Liferay DXP 7.4+ does not support products as related assets.
Configure the Asset Browser to Search the Database
-
Navigate to
[Liferay Home]\osgi\marketplace\
. For more information aboutLiferay Home
folder, see Liferay Home. -
Find the
Liferay Web Experience - Liferay Asset - Impl.lpkg
then open it with an archive manager. -
In the archive manager window, open the
com.liferay.asset.browser.web.jar
. -
Using a text editor, open the
portlet.properties
file. -
Set
search.with.database=true
and update the jar. -
Restart the application server.
Performing a search reindex may be necessary for products to appear as a related asset option when editing content.
Execute a Reindex
Execute a reindex to populate the related assets in the filter.
-
Open the Global Menu () and navigate to Control Panel → Search.
-
Click Reindex next to All Search Indexes.
Verify the Availability of Products
Products are available on all Liferay sites by default, so you must change the Filter to Global.
-
Open the Site Menu () and go to Content → Web Content.
-
Click () icon → Basic Web Content.
-
Scroll down to the Related Assets section.
-
Click Select.
-
Click Commerce Product.
-
Click Filter and Order then Global.
-
Click the product.
Products are now available as related assets.