
05-29-2014, 01:15 PM
|
 |
Paid Member
|
|
Join Date: Jul 2012
Posts: 7
|
|
Hi Maya,
This is not the problem, Ecwid main script is added properly and the script works as expected.
My question is : How to open (show) the minicart after adding a product in it (in the addProduct callback method).
I found a "quick and dirty" solution, but I'm not entirely happy with that
Code:
$('.add-to-cart').click(function() {
var id_product = $(this).data('single-product-id');
Ecwid.Cart.addProduct({
id: id_product,
callback: function(success, product, cart){
console.log(success); // true or false
console.log(product.name);
$('.gwt-InlineLabel').click();
}
});
});
|