# Dukaan Functions

## 1. After add to bag event

```javascript
window.afterAddToBagCall = (productUUID, skuUUID) => {
    alert(`Add to bag button clicked`);
}
```

## 2. Product card renderer

It renders the product card

mountElement is the element inside which the card is to be rendered. Mount element is the element which is targeted and inside which the current product card is to be appended.

```javascript
productCardRenderer(mountElement, product, {
      additionalRenderer: nameOfYourFunction
});
```

## 3. Category card renderer

It renders the category card

mountElement is the element inside which the card is to be rendered. It is the element which is targeted and inside which the current category card is to be appended.

```javascript
categoryCardRenderer(mountElement, category, {
      additionalRenderer: nameOfYourFunction
});
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mydukaan.io/dukaan-functions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
