Created
March 9, 2015 10:07
-
-
Save riq363/7063600d66f8c3947cad to your computer and use it in GitHub Desktop.
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 src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> | |
<script> | |
Ecwid.paymentOptionElement = function(caption) { | |
return jQuery("label:contains('" + caption + "')").parents('.ecwid-PaymentMethodsBlock-PaymentOption'); | |
}; | |
Ecwid.OnPageLoaded.add(function(page) { | |
if (page.type === 'CHECKOUT_PAYMENT_DETAILS') { | |
Ecwid.Cart.get(function(cart) { | |
if ( $("body").hasClass("ecwid-customer-group-1794001") ) { | |
Ecwid.paymentOptionElement('Demo payment').show(); | |
} else { | |
Ecwid.paymentOptionElement('Demo payment').hide(); | |
} | |
}); | |
} | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment