Jump to content

ajax with PrestaShop


S.A

Recommended Posts

Hello, everyone.

Is anyone can help me? now I develop a payment method in PrestaShop. How I can send data from the .tpl file to the .js file 
using ajax, and how to validate input before sending it?

 

Thank you

Link to comment
Share on other sites

You don't send any data from the TPL to the Js file. Instead, your JS file gathers data from your TPL and sends them to your server. There methods lie addjs() or registerJavascript() to include automatically JS files into your tpl.

I hope it helps.

Link to comment
Share on other sites

2 hours ago, pedepot said:

You don't send any data from the TPL to the Js file. Instead, your JS file gathers data from your TPL and sends them to your server. There methods lie addjs() or registerJavascript() to include automatically JS files into your tpl.

I hope it helps.

Is there any tutorial help me in this point?

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...