View Single Post
  #2  
Old 05-28-2014, 12:30 PM
Maya's Avatar
Maya Maya is offline
Ecwid Team
 
Join Date: Feb 2010
Location: Ecwid headquarter
Posts: 5,876
Default

Quote:
Originally Posted by Luminette Lucimed View Post
I would like to redesign the "add to cart" button so I created a custom button :

Code:
<a class="btn btn-large add-to-cart" data-single-product-id="36382049">Ajouter au panier</a>
with such method :

Code:
$('.add-to-cart').click(function() {
    var id_product = $(this).data('single-product-id');
    Ecwid.Cart.addProduct(id_product);
});
My problem is that I would like to show the shopping cart after product addition. I know that it's possible to define a callback method but can't find the method to call to open the cart.

Can you help ?

Nobody ?
Hello,

I'm sorry for delay with answer.

In order to execute this script properly, Ecwid main script should be added on your page. Please, make sure you have following script installed:
Code:
<script type="text/javascript" src="http://app.ecwid.com/script.js?STORE_ID" charset="utf-8"></script>
where STORE_ID should be changed to ID of your store.

Once you do this, script will work as expected.

Good luck!
__________________
Maya N., Ecwid Team

------------------
Welcome to our new Help Center!