Creating a percentage discount code, meaning the customer enters a specific character string at the end of order process, and gets X% discount on his order, is pretty easy – and it is even a standard functionality of Prestashop, called a Cart Rule in latest 1.6 version.
To create a discount code, in the administration panel, go to Price Rules => Cart Rules
There, click Add new cart rule
In the INFORMATION tab, enter the discount details : name, description, and the code you want to use, or use the Generate button to have a code randomly generated by Prestashop
In the CONDITIONS tab, enter your specific conditions (if any) : customer selection, date range, order amount, number of coupons, …
In the ACTIONS tab, select how your discount will work. For example, to apply 15% to all orders using the coupon, select the Apply a discount => Percent (%), and enter 15 in the Value field
Save your Cart rule, and see it successfully created in the list of cart rules.
You can then see it working by creating an order, and entering the coupon code in the VOUCHERS field. The cart values will be automatically recalculated.