This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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('') |