Skip to main content
Version: 1.1.4

Template Engine

E-commerce App's Add To Cart Function

  • addToBasket : is a function that customers should implement this function may be changed related to customers purpose of usage and systems infrastructure

  • event : holds data from child

  • productSKU : is product code

Here is the sample below

window.addEventListener('message', function(event) {
if(event.event_id == 'pulpoar_message'){
if(event.data.prd_code != null){
addToBasket(event.data.prd_code)
}
}
});