Events
This documentation provides an overview of the events listener strategy and the different events you can listen to on the Hyperzod Ordering Website.
Below is the list of events available for listening:
Event | Description |
add_to_cart | Triggered when a product is added to the cart. The event contains the product details. |
view_merchant | Triggered when a merchant is viewed. The event contains the merchant details. |
view_product | Triggered when a product is viewed. The event contains the product details. |
search_results | Triggered when a search is performed. The event contains the search query, search results for merchants, and products. |
place_order | Triggered when an order is placed. The event contains the order details. |
Here is a sample code that demonstrates how to add an event listener for the add_to_cart event:
To set up more event listeners, you can use the following syntax:
Replace <event_name> with the name of the event you want to listen to (e.g., view_merchant, view_product, etc.). You can add your custom logic or a handler function inside the listener as required.
1. Navigate to your admin panel
2. To the left, click on "Settings"

3. Then click "Theme settings"

4. Inside you’ll find three sections Theme General, Custom Code, Header and Footer. Click on "Custom Code

5. Inside the Custom HTML section, choose “Custom HTML Head” and paste the “Event Listener Code” inside.

6. Lastly, click “Save”
