techlab / jquery-smartcart

The smart interactive jQuery Shopping Cart plugin with PayPal payment support
http://techlaboratory.net/smartcart
Other
95 stars 40 forks source link

Shopping Cart in Top menu. #5

Closed sanalrenk closed 7 years ago

sanalrenk commented 7 years ago

Hello, thanks for the nice cart. this is not issue, I ask question.

How can I place only this: screen shot 2017-05-22 at 11 33 33 in top menu. Thanks.

techlab commented 7 years ago

Well, I don't have an example right now. I will be adding that later. As a heads-up for you, the below change will make the count to be displayed anywhere on the page. Add the element where you want to display the count.

     <span class="sc-cart-count">0</span>

Aslo you need to hack one line of source code https://github.com/techlab/SmartCart/blob/master/src/js/jquery.smartCart.js#L357

change from

     $('.sc-cart-count',this.cart_element).text(this.cart.length);

to

     $('.sc-cart-count').text(this.cart.length);

Hope that helps Thank you

sanalrenk commented 7 years ago

Thanks, it's working.:)

sanalrenk commented 7 years ago

Hello again, it is showing cart items in shopping cart page, but if I go another page, it is reset to zero.