I want to do something special about woocomerce and adding product to cart. When the customer adds a product to his basket, I have a sidebar that opens automatically with the basket, but it closes and the product is added after. I would like it to be added when the sidebar is open.
How to do ?
Thank you !
jQuery('.single_add_to_cart_button').click(function(){
var action = jQuery('#taille').val();
if( action === ""){
jQuery('.variations .value').append('<span id="info-option">Veuillez sélectionner une taille</span>');
}
else{
jQuery('#info-option').css('display','none');
jQuery('body').addClass('oc-sidebar-opned');
}
jQuery('.oc-close').click(function(){
jQuery('body').removeClass('oc-sidebar-opned');
});
});
Comments
Post a Comment