Txau Posted September 27, 2011 Share Posted September 27, 2011 Hi, i'm trying to implement in my prestashop store a new type of voucheur that only introducing the voucher code the product gets 100% discount and free transportation. The idea it's similar to the gift check but i don´t want to need to create a new product for it, just create a voucheur that i can send to a user by email and then the user using this code can have the product for free in any of the products allready created in the store. I don´t think that modification will be that hard to do in the prestashop core code, but i don´t really know how to start doing it. Can some of the experts that hang around give me an idea of how to do this? Thanks in advance. Link to comment Share on other sites More sharing options...
Graphics Posted September 28, 2011 Share Posted September 28, 2011 Hi, I would love to know the answer to the above question as well. I would like to be able to offer vouchers that are 100% discount, where they can pick any of the products they want and then get 100% discount for a certain dollar amount and not be charged on their credit card or paypal account? And not have to put in any credit card info. Anyone out there to help us? Link to comment Share on other sites More sharing options...
las3r Posted September 29, 2011 Share Posted September 29, 2011 It's a dual process: 1) Create the 100%-discount voucher Core functionality of prestashop needs to be extended, you will need to extend: /classes/Discount.php (extend this by override the class) - Add the new "discount_type" variable 2) Process the voucher on the frontend Core functionality of prestashop needs to be extended, you will need to extend: /classes/Discount.php (extend this by override the class) override the getValue() method in this class to process free shipping and free product. 3) Change the payment "process" (not sure where, if you need I can look it up) to "free shipping" or someting I hope this gives you a nice start. Link to comment Share on other sites More sharing options...
Txau Posted September 29, 2011 Author Share Posted September 29, 2011 This sounds nice, i'll give it a try and tell something. To know how to modify the third step also would be great. But i'm not sure it will be needed. I mean, for example, another way to do this, not modifying code, but creating a new product (thats not what i need as i told in the first post) and set this product from the backend to free transport (doing it by weight or something like that). Then if you apply to this product a voucheur with 100% discount, you get also free transport, and you get also free shipping inmediately. Wouldn't happen the same if in step 2 you modify the method to return 0 amount and free transport? Thanks a lot for the feedback. Link to comment Share on other sites More sharing options...
fkreileman Posted January 15, 2012 Share Posted January 15, 2012 is there a solution yet? 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