Editor - File Management
The O2VEND Theme Editor provides comprehensive file management capabilities. This guide covers browsing, editing, creating, and managing theme files.
File Explorer
The file explorer displays the complete theme structure:
theme-name/
├── layout/
│ └── theme.liquid
├── templates/
│ ├── index.liquid
│ ├── product.liquid
│ └── ...
├── sections/
│ ├── header.liquid
│ └── ...
├── snippets/
│ ├── product-card.liquid
│ └── ...
├── assets/
│ ├── theme.css
│ ├── theme.js
│ └── ...
└── config/
├── settings_schema.json
└── settings_data.json
Browsing Files
Navigation
- Click folders to expand/collapse
- Click files to open in editor
- Use search to find files quickly
- Filter by file type
File Types
The editor supports:
- Liquid Templates (
.liquid) - Theme templates - CSS (
.css) - Stylesheets - JavaScript (
.js) - Scripts - JSON (
.json) - Configuration files - Images (
.png,.jpg,.svg) - Image assets - Fonts (
.woff,.woff2) - Font files
Opening Files
Click to Open
- Navigate to file in explorer
- Click file name
- File opens in editor panel
- Start editing
Search Files
- Use search box in file explorer
- Type file name or path
- Click result to open
Editing Files
Code Editor
The editor provides:
- Syntax highlighting
- Code completion
- Line numbers
- Find and replace
- Undo/redo
Making Changes
- Open file in editor
- Make your changes
- Changes are highlighted
- Save when ready
Auto-Save
- Changes are auto-saved periodically
- Manual save available via Save button
- Unsaved changes indicator shown
Creating Files
New File
- Right-click in file explorer
- Select "New File"
- Enter file name with extension
- File created and opened
- Start editing
New Folder
- Right-click in file explorer
- Select "New Folder"
- Enter folder name
- Folder created
File Templates
Some file types have templates:
- New Liquid template → Basic template structure
- New CSS file → Empty stylesheet
- New JavaScript → Module structure
Deleting Files
Delete File
- Right-click on file
- Select "Delete"
- Confirm deletion
- File removed from theme
Delete Folder
- Right-click on folder
- Select "Delete"
- Confirm deletion
- Folder and contents removed
Warning: Deletion is permanent. Use version control to restore if needed.
File Operations
Rename File
- Right-click on file
- Select "Rename"
- Enter new name
- Press Enter to confirm
Duplicate File
- Right-click on file
- Select "Duplicate"
- New file created with "-copy" suffix
- Rename as needed
Move File
- Drag file to new location
- Or cut and paste
- File moved to new folder
File Versioning
View Versions
- Right-click on file
- Select "View Versions"
- See version history
- Compare versions
Restore Version
- Open version history
- Select version to restore
- Click "Restore"
- File restored to selected version
Version Information
Each version shows:
- Timestamp
- Author (if available)
- File size
- Changes summary
File Search
Search in Files
- Use search box
- Enter search term
- Results shown with context
- Click to navigate
Replace in Files
- Open find/replace (Ctrl+F / Cmd+F)
- Enter search term
- Enter replacement
- Replace all or one-by-one
File Validation
Syntax Checking
The editor validates:
- Liquid syntax
- JSON syntax
- CSS syntax
- JavaScript syntax
Error Highlighting
- Errors shown with red underline
- Warnings shown with yellow underline
- Hover for error details
File Permissions
Read-Only Files
Some files may be read-only:
- System files
- Protected files
- Files in use
Edit Permissions
Ensure you have edit permissions:
- Verify tenant repository access
- Verify tenant configuration
- Contact administrator if needed
File Organization
Best Practices
- Logical Structure: Organize files in folders
- Naming Conventions: Use descriptive names
- Group Related Files: Keep related files together
- Remove Unused Files: Clean up unused files
Recommended Structure
theme-name/
layout/ # Layout templates
templates/ # Page templates
sections/ # Page sections
snippets/ # Reusable components
assets/ # CSS, JS, images
css/
js/
images/
config/ # Configuration files
locales/ # Translations
Theme Download and Upload
Download Theme (New - January 2025)
Download the current theme as a ZIP file for backup or sharing.
Download Process
-
Select Theme
- Ensure a theme is selected in the theme selector
- The download includes the currently selected theme
-
Click Download Button
- Click the download icon button in the toolbar (bottom of sidebar)
- Theme is prepared for download
-
Download ZIP File
- Theme is packaged as a ZIP file
- ZIP file automatically downloads to your computer
- File name:
{theme-name}.zip
What's Included
The downloaded ZIP file contains:
- All theme files (templates, sections, snippets, assets)
- All folders and subfolders
- File structure preserved
- Binary files (images, fonts) included correctly
Exclusions
The following are NOT included:
.versionsfolder (version history)- System folders (
_active,_active_backup) - Temporary files
Requirements
- Authentication: Valid JWT token required
- S3 Configuration: Theme download requires S3 to be configured
- Theme Selection: A theme must be selected before downloading
API Endpoint
GET /editor/webstoreapi/themes/:themeName/download- Downloads theme as ZIP
Download Features
- Maximum Compression: ZIP files use maximum compression (level 9)
- Binary File Support: Images, fonts, and other binary files are handled correctly
- Complete Theme: All files and folders are included
- Preserved Structure: File and folder structure is maintained
Upload Theme (New - January 2025)
Upload a theme from a ZIP file to add it to your tenant repository.
Upload Process
-
Click Upload Button
- Click the upload icon button in the toolbar (bottom of sidebar)
- File picker dialog opens
-
Select ZIP File
- Choose a valid theme ZIP file
- File must be
.zipformat - Maximum file size: 50MB
-
Theme Validation
- ZIP file is extracted to temporary directory
theme.jsonfile is validated- Theme structure is checked
-
Upload to S3
- All files are uploaded to S3
- Theme becomes available in theme selector
- Upload progress shown
-
Theme Activation
- Uploaded theme is automatically selected
- Ready for editing and publishing
ZIP File Requirements
The uploaded ZIP file must:
-
Contain
theme.jsonin the root directory with:id(string): Unique theme identifiername(string): Theme display nameversion(string): Semantic version (e.g., "1.0.0")author(string): Theme author namedescription(string): Theme description
-
Valid Theme Structure
- Recommended folders:
templates,sections,assets,config - Can contain any valid theme files
- Recommended folders:
-
File Size
- Maximum size: 50MB
- Exceeds limit: Upload rejected with error
-
Theme Name Validation
- Theme name cannot start with underscore (
_) - System folders (
_active,_active_backup) are reserved
- Theme name cannot start with underscore (
Example theme.json
{
"id": "my-custom-theme",
"name": "My Custom Theme",
"version": "1.0.0",
"author": "Your Name",
"description": "A custom theme for my store"
}
ZIP File Structure
my-theme.zip
├── theme.json (Required metadata)
├── templates/
│ ├── index.liquid
│ └── product.liquid
├── sections/
│ ├── header.liquid
│ └── footer.liquid
├── snippets/
│ └── product-card.liquid
├── assets/
│ ├── theme.css
│ └── theme.js
└── config/
├── settings_schema.json
└── settings_data.json
Upload Validation
Before uploading, the system validates:
-
File Format
- Must be a valid ZIP file
- File extension must be
.zip
-
File Size
- Must not exceed 50MB
- Validated before extraction
-
theme.json Presence
- Must exist in ZIP root
- Validated after extraction
-
theme.json Structure
- All required fields must be present
- Version must follow semantic versioning (X.Y.Z)
-
Theme Name
- Cannot be system folder name
- Cannot start with underscore
Upload Features
- Binary File Support: Images, fonts, and other binary files are handled correctly
- Automatic Content Type Detection: File content types are automatically detected
- Complete File Upload: All files and folders are uploaded
- Error Handling: Detailed error messages for validation failures
- Progress Feedback: Upload progress and file count shown
Upload Errors
Common upload errors:
- "No files found": ZIP file is empty or invalid
- "theme.json not found": Missing metadata file
- "Invalid theme.json": JSON syntax or structure error
- "Missing required fields": Required fields missing from theme.json
- "Invalid version format": Version must be semantic (X.Y.Z)
- "File size exceeds 50MB limit": ZIP file too large
- "Invalid theme name": Theme name conflicts with system folders
API Endpoint
POST /editor/webstoreapi/themes/upload- Uploads theme from ZIP file- Content-Type:
multipart/form-data - Field name:
themeZip
- Content-Type:
Post-Upload Actions
After successful upload:
- Theme Available: Theme appears in theme selector
- Auto-Select: Uploaded theme is automatically selected
- Ready to Edit: Theme is ready for editing and publishing
- File Tree Updated: File explorer shows new theme files
Upload Best Practices
-
Validate ZIP Before Upload
- Ensure
theme.jsonis valid - Check file size is under 50MB
- Verify theme structure
- Ensure
-
Use Descriptive Theme Names
- Use clear, descriptive IDs in
theme.json - Avoid special characters
- Use clear, descriptive IDs in
-
Include All Required Files
- Include all templates, sections, and assets
- Don't forget configuration files
-
Test Theme Locally First
- Validate theme works before uploading
- Check for missing files or broken references
File Backup
Automatic Backup
- Files backed up before major changes
- Versions maintained automatically
- Restore from version history
Manual Backup
- Download Theme: Use download button to get ZIP backup
- Store Securely: Save ZIP file to secure location
- Version Control: Download before major changes
File Sync
Files are synced to the tenant repository:
- Files synced automatically
- Changes uploaded on save
- Sync status shown
Troubleshooting
File Not Opening
- Check file permissions
- Verify file exists
- Refresh file explorer
- Check browser console
Changes Not Saving
- Check tenant repository access
- Verify network connection
- Check file size limits
- Review error messages
File Explorer Not Loading
- Refresh page
- Check browser console
- Verify theme access
- Contact support
Keyboard Shortcuts
- Ctrl+S / Cmd+S: Save file
- Ctrl+F / Cmd+F: Find
- Ctrl+H / Cmd+H: Replace
- Ctrl+Z / Cmd+Z: Undo
- Ctrl+Y / Cmd+Y: Redo
- Ctrl+/ / Cmd+/: Toggle comment
Next Steps
- Theme Configuration - Configure theme settings
- Widget Editing - Edit widgets visually
- Preview System - Preview your changes