Featured Category

The Featured Category extension lets you highlight a commerce category on your website. This extension allows you to customize your featured category’s appearance and behavior. You can choose how many items you want to show and add a button to link to the category page. For each item highlighted in the featured category section, you can display the product image, name, and price. Clicking on an item takes users to the product detail page (PDP) for more information and purchasing options.

To use this extension, you must enable Commerce Categories for your Commerce web stores and create at least one category. To set up a commerce category, see Commerce Categories.

Important:

Commerce extensions are only available if provisioned, installed, and activated for a selected domain in your account. For more information, see Commerce Extensions.

Note:

Extensions require SuiteCommerce or the Aconcagua release of SCA or later.

Use Site Management Tools (SMT) to add, configure, or delete a featured category on multiple areas of your website. Adding this content type to enhanced or custom landing pages allows you to promote a category in the place and style you want. For more information about Site Management Tools, see Site Management Tools Overview.

This topic explains how to:

Add a Featured Category

To add a featured category to your web store, add the Featured Category content type to a page of your site using SMT.

To add a featured category:

  1. In your website, go to the page where you want to add a featured category.

  2. Log in to SMT.

    For more information about logging in to SMT, see Users and Roles in SMT.

  3. In Edit mode, click Add on the Site Management toolbar.

  4. Drag the Featured Category content type to the page.

    Note:

    If you do not see this content type, ensure that the extension has been installed and is active. Click Settings on the Site Management toolbar to access the Content Manager. Drag the content type from the Inactive Content Types list to the Active Content Type list.

    You can drag a Featured Category content type to multiple areas on the page.

    For more information about the scopes of different SMT areas, see Area and Scope.

  5. Configure the settings to best fit your needs.

    See Configure a Featured Category.

Configure a Featured Category

Configure properties to customize your featured category. You can decide how to sort the items, adjust the display options, and choose the header and button texts.

The following procedures explain how to:

  • Configure general settings

  • Configure layout and style settings

To configure general settings:

  1. While logged in to SMT on your website, go to the page that contains the featured category.

  2. In the Featured Category box, click Edit.

    This displays the Featured Category Settings in the side panel.

  3. In the General tab, set the following fields:

    Field

    Description

    Name

    Sets the name for the featured category banner.

    Visibility

    Determines the visibility option that determines when you want to make the featured category visible.

    For more information about visibility options, see Visibility Dates.

    Category

    Select the commerce category you want to feature with this content type.

    Item Sorting

    Determines the sorting option for the featured products.

    You can only use the best sellers sorting options if you have installed SC Best Sellers. For more information, see Best Sellers.

    Show Item Names

    If checked, displays the item name with the item picture in the featured category section.

    Show Item Prices

    If checked, displays the item price with the item picture in the featured category section.

    Tags

    Sets keywords to help filter your content in the Review Changes list.

    For more information about content tags, see Content Tags and Filter Tools.

  4. Click Save.

To configure layout and style settings:

  1. While logged in to SMT on your website, go to the page that contains the featured category.

  2. In the Featured Category box, click Edit.

    This displays the Featured Category Settings in the side panel.

  3. In the Layout & Style tab, set the following fields:

    Field

    Description

    Header

    Sets the title for the featured category section.

    Basic HTML formatting tags are supported.

    Header Alignment

    Determines how you want to position the header in the featured category section.

    Link Header

    If checked, links the header to a commerce category or a custom URL.

    You can list the custom URL in the Custom Category URL field.

    Category Button Text

    Sets the button text.

    This button redirects shoppers to the commerce category page. If you leave this field blank, the button does not appear.

    Category Button Style

    Sets the button style.

    The button style definition is taken from your theme.

    Custom Category URL

    Determines the custom URL (relative or absolute) to which you want the header and button to link.

    If you leave this field blank, the header and category button direct users to the linked commerce category page (determined by the Category ID field in the General tab).

    For the header to link to this custom URL, check the Link Header box.

    For the button to link to this custom URL, enter a label in the Category Button Text field.

    Number Of Items - Mobile

    Determines how many items you want to display on mobile devices.

    Number Of Columns - Mobile

    Determines how many columns you want to use to display items on mobile devices.

    Number Of Items - Tablet & Desktop

    Determines how many items you want to display on tablet and desktop devices.

    Number Of Columns - Tablet & Desktop

    Determines how many columns you want to use to display items on tablet and desktop devices.

  4. Click Save.

Remove a Featured Category

Depending on whether you have published the content to your website, use SMT to delete the featured category content type from your site in one of two ways:

  • Discard the featured category if you have not published the content.

  • Remove the featured category if you have already published the content.

To discard a featured category (Unpublished Content):

  1. While logged in to SMT on your website, select the Review & Publish Changes list from the Site Management toolbar.

  2. Select the Featured Category content in the list.

  3. Click Discard.

  4. Click OK.

To remove a featured category (Published Content):

  1. While logged in to SMT on your website, go to the page that contains the featured category content you want to remove.

  2. In Edit mode, click the Featured Category box.

    This highlights the featured category content and displays the content controls.

  3. Click Remove.

  4. Click OK.

Use a Custom Field Set

To optimize your website performance, you can create a custom field set using only the fields required by the extension and choose this field set to be used with Featured Category.

You can create a custom field set by running a script. Then you can select this field set on the SuiteCommerce Configuration record.

Important:

If you do not select a custom field set to be used, the extension defaults to using the search field set.

The minimum fields required by the Featured Category extension are:

Field ID

Field Name

storedisplayname2

Store Display Name 2

displayname

Display Name

itemid

Name

internalid

Internal ID

itemimages_detail

Item Images (Detail)

matrixchilditems_detail

Matrix Child Items (Detail)

pricelevel1_formatted

Base Price (Formatted)

onlinecustomerprice_detail

Price for Current Customer (Detail)

urlcomponent

URL Component

To use a custom field set:

  1. Create a custom field set

  2. Select the custom field set

Create a custom field set

Using the code sample included in this section, create a custom field set using the required fields.

To create a custom field set:

  1. Copy the contents of the Field Set Script below to a text editor.

  2. Edit the siteID variable with the site ID you want to use.

    The site ID is displayed in the URL when you navigate to the Web Site Setup page for the desired site.

    Note:

    The default value of 9999 fails, since no site is ever assigned an ID of 9999.

  3. Optional: Edit the fieldsetId and fieldsetName variables with the field set ID and field set name you want to use.

  4. Execute the script in the SuiteScript debugger:

    1. Go to Customization > Scripting > Script Debugger.

    2. Enter the SuiteScript Debugger domain (by clicking the link as indicated) and then re-enter your login credentials if prompted.

    3. From the API Version dropdown, select 1.0.

      Important: This script can only be run against SuiteScript Version 1.0.

    4. Copy and paste your modified script code into the debugger.

    5. Click Debug Script and then hit the Continue button.

    After the script has executed, field sets are properly populated and can be verified in the Field Sets tab of the Web Site Setup record.

Field Set Script

              var siteID = 99999 // change to the site ID you want to use
,   fieldsetName = 'Featured Category Extension Field Set' // change to the field set name you want to use
,   fieldsetId = 'featuredcategory_fieldset' // change to the field set ID you want to use
,   siteRecord = nlapiLoadRecord('website', siteID);
  
siteRecord.selectNewLineItem('fieldset');
siteRecord.setCurrentLineItemValue('fieldset', 'fieldsetname', fieldsetName);
siteRecord.setCurrentLineItemValue('fieldset', 'fieldsetid', fieldsetId);
siteRecord.setCurrentLineItemValue('fieldset', 'fieldsetrecordtype', 'ITEM');
var fields =
'storedisplayname2,displayname,itemid,internalid,itemimages_detail,matrixchilditems_detail,pricelevel1_formatted,onlinecustomerprice_detail,urlcomponent';
  
siteRecord.setCurrentLineItemValue('fieldset', 'fieldsetfields', fields);
siteRecord.commitLineItem('fieldset');
  
recId = nlapiSubmitRecord(siteRecord); 

            

Select the custom field set

After creating the custom field set, you can select this field set to be used with the Featured Category extension.

To select the field set:

  1. After creating the custom field set, go to Commerce > Websites > Configuration.

  2. Select the website and domain where the Featured Category extension is activated and click Configure.

  3. Go to the Extensions tab, Featured Product subtab.

  4. In the Field Set ID field, select the custom field set you created in the previous step.

    If no field set is selected, the extension will continue using the search field set.

  5. Click Save.

Related Topics

General Notices