PayPal script issue

  • Posts: 42
  • Thank you received: 0
8 years 5 months ago #243083

-- HikaShop version -- : 2.6.3

Hi,

on paypal_end.php file there is a small JavaScript snippet which submits the form to PayPal and somehow this snippet is blocking my template footer from displaying correctly.

When I remove the snippet everything is working correctly. Please see screenshots.

Thanks!

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
8 years 5 months ago #243088

Hello,

Maybe some little Css code may fixed your footer issue, but impossible to be sure of it without seeing it by myself.
Two solution for you :
- Provide an url link to your website.
- Or you add some Css custom code.

I want to know how to proceed, have a look on this link, here .

Note : I advice you to edit your Css file at the end, later that will be easier to find and correct it.

To learn more about Css code and their properties, I invite you to read this source, here .

Hope that will help you.

Regards,

Last edit: 8 years 5 months ago by Philip.

Please Log in or Create an account to join the conversation.

  • Posts: 42
  • Thank you received: 0
8 years 5 months ago #243197

Hi,

I've sent all website logins via your contact form.

Thank you!

Please Log in or Create an account to join the conversation.

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
8 years 5 months ago #243211

Hello,

I had a little look on your website, unfortunately I can't help you because your footer isn't displayedor managed by HikaShop maybe it come from your template or maybe a module or else a plugin, I don't know.

The only thing I can tell you, is that for a reason or another it don't displayed on step 3, therefore it displayed on step 1 and 2.
And see, there are only one view to manage step...
There is something missing, maybe a configuration or else.
The best way for you is maybe, if it's the case to contact the creator of your your extension.

Sorry for this answer.

Regards

Last edit: 8 years 5 months ago by Philip.

Please Log in or Create an account to join the conversation.

  • Posts: 42
  • Thank you received: 0
8 years 5 months ago #243325

Hi Philip,

Sorry to tell you, but is not missing anything, the issue is with Hikashop and as I said this is the piece of code that is causing the issue:

<script type="text/javascript">
	document.getElementById('hikashop_paypal_form').submit();
</script>

On step 1 and 2 is working fine because the above code doesn't exist, soon as you move to the PayPal page redirection this script is loaded and is breaking all templates.

I've tested on other templates like Beez and Protostar and the issues are the same and even worse on Protostar. I've attached screenshots as proof.

thanks!

Attachments:
Last edit: 8 years 5 months ago by michaelmyth.

Please Log in or Create an account to join the conversation.

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
8 years 5 months ago #243328

Hello,

The only solution I see, is maybe to waiting that your page fully loaded before apply this script function, and so replace your code by this one :

<script type="text/javascript">
        window.hikashop.ready( function(){
	        document.getElementById('hikashop_paypal_form').submit();
        }
</script>

Hope this will solve your issue.

Regards

Last edit: 8 years 5 months ago by Philip.

Please Log in or Create an account to join the conversation.

  • Posts: 42
  • Thank you received: 0
8 years 5 months ago #243519

Hi,

Now the footer works but the user is no longer automatically redirected to PayPal.

I need the user to be automatically redirected to PayPal for payment. Another click in the way of the checkout process is bad for conversions.

thanks!

Please Log in or Create an account to join the conversation.

  • Posts: 82865
  • Thank you received: 13372
  • MODERATOR
8 years 5 months ago #243523

Hi,

This must mean that you have a javascript error on the page which prevents that javascript code to run after the page is loaded.
The code that we have by default will run as soon as the browser reads it. So the browser might stop the page processing in the middle, but the advantage is that the code will work even if there are javascript errors on the page as they will happen after.
With that new code Philippe gave you, it runs after the page is loaded and thus the whole page has to be loaded first, but if there is an error, the browser won't run that code.
That's why it's like that by default.
So you have to look at your browser's javascript error console for the error on that page and then fix it (probably an issue with the template or a module) and then that code change should work like you want.

Please Log in or Create an account to join the conversation.

  • Posts: 42
  • Thank you received: 0
8 years 5 months ago #243620

Hi Nicolas,

the problem is with the code that Philip gave me. If you look closely Is missing a ")" . Everything is working now.

thanks!

Please Log in or Create an account to join the conversation.

Time to create page: 0.070 seconds
Powered by Kunena Forum