PrestaShopCorp / dotpay

Dotpay payment module
1 stars 13 forks source link

JS errors with selling module called OnePageCheckout #16

Open PR0SAT opened 6 years ago

PR0SAT commented 6 years ago

Getting: SyntaxError: unexpected token: keyword 'function' Tracked down the issue to: /dotpay/views/templates/front/scripts/payment.tpl Result: Form does not get constructed via JS, can't execute the payment

PR0SAT commented 6 years ago

resolved this with :

` if(window.dotpayConfig != undefined) {

    jQuery.fn.extend({
        goTo: function() {
            $('html, body').animate({
                scrollTop: ($(this).parents('.dotpay-channels-list').prev().offset().top-100) + 'px'
            }, 'fast');
            return this;
        }
    });

<...> } else { / fix for onepagecheckout module / $('body').on('click', 'a.dotpay.dropbtn', function() { $('form.dotpay-form').submit(); return true; });`