Fluorescent
Lorenza
Lorenza
  • Lorenza Help Center
    • Start using Lorenza
      • Migrate your theme
      • Theme licenses
    • FAQs
    • Theme updates
      • Upgrade to OS2
    • Changelog
  • General
    • Editing themes
      • Adding sections
      • Using templates
      • Accessibility
      • Customizing your site
      • H1 heading tags
      • SEO for Shopify themes
      • Online store speed
    • Image guide
      • Web ready photography
      • Image sizes
      • File formats
      • Theme image settings
    • Adapting theme content
      • Edit default theme content
      • Multiple languages
      • Dynamic content with metafields
      • Unique content for markets
  • Theme styles
    • Theme settings
    • Style presets
    • Fonts
    • Colors
    • Animation
    • Buttons
  • Pages
    • Templates
      • Home page
      • About page
      • Blogs page
      • Blog posts template
      • Collections list page
      • Contact page
      • Password page
      • Search page
      • 404 page
    • Header
      • Logo
      • Layout and style
      • Mega navigation
      • Transparent header
      • Quick search
      • Customer account link
    • Footer
      • Links block
      • Newsletter block
      • Text and image block
      • Language selector
      • Country selector
      • Payment icons
      • Social media icons
    • Utility bar
      • Announcements
  • Sections
    • Theme sections
      • Blog posts
      • Collapsible row list
      • Collection list
      • Collection list grid
      • Featured collection
      • Featured collection grid
      • Featured collection row
      • Featured product
      • Gallery
      • Image hero
      • Image with text
      • Image with text split
      • Map
      • Mosaic grid (2 columns)
      • Mosaic grid (3 columns)
      • Newsletter
      • Quotes
      • Rich text
      • Shoppable feature
      • Shoppable image
      • Slideshow
      • Slideshow split
      • Testimonials
      • Text columns with images
      • Video
      • Video hero
    • Popups
  • Products
    • Product listings
    • Product badges
    • Quick shop
  • Product pages
    • Product template
      • Pre-order template
    • Layout and style
      • Breadcrumbs
      • Navigation buttons
      • Media gallery
      • Gift recipient form
    • Product page blocks
      • Default blocks
        • Title
        • Price
        • Description
        • Variant selector
        • Quantity selector
        • Buy buttons
        • Local pickup banner
        • Share icons
      • Accordion block
      • Complementary products
      • Information popup
      • Payment block
      • Security block
      • Shipping block
      • Stock level indicator
      • Text block
      • Text with image
      • Text with video
      • App blocks
    • Product page sections
      • Product reviews
      • Recently viewed products
      • Recommended products
    • Variant options
      • Variant chips
      • Variant swatches
        • Enable swatches
        • Use default colors
        • Use custom images
        • Dynamic option availability
        • Show on collections
  • Collection pages
    • Collection template
    • Banner
      • Breadcrumbs
    • Product grid
    • Filters and sorting
  • Cart
    • Cart page
    • Fly-out cart
  • Support
    • Support policy
    • Shopify vs Theme issues
    • Store access requests
  • For developers
    • Custom CSS
    • Custom fonts
    • Custom Liquid
    • Custom JavaScript events
    • Edit Theme JavaScript
Powered by GitBook
On this page

Was this helpful?

  1. For developers

Edit Theme JavaScript

Advanced

Last updated 1 year ago

Was this helpful?

We do not support code customizations. This guide offers a basic reference for developers. Always test code changes on a duplicated, unpublished version of your theme. For assistance, we recommend finding a professional developer through or .

If you want to modify only a few components and retain code splitting, consider using Lorenza's standalone file for .

Lorenza includes a single, editable JavaScript file (assets/theme.js) for custom development that can be enabled in the snippets/theme-globals.liquid file.

Switching to the unminified theme.js disables code splitting, which bundles the theme JavaScript into multiple files used for lazy-loading and improved site performance. We do not recommend editing these files directly.

Switch to theme.js

The theme.js file, when enabled, lets you edit a single JavaScript file, instead of many files, and includes comments from our developers to help you along.

STEPS

Open the theme-globals.liquid file in the Snippets folder.

  1. Find the useUnminThemeJS variable and set it to true

```json

{% assign useUnminThemeJS = false %}


```

2. You can now begin editing the **`theme.js`** file in the **Assets** folder.

> We highly recommend backing up your theme and documenting any additions for troubleshooting and theme updates, which require manually transferring the code.

How's Lorenza working for you?

We built Lorenza with developers in mind. We're looking to create relationships with third-party developers using our themes and want to hear from you about what you're building. Please feel free to reach out with questions or introduce yourself by e-mailing us at


Related links

Shopify Experts ↗
Task Husky ↗
custom JavaScript events
developers@fluorescent.co
Custom JavaScript events
Custom Liquid
Custom CSS
Custom fonts