TheSecurityBunker Posted March 26, 2017 Share Posted March 26, 2017 Doesn't seem to want to progress through to payment. The module all looks setup ok and has connection with Stripe backend. Just won't go past the Payment stage. Console looks like its dying due to no JQuery inclusion ? Any ideas guys? Link to comment Share on other sites More sharing options...
bellini13 Posted March 26, 2017 Share Posted March 26, 2017 What Stripe module are you using? What version of the module? What version of Prestashop? Link to comment Share on other sites More sharing options...
TheSecurityBunker Posted March 26, 2017 Author Share Posted March 26, 2017 Hi Belini I'm using the Official Stripe version (currently on Prestashop modules) with 1.7.0.6. It looks like the jquery isn't getting loaded properly so the $ references are just bugging out. I'm trying to work out how to force jquery to load for every page (as a work around) but there are about a million entry points into the code - so I've got no idea where to start lol. I thought I could override the main Controllers model to load jquery on every controller, but that didn't work either Any ideas gratefully received! Link to comment Share on other sites More sharing options...
TheSecurityBunker Posted March 26, 2017 Author Share Posted March 26, 2017 Snapshot of the errors I'm getting... Link to comment Share on other sites More sharing options...
TheSecurityBunker Posted March 26, 2017 Author Share Posted March 26, 2017 Well I've given up and pasted a minimised jquery 3.2.0 into the start of the payment_stripe.js file. I'm sure there's a simple way of hooking jquery to run in this module but it sure isn't obvious! It now runs and processes cards.... Link to comment Share on other sites More sharing options...
gorjex Posted March 27, 2017 Share Posted March 27, 2017 Hi, i have the same problem and i´m a newbie, please can you tell me how you solve it step by step? Thanks! Link to comment Share on other sites More sharing options...
TheSecurityBunker Posted March 27, 2017 Author Share Posted March 27, 2017 (edited) Hi, I'm a newbie too so here goes. It would make sense that you can include JQuery into templates but I just couldn't find where to put it. So I downloaded the compressed minified JQuery 3.2.0 code and inserted it into the beginning of the payment_stripe.js and jquery.the-model.js I also enclosed the code in each file in an "on document ready" wrapper (see in about 5 billion places how this is done) - but its probably not even needed. It worked so I left it basically lol. This means that every time each of these files is opened it already has the jquery library included. I assumed I could paste it into the first one to load and the second .js file would see it - but you cannot guarantee they will always complete loading in the sequence specified. If the second file just happens to finish loading before the first, you get the jquery reference error again. So the only way to be sure was posting it into both! The files I changed were under /modules/stripe_official/views/js The payments then go through ok. I'm sure someone with more knowledge will show us how this should be implemented properly - but in the meantime I've left it bodged. I guess 2 x 32k chunks of code isn't going to make a massive overhead with Preastashop's footprint of 166MB !! Edited March 27, 2017 by TheSecurityBunker (see edit history) 1 Link to comment Share on other sites More sharing options...
bellini13 Posted March 28, 2017 Share Posted March 28, 2017 i'll take this opportunity to let you know there are much cheaper and working alternatives to the official stripe module. I assume you are using this official module? https://addons.prestashop.com/en/payment-card-wallet/24996-stripe-official.html I find it amusing that you would pay $150 for an official module that does not work, and then come to the community for support. Did you try to contact the 'author' of the module? Link to comment Share on other sites More sharing options...
TheSecurityBunker Posted March 28, 2017 Author Share Posted March 28, 2017 Yes that's the one you linked to. I find it amusing that you think I'd pay $150 lol. Its free!! And it does work now I've bodged it. Incidentally I asked the community, got no response and posted how I fixed it myself - just in case the community was interested... 1 Link to comment Share on other sites More sharing options...
bellini13 Posted March 28, 2017 Share Posted March 28, 2017 And how exactly is it free? The module I linked has $149.99 price tag associated to it Link to comment Share on other sites More sharing options...
TheSecurityBunker Posted March 28, 2017 Author Share Posted March 28, 2017 Well that's weird. I just downloaded it... I've plumbed it all in as it were and it works a treat.... I've taken payments with it so I guess its legit. But if they send me an invoice I'll be uninstalling it pronto Link to comment Share on other sites More sharing options...
TheSecurityBunker Posted March 28, 2017 Author Share Posted March 28, 2017 I just clicked the big arse Download button on the right hand side ! Link to comment Share on other sites More sharing options...
TheSecurityBunker Posted March 28, 2017 Author Share Posted March 28, 2017 (edited) And how exactly is it free? The module I linked has $149.99 price tag associated to it The module you linked to says FREE just above the big download button. Maybe it used to cost money and your browser has cached it? Ah just noticed you are in the US. Maybe it has regional restrictions? Edited March 28, 2017 by TheSecurityBunker (see edit history) Link to comment Share on other sites More sharing options...
bellini13 Posted March 28, 2017 Share Posted March 28, 2017 lol, i'm definitely not going crazy, but its not free when I look at it, and in fact the cost has now increased to $164.99 Link to comment Share on other sites More sharing options...
TheSecurityBunker Posted March 28, 2017 Author Share Posted March 28, 2017 Mate, they're taking the piss lol. Did you want me to email you the module zip? You can check out my bugs then Link to comment Share on other sites More sharing options...
Gunplaitalia Posted April 17, 2017 Share Posted April 17, 2017 Thank you for the instructions on how to solve this issue!!!Could you please tell me where I have to look for the payment_stripe.js file? I can't find it under /modules/stripe_official/views/js. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now