Best Practices for Customizing Themes in SuiteCommerce
Implement best practices for customizing themes in SuiteCommerce to ensure optimal performance and maintainability.
The following list provides essential best practices to consider when customizing themes for Commerce websites:
- Theme Customization: Use themes to customize HTML templates and Sass for your site effectively.
- Creating Custom Themes: If you are using a published theme as a baseline, the developer tools will force you to create a new theme to consolidate your changes as a custom theme.
- Folder Structure: Stick with the existing folder structure created when you downloaded themes and extensions to your Workspace directory. Add any new subdirectories cautiously; ensure their paths are included in the theme manifest along with all required entry points.
- Testing Changes: Use a development domain to thoroughly test your changes before applying updates to your production domain.
- Workspace/Extras Directory: Avoid moving, deleting, or editing files located in your
Workspace/Extrasdirectory as they are for reference and overrides only. - Customizing Active Extensions: When you fetch a theme, you will retrieve the HTML and Sass files for any active extensions. Customize these files to suit your theme using the override method.
- Asset Management: Place any new assets (images or fonts) in the appropriate location within the theme's assets directory. Utilize helpers when referencing assets within your HTML or Sass customizations to manage paths correctly.
- Template Context: Always follow the template context when editing HTML template files or creating overrides to ensure consistency.
- File Naming: To avoid file name collisions, do not create new files or folders with the same name, even if located in different areas, except when working on extension overrides.
- Limit Files and Folders: Limit the number of files and folders at the same directory level to 100. Consider distributing images across multiple folders and housing custom modules in a separate top-level directory.
Related Topics
- Best Practices for Creating Themes
- HTML Best Practices for Themes
- Sass Best Practices for Themes
- Managing Theme Assets
Key Takeaways:
- Use development domains for testing changes.
- Maintain proper folder structures.
- Ensure asset paths are dynamically managed using helpers.
- Follow best practices for naming to avoid conflicts.
- Limit the number of files at any one level.
Frequently Asked Questions (4)
How should I handle the folder structure when customizing a theme in SuiteCommerce?
What is the recommended approach for testing theme changes before applying them to a production site?
Is it possible to create new files or folders with the same name in different directories when customizing themes?
What should I do with new assets like images or fonts in a customized theme?
Was this article helpful?
More in Commerce
- SuiteCommerce CAPTCHA Configuration Options and Setup
Configure SuiteCommerce CAPTCHA for enhanced security. Enable CAPTCHA for registration, login, guest checkout, and orders.
- Single Sign-On Integration for NetSuite Web Stores
Implement inbound single sign-on integration for NetSuite web stores using SAML or OpenID Connect for seamless access.
- Facets Management for Commerce in NetSuite
Facets management in NetSuite Commerce optimizes item search filters, enhancing performance and improving user experience.
- SuiteCommerce Analytics Data and Cookie Consent Integration
SuiteCommerce Analytics Data enables tracking of shopper behavior. This requires a cookie consent extension for user preferences.
Advertising
Reach Commerce Professionals
Put your product in front of NetSuite experts who work with Commerce every day.
Sponsor This Category