Created
September 13, 2016 15:01
-
-
Save flayder/870dcae86879e1dbce766b63b60e235a 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
$('.order').click(function(){ | |
var ide = $(this).parent().find('input:hidden').val(); | |
$.ajax({ | |
type: "POST", | |
data: 'action=ADD2BASKET&ajax_basket=Y&id='+ide, | |
url: '/', | |
success: function(data){ | |
data = data.split('\'').join('\u0022'); | |
var obj = JSON && JSON.parse(data) || $.parseJSON(data); | |
if (obj.STATUS == 'OK'){ | |
BX.onCustomEvent('OnBasketChange'); | |
} | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment