Buenos dias necesitaria una mano en enviar variables jquery por mail, el codigo que tengo es:
<script type="text/javascript">
$(function () {
var goToCartIcon = function($addTocartBtn){
var $cartIcon = $(".my-cart-icon");
var $image = $('<img width="30px" height="30px" src="' + $addTocartBtn.data("image") + '">').css({"position": "fixed", "z-index": "999"});
$addTocartBtn.prepend($image);
var position = $cartIcon.position();
$image.animate({
top: position.top,
right: position.right
}, 500 , "linear", function() {
$image.remove();
});
}
$('.my-cart-btn').myCart({
classCartIcon: 'my-cart-icon',
classCartBadge: 'my-cart-badge',
affixCartIcon: true,
checkoutCart: function(products, totalPrice, totalQuantity) {
var checkoutString = "Total Price: " + totalPrice + "\nTotal Quantity: " + totalQuantity;
checkoutString += "\n\n Codigo \t Producto \t Precio \t Cantidad";
$.each(products, function(){
checkoutString += ("\n " + this.id + " \t " + this.name + + " \t " + this.price + " \t " + this.quantity);
});
alert(checkoutString)
console.log("checking out", products, totalPrice, totalQuantity);
},
clickOnAddToCart: function($addTocart){
goToCartIcon($addTocart);
},
getDiscountPrice: function(products) {
var total = 0;
$.each(products, function(){
total = this.quantity * this.price;
});
return total;
}
});
});
</script>
las variables que tengo que enviar son products, totalPrice, totalQuantity, si pudieran darme una mano se lo agradeceria!