document.addEventListener("fg-gifts:show-slider", (e) => {/* Event for customizing the gift slider */// Hidden default // #freegifts-main-popup-container.sca-modal-fg {// display: none !important;// }console.log("fg-gifts:show-slider",e.detail)// Data type of e.detail: {// addGiftToCartFunc: async (variantID, quantity, offerId) => void, // function handle add gift to cart by BOGOS// gifts: GiftProduct[] // array of gift products to show// }})
Note: Make sure to use the CSS below to hide BOGOS's default component of the Gift slider
2. Event for customizing the Gift icon, and Gift thumbnail on product page
document.addEventListener("fg-gifts:gift-icon", (e) => {/* Event for customizing the Gift icon, and Gift thumbnail on product page */// Hidden default // #sca-gift-icon, #sca-gift-thumbnail {// display: none !important;// }console.log("fg-gifts:gift-icon",e.detail)// Data type of e.detail: {// icon: string, // url gift icon if products has gift// gifts: GiftProduct[] // gift can be added when buy that product// product: {// handle: string,// variant: number, // variant id selected// }// }})
Note: Make sure to use the CSS below to hide BOGOS's default component of the Gift icon, and Gift thumbnail
document.addEventListener("fg-today-offer:success", (e) => {/* Event for customizing the Today offer when the state of the offer is changed. E.g. success, not reach,.. */console.log("fg-today-offer:success",e.detail)// Data type of e.detail: {// idOffersSuccess: number[], // offers id success// } })
4. Event for customizing the Cart message
document.addEventListener("fg-messages:render", (e) => {/* Event for customizing the Cart message */// Hidden default // #sca-promotion-message-layout {// display: none !important;// }console.log("fg-messages:render",e.detail)// Data type of e.detail: {// data: CartMessage[] // }})
Note: Make sure to use the CSS below to hide BOGOS's default component of the Cart message