ronb Posted December 30, 2011 Share Posted December 30, 2011 hi everyone i am pretty new in prestashop, so please help me with this one. i understand how to create voucher/discount as an admin, using the prestashop cms but i want to create it via code, because i want to create a discount for each new customer, as they are registered. so i need to do it by code. my question is, how can i do that? i will really appreciate any help you can offer, thanks guys Link to comment Share on other sites More sharing options...
fernandokerber Posted February 17, 2012 Share Posted February 17, 2012 +1 1 Link to comment Share on other sites More sharing options...
NemoPS Posted February 17, 2012 Share Posted February 17, 2012 It's not that easy, you should create a module that hooks to the customer account creation, generates a code and inserts it in a table in the database. Regards Link to comment Share on other sites More sharing options...
olea Posted February 17, 2012 Share Posted February 17, 2012 You don't need to create a module for that. Firstly, create (manually) a voucher applicable to every customer, only one Time per customer. Then, in the /mails/ directory, edit the mail sent on customer registration to add a sentence and the voucher code. Then, each customer who registers Will receive the code 1 Link to comment Share on other sites More sharing options...
NemoPS Posted February 17, 2012 Share Posted February 17, 2012 You don't need to create a module for that. Firstly, create (manually) a voucher applicable to every customer, only one Time per customer. Then, in the /mails/ directory, edit the mail sent on customer registration to add a sentence and the voucher code. Then, each customer who registers Will receive the code Yeah this is a solution, but he wants the process to be automated i guess, that's why i suggested a module. In the way you suggested he has to do it manually for each customer. What i think he means is he wants a customer to have a personal code... or maybe i'm wrong. If it's so, your solution is fine enough Link to comment Share on other sites More sharing options...
olea Posted February 17, 2012 Share Posted February 17, 2012 No, you have the same vouchers for all customers, but usable only one Time per customer. Link to comment Share on other sites More sharing options...
olea Posted February 17, 2012 Share Posted February 17, 2012 No, you have the same vouchers for all customers, but usable only one Time per customer. Link to comment Share on other sites More sharing options...
Mike Kranzler Posted February 17, 2012 Share Posted February 17, 2012 Yeah this is a solution, but he wants the process to be automated i guess, that's why i suggested a module. In the way you suggested he has to do it manually for each customer. What i think he means is he wants a customer to have a personal code... or maybe i'm wrong. If it's so, your solution is fine enough As Olea said, all you would need to do is create a universal voucher only allowed to be used once per customer, and then edit the welcome email in your Back Office under Tools > Translations > Email Template Translations, and add some sort of line at the bottom offering a one-time discount code. From there, the whole process would be automated. If I were to create a new account, my welcome email would include something along the lines of "Please take advantage of 10% off your first order using the code WELCOME." And as a customer, once I use it I would no longer be able to use it again because it is only allowed once per user. I hope this helps explain things a little better. -Mike Link to comment Share on other sites More sharing options...
NemoPS Posted February 18, 2012 Share Posted February 18, 2012 Yeah, i got what olea was saying, i just misinterpreted the needs of ronb. My fault I knew this was possible Link to comment Share on other sites More sharing options...
Mike Kranzler Posted February 20, 2012 Share Posted February 20, 2012 Hi ronb, Did our suggestion work for you? -Mike Link to comment Share on other sites More sharing options...
cankart Posted March 15, 2012 Share Posted March 15, 2012 Hi, is it possible to create a coupon code (automaticaly done by the system) when a customer purchase something, for example if they spend £100 you will have £10 discount coupon to spend on the website, and after the purchase customer will receive the code, and when they buy a new product and enter the coupon code they receive it will be deducted? Link to comment Share on other sites More sharing options...
Mike Kranzler Posted March 16, 2012 Share Posted March 16, 2012 Hi cancart, You may want to check out the default "Customer Loyalty and Rewards" module in your Back Office for this sort of functionality. I hope this helps. -Mike Link to comment Share on other sites More sharing options...
mkbond777 Posted July 11, 2015 Share Posted July 11, 2015 As Olea said, all you would need to do is create a universal voucher only allowed to be used once per customer, and then edit the welcome email in your Back Office under Tools > Translations > Email Template Translations, and add some sort of line at the bottom offering a one-time discount code. From there, the whole process would be automated. If I were to create a new account, my welcome email would include something along the lines of "Please take advantage of 10% off your first order using the code WELCOME." And as a customer, once I use it I would no longer be able to use it again because it is only allowed once per user. I hope this helps explain things a little better. -Mike Hi, The only issue I see with this approach is - If the old customer somehow know about the voucher code then even they can use it. Thanks Manish Kumar Link to comment Share on other sites More sharing options...
fale.henrique Posted February 15, 2016 Share Posted February 15, 2016 Hi ronb, Did you do it? I need to do it also, you have some example? Tks.. 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