/*
$(document).ready(function(){

 $('.boton-compra').unbind('click').click(function(e){
     e.preventDefault();
       addProduct( $('#product_page_product_id').val(),  true, null, 1, null, true);
     return false;
    });
    
    
	function addProduct(idProduct, addedFromProductPage, callerElement, quantity, whishlist, isProductPage)
    {
        //send the ajax request to the server
        $('#pre_cart').show();
		$('#pre_cart_filter').show();
		$.ajax({
            type: 'GET',
            url: baseDir + 'cart.php',
            async: true,
            cache: false,
            dataType : "json",
            data: 'add&ajax=true&qty=' + ( (quantity && quantity != null) ? quantity : '1') 
                    + '&id_product=' + idProduct + '&token=' + static_token ,
            success: function(jsonData)
            {
                $.ajax({
                    type: 'GET',
                    url: baseDir + 'pre-cart.php',
                    async: true,
                    cache: false,
                    data: 'id_product=' + $('#product_page_product_id').val(),
                    success: function(response)
                    {
                        $('#pre_cart').html(response); //.show();
                        //$('#pre_panier_filter').show();
                        $('.btn_close_popin').click(function(){
                            $('#pre_cart, #pre_cart_filter').hide();
                        });
                    }
                });
            },
            error: function(XMLHttpRequest, textStatus, errorThrown) {alert("TECHNICAL ERROR: unable to add the product.\n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus);}
        });
    }

});
*/

