SC Featured Category extension

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. 

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. 

Install bundle of SC Featured Category 

  • Navigate to Customization > SuiteBundler > Search and Install bundles. 
  • Search and install the bundle SC Featured Category. 

Activate extension Featured Category 

On extension manager activated the extension. 

Create a custom field set 

  • Copy the contents of the Field Set Script below to a text editor. 
  • 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. 

  • Optional: Edit the fieldsetId and fieldsetName variables with the field set ID and field set name you want to use. 
  • Execute the script in the SuiteScript debugger: 
  1. Go to Customization > Scripting > Script Debugger. 
  1. Enter the SuiteScript Debugger domain (by clicking the link as indicated) and then re-enter your login credentials if prompted. 
  1. From the API Version dropdown, select 1.0. 
  1. Important: This script can only be run against SuiteScript Version 1.0
  1. Copy and paste your modified script code into the debugger. 
  1. Click Debug Script and then hit the Continue button. 
  1. 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. 
    Script to add: 
    var siteID = 99999 // change to the site ID you want to use 
    ,   fieldsetName = ‘Featured Product Extension Field Set’ // change to the field set name you want to use 
    ,   fieldsetId = ‘featuredproduct_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 = ‘itemimages_detail,itemoptions_detail,internalid,matrixchilditems_detail,onlinecustomerprice_detail,quantityavailable,displayname,itemid,storedetaileddescription,storedisplayname2,isinstock’; 
    siteRecord.setCurrentLineItemValue(‘fieldset’, ‘fieldsetfields’, fields); 
    siteRecord.commitLineItem(‘fieldset’); 
    recId = nlapiSubmitRecord(siteRecord); 

 
Afteradded the field set it can seen in website setup,manually can add in fieldset also. 

Added the fieldset id in configuration record: 

We can place this category section any where in any page. For this a category is needed. 

Below screenshots are to setup in SMT. 

The content section needed to drag where it is needed. 

Then on edit we need to set below as per need 

Then we can see it in the area after publish 

On click of View list it will show the given page. 

Leave a comment

Your email address will not be published. Required fields are marked *