Sass Entry Points for Theme Customization in SuiteCommerce

Sass entry points define how to load styles for Shopping, MyAccount, and Checkout in SuiteCommerce themes.

·2 min read·View Oracle Docs

TL;DR Opening

Sass entry points are essential for integrating styles into SuiteCommerce applications, including Shopping, MyAccount, and Checkout. Each theme has specific entry points, ensuring the correct styles load for different parts of the application.

Understanding Sass Entry Points

Every theme in SuiteCommerce relies on a designated entry point file to load the Sass stylesheets necessary for specific applications. These entry points declare which Sass files are applicable based on the needs of each application. For instance, a file that is relevant only to the shopping application must load via the shopping.scss entry point, while styles applicable to all three applications should be referenced in each respective entry point.

Key Entry Points by Application

Below are the core entry points utilized in SuiteCommerce themes:

ApplicationApplication Sass File
ShoppingModules/Shopping/shopping.scss
MyAccountModules/MyAccount/myaccount.scss
CheckoutModules/Checkout/checkout.scss

It's crucial that all Sass files referenced in these entry points are also declared in the theme's manifest.json file to ensure they are compiled properly.

Important Considerations

When customizing a theme, particularly when adding new Sass files, make sure to format changes correctly within the manifest.json. This file must include paths to all HTML templates, Sass, and assets for seamless incorporation into the active theme.

Incorporating New Files into the Manifest

  1. Create your new Sass file and place it into the appropriate directory as specified. For Sass files, use:

    Workspace/<THEME_DIRECTORY>/Modules/BaseSassStyles/Sass/reference-theme/_newSass.scss

  2. Open the manifest.json file located at:

    Workspace/<THEME_DIRECTORY>/manifest.json

  3. Add your file in the relevant files array under the appropriate application header in the manifest structure.

Note: Proper naming conventions are vital to avoid conflicts within your theme's file hierarchy. Always check for existing file names to prevent issues.

Conclusion

By managing Sass entry points effectively within your theme, you ensure that styles are applied correctly across various applications, creating a seamless experience for end-users. This practice not only enhances functionality but also aligns with best practices for maintaining robust theme customizations in SuiteCommerce.

Key Takeaways

  • Each application has specific Sass entry point files.
  • All Sass files must be included in the manifest.json to compile correctly.
  • Proper folder structure and naming help avoid conflicts.

Source: This article is based on Oracle's official NetSuite documentation.

Frequently Asked Questions (4)

How do Sass entry points differ between Shopping, MyAccount, and Checkout in SuiteCommerce?
Each application in SuiteCommerce has a designated Sass entry point file: 'shopping.scss' for Shopping, 'myaccount.scss' for MyAccount, and 'checkout.scss' for Checkout. These files ensure that the correct styles are loaded specific to each part of the application.
What is the role of the manifest.json file in managing Sass files for SuiteCommerce themes?
The manifest.json file in a SuiteCommerce theme must include paths to all HTML templates, Sass files, and assets. This ensures that newly added or modified Sass files are compiled correctly and integrated into the active theme.
Do I need to include my new Sass files in any specific location for them to be recognized in SuiteCommerce themes?
Yes, new Sass files should be placed into the appropriate directory such as 'Workspace/<THEME_DIRECTORY>/Modules/BaseSassStyles/Sass/reference-theme'. This organization supports proper recognition and avoids conflicts with existing files.
What should be considered when naming new Sass files for SuiteCommerce themes?
Proper naming conventions are essential to avoid conflicts within the theme's file hierarchy. Always check for existing file names and follow consistent naming patterns to prevent issues.
Source: Sass Entry Points Oracle NetSuite Help Center. This article was generated from official Oracle documentation and enriched with additional context and best practices.

Was this article helpful?

More in Commerce

View all Commerce articles →