Buddi SEO Documentation
Home
Return to Buddi.io
Home
Return to Buddi.io
  • Getting Started

    • Installation Guide
  • Functions

    • Store Selection
    • Single Product
    • All Products
    • Products by Category
    • Products by Categories
    • Featured Promotions
    • Collections
    • Store Info
    • Add to Cart
    • Content Management System
  • Modules

    • Shopping Cart Module
    • Customer Profile
  • Advanced Functions

    • Dynamic object syncing
    • Cart
    • Customer
    • Login Customer
    • Logout Customer
    • Register Customer
    • Update Customer
  • Events
  • FAQ
  • Exceptions Handling
  • Caching
  • Deploying
  • Example Templates

Events (incomplete)

$emit(eventName, data = undefined)

The method emits the event with the given eventName and data

Example:

Buddi.$emit('customer:logged-in', {email: 'john@doe.com', …})

$on(eventName, callback, listenerKey = null)

The method subscribes for the event with the given eventName.

Params:

listenerKey - Optional. Allows to unsubsribe easier.

Example:

Buddi.$on('customer:logged-in', ({email}) => {
    alert("Hello " + email);
}, 'customerLoggedInListener')

$off(eventName, callbackOrListenerKey)

This method removes the previously registered subscription for an event with the given eventName. eventName can be an array or values. If array - will unsubscribe from all the events in the array

Params:

callbackOrListenerKey - You can either pass the callback which was used to register the subscription for the event OR the listener key which was used to register the subscription for the event.

Example:

Buddi.$off('customer:logged-in', ({email}) => {
    alert("Hello " + email);
})

OR

Buddi.$off('customer:logged-in', 'customerLoggedInListener')
Last Updated: 10/8/25, 9:05 PM
Contributors: jesseleejohnston
Next
FAQ