-
Notifications
You must be signed in to change notification settings - Fork 3
Adding JavaScript
here are several 3rd party tools that can be added to a website by including a JavaScript library and adding a snippet of code to every page in the site. These types of tools can provide additional functionality, for example:
- To add tracking or reporting (Google Tag Manager or similar)
- A chat service (Freshchat, LiveChat or similar)
- Social media feeds (Facebook, Twitter or similar)
- Mapping (Google Maps or similar)
- Animation (GreenSock, Anime, Three or similar)
- And much more...
To add these type of JavaScript libraries, you need to create a custom uStore NG Theme by duplicating the XMPie AquaBlue theme and then adding the desired JavaScript library to the custom theme. Following are steps to complete this process:
- Set up your development environment as described here.
- Download the 3rd party JavaScript library and add it to the theme in this folder:
/src/ustore-internal/static - To add the library into the <head> tag of every page in the uStore Theme, edit this file:
/src/public/index.html - Test your code while in development mode by running the local webserver.
- Publish the new theme as described here.
For a detailed example, watch the Adding a chat service to your theme video on XMPie Campus.
uStore NG Themes
uStore NG Extensibility
Theme customization overview
Editing CSS variables
Editing the CSS
Migration from Legacy to NG
Theme development overview
Getting started
Theme file structure
Publishing the theme
Upgrading a Custom Theme
Editing HTML content
Adding a new page
Adding assets
Adding a component
Customizing a skin
Modifying CSS variables
Editing fonts
Adding JavaScript
uStore library
Working with REST API
Accessing uStore data
Managing custom state
Working with localizations
General services
Adding an external package
Customizing the Theme Editor
Theme tips and tricks
uStoreProvider Reference
Tax Webhook
Order Approval Webhook
Manufacturer Webhook
Widgets
Cart Export Webhook
Input Control Development Guide
Using uStore as a web component