Jump to content

Insert php code into buttons


kiseed

Recommended Posts

Hello,

 

I'm trying to insert some php code to modify the behaviour of some buttons, at the moment the "Save" button at account creation page.

 

I would like to know where exactly I have to insert the code.

 

Also I would like to know if it'll be better to create a module to implement this changes (so after it'll be easyer to apply Prestashop updates), and how can a module change the behaviour of a prestashop button.

 

Thanks!

Link to comment
Share on other sites

Hi kiseed,

 

You can not put php code in a button, you can add javascript to a button behaviour to make an ajax request to execute php code.

 

An override can change the behaviour of prestashop's buttons.

 

Tell us what you want to do and what version of prestashop you use.

 

Good luck :)

Link to comment
Share on other sites

Hi math_php!

 

First of all, thanks for responding.

I'm using prestashop 1.5.0.17.

 

I'm trying to implement some comunication between prestashop and our ERP software.

I want that Prestashop generates a file with the user's data when he registers into Prestashop, after our software will fetch that file and incorporate it to the system.

 

I'm starting with the user's data but the goal is to get the orders too.

 

Thanks again!

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...