Nicholas Manousos nmanousos

View gist:4549391
1 2 3 4 5 6 7 8 9 10
<script>
$(function() {
$('.product-grid-item').append('<a href="/cart" style="margin-top:5px;" class="btn quick-add">Add to Cart</a>')
$('.quick-add').click(function(e){
e.preventDefault();
var quick_add_item = this
if($(quick_add_item).text() == 'View cart') {
window.location = $(quick_add_item).attr('href')
} else {
var quick_add_id = $(this).parent().attr('id').split('product-').join('')
Something went wrong with that request. Please try again.