View Single Post
  #3  
Old 05-29-2014, 01:15 PM
Luminette Lucimed's Avatar
Luminette Lucimed Luminette Lucimed is offline
 
Join Date: Jul 2012
Posts: 7
Default

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();
		}
	});
});