1

I have this code - custom module Ajax:

_CompareAction : function(){
        $('body').on('click','.action.compare',function(e){
            e.preventDefault();
            var href = $(e.currentTarget).attr('href');
            $.ajaxSetup({showLoader: true});
            $.post(href,function(data){
                var compareBox = $('#productCompare');
                compareBox.html('');
                compareBox.html(data.content);
                compareBox.modal();
                compareBox.modal('openModal');
            }).fail(function(){
                alert({
                    content: $t('Can not finish request.Try again.')
                });
            });
            return false;
        });
    },

Unfortunately ajax calls me - the status code 302. What may be the problem?

I am trying to get this effect as on this page (Add to campare product and show popup compare product): http://ld-magento.template-help.com/magento_58948_v1/women.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.