Merge pull request #11991 from zfox23/commerce_fixBrokenBuyButtons

Fix broken Buy buttons on main Marketplace page
This commit is contained in:
Zach Fox 2017-12-14 12:48:09 -08:00 committed by GitHub
commit 94bd8d8673
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -265,8 +265,10 @@
});
$('.grid-item').find('#price-or-edit').find('a').each(function() {
$(this).attr('data-href', $(this).attr('href'));
$(this).attr('href', '#');
if ($(this).attr('href') !== '#') { // Guard necessary because of the AJAX nature of Marketplace site
$(this).attr('data-href', $(this).attr('href'));
$(this).attr('href', '#');
}
cost = $(this).closest('.col-xs-3').find('.item-cost').text();
$(this).closest('.col-xs-3').prev().attr("class", 'col-xs-6');