0

I'm having trouble fixing the onepage checkout system. The checkout page buttons don't let you go to the next step, I'm assuming this is the javascript?

enter image description here

In the console it is displaying a few errors but mainly this one:

Uncaught TypeError: Validation is not a constructor
    at d.save (opcheckout.js:353)
    at HTMLButtonElement.onclick ((index):565)
  • wich magento version ? – PЯINCƏ Jul 13 '17 at 20:10
  • seems like jQuery and prototype confict each other – Sunil Patel Jul 14 '17 at 8:23
  • My Magento version is 1.9 and how do I fix the conflict please? @SunilPatel – user55794 Jul 14 '17 at 8:24
  • @user55794 i need to check which file called before, basically you need to call jQuery then no coflict then prototype – Sunil Patel Jul 14 '17 at 8:27
  • Sorry I'm new to Magento and developing is there an easy way to do this? @SunilPatel – user55794 Jul 14 '17 at 8:32
1

Please try to add below line into index.php

ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);
error_reporting(-1);

Then check the checkout, view source and you will got the current error.

0

For some reason when i inspect the page the JS link doesn't include www, but when I test adding www on a local it works !. How do I add this to the .phtml template ?

If your website does not work without www - add a nginx\htaccess 301 rewrite from non-www to www domain for example:

RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

It will not solve the issue itself for sure - you still need to find that link and correct, however it will prevent issues to appear in various unexpected places, so your Live website for example - will not broke again suddenly.

0

I think that your theme that your are using doesn't contain validation.js, try to add it via local.xml app/design/frontend/{Packagename}/{theme}/layout/local.xml

<reference name="head">
    <action method="addJs"><script>prototype/validation.js</script></action>
</reference>

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.