What are filters?


Filters are used to modify the data before the drawer is built. The available filters are:


  • raw_cart
  • product
  • add_to_cart
  • cart
  • cart_final
  • recommended_products
  • upsells
  • tiered_free_items
  • special_offer_notification
  • cart_submit
  • settings
  • translations
  • hide_product



How to use:

window.addEventListener("Sellify::UCD::Initialized", function(){
    sellify.ucd.filters.{filter_name_here}.push(function(data){
       // Your code here
    });

    // Return modified data
    return data;
});


Examples:

sellify.ucd.filters.cart_submit.push( function( e ){
   alert("You're being redirected to checkout now....")
} );