Dukaan Themes
  • Introduction to Dukaan Themes
  • Building your own custom theme
  • Getting the basics right
  • Making your first edit
  • Theme folder structure
  • How does it all work?
  • Nunjucks Templating Language
  • Basic code editing
    • Adding the HTML
    • Adding the CSS
    • Adding the Javascript
    • Adding Nunjucks
  • Customising Dukaan Templates
  • Dukaan Data
  • Advance code editing
    • Customising core functionality
  • Dukaan Functions
  • Integrating Dukaan Plugins
    • Wishlist plugin
    • Countdown timer plugin
    • Product scarcity plugin
  • Testing and Deploying Your Theme
  • Code Snippets
    • Changing text of Add to bag button
    • Adding shadow to product cards
    • Adding auto-scrolling text in homepage
Powered by GitBook
On this page
  • 1. After add to bag event
  • 2. Product card renderer
  • 3. Category card renderer

Was this helpful?

Dukaan Functions

1. After add to bag event

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.

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.

categoryCardRenderer(mountElement, category, {
      additionalRenderer: nameOfYourFunction
});
PreviousCustomising core functionalityNextIntegrating Dukaan Plugins

Last updated 2 years ago

Was this helpful?