Jump to content

Add programmatically a voucher prestashop 1.5.4


Recommended Posts

Hello, i want to implement this:

 

I want to make an extra table in prestashop database where i will be keeping some codes.

I want to add a field near the Voucher field that will allow someone to put his personal code there and by pressing a button there will be a search in the table in the database to see if there is a much and if such, i want a voucher to be automatically added (e.g. free couriers or 10% discount).

 

The most difficult thing i believe is how to add the voucher programmatically.

Can someone point to me the files where the normal vouchers are being checked?

I mean where is the code for the activation of the search (when you click the Apply button) and where is the code that actually makes the search in the database.

 

Any help will be highly appreciated.

 

The target is to create a members database and the member to have simply his own personal code that will give him some priviledges.

Right now with how the cart works, it is time consuming to go and add for every single member different codes and discounts.

 

Thank you!

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