// count the number of each item in the cart for (i = 0; i < len; i++) { total += items[i].get('quantity'); } if (total < 3) { alert(' please add more to your shopping cart before checking out'); evt.preventdefault(); } }); </script> <!-- //cart-js -->
// count the number of each item in the cart for (i = 0; i < len; i++) { total += items[i].get('quantity'); } if (total < 3) { alert(' please add more to your shopping cart before checking out'); evt.preventdefault(); } }); </script> <!-- //cart-js -->
Register to vote on and add code examples. Join our developer community to improve your dev skills and code like a boss!
No Good?
Help us improve our code examples by registering to vote on and add answers. Join our developer community to improve your dev skills and code like a boss!