ATG 10 Merchandising – Customizing the Browse View

Author
  • Eric Woods

If you’re using Merchandising to manage the content of your ATG Commerce site, and you’re running release 10 or later, one thing you’ll certainly want to be able to do is use Merchandising’s new Flex UI to browse and manage the assets for your custom Repositories and Repository Items.  The only problem is that you won’t find this documented anywhere, as ATG seems to have somewhat fallen behind in updating their documentation for Merchandising since release 10.  After some digging around in the config directory of the DCS-UI module, I was able to find the configuration files used for accomplishing just such a task.

The image below shows the default browsing view in Merchandising.  What you see are starting points for browsing assets for standard, out of the box Commerce Repositories and Repository items.

But let’s say that your company has a custom repository named “FooRepository”, with the following definition file:

[sourcecode language="xml"]

 

Foo Repository

 

 

 

 

 

[/sourcecode]

How do you get FooRepository to show up within the Merchandising view?

The browse view is configured with an XML file located in the config layer at: /atg/remote/commerce/browse/MerchandisingBrowseHierarchy.xml

You’ll want to create your own MerchandisingBrowseHierarchy.xml file and place it in the same config location within your custom ATG module.

The contents might look something like this:

[sourcecode language="xml"]

 



label=”Foo Repository”
is-root=”true”
icon-resource=”node.catalogs.iconSmall”
multisite=”disabled”>


label=”Foo Item”
is-root=”true”
icon-resource=”node.catalogs.iconSmall”
multisite=”disabled”>

retriever=”query”
child-type=”/atg/foo/FooRepository:fooItem”>
value=”ALL” />


label=”Foo Too Item”
is-root=”true”
icon-resource=”node.catalogs.iconSmall”
multisite=”disabled”>

retriever=”query”
child-type=”/atg/foo/FooRepository:fooTooItem”>
value=”ALL” />

 

[/sourcecode]

The top level of the Merchandising browse view is named “home”.  We provide the home browse item with a reference to the browse item that defines the next level of the browsing view, and for which we’ve given an id of “myFooRepository”.  This allows us to access Foo Repository from Home as seen below.

When you click on “Catalogs”, it takes you to a screen that lists categories, which drill into products.   Similarly, for the Foo Repository view, we can create another layer of navigation that allows us to split out repository items by type. In the XML above, you can see that the browse item “myFooRepository” contains references to two other browse items – “myFooItem” and “myFooTooItem” – each of which defines the type of Repository Item to list using the “child-type” attribute.

This allows us to drill into the Foo Repository node and see the following:

You can then click into each of these views to display the list of Repository Items as configured for each browse item in MerchandisingBrowseHierarchy.xml.