JS events
We use jQuery and its '.trigger' function to fire events. Therefore, those events are available only when you use jQuery as well.
Event uni_cpo_options_data_ajax_before_send
Contains form data just before sending request to backend.
Event uni_cpo_options_data_ajax_success
Is fired if ajax request was successful. Contains both form data and response data.
Event uni_cpo_options_data_ajax_fail
Is fired when ajax request was not successful. Contains both form data and response data.
Event uni_cpo_set_price_event
This event is fired when the price has just been updated after price calculation is made. It receives a string value of the updated price.
Event uni_cpo_set_btn_state_event
Fires when price calculation has just been made and holds the value of the 'add to cart' button. It can be either true or false.
Class uni_add_to_cart
This class is added to 'add to cart' button and is used to add add to cart via ajax functionality. You can add this class to your custom button(s) and achieve the same effect.
Last modified 1yr ago
Copy link