waldette Posted July 20, 2013 Share Posted July 20, 2013 (edited) I'm making a module for apply a discount to the order cart depending on a code given by an external api. It's value is variable absolutely, it means that i can't to create this discount with the administrator panel, so i need to create dynamicaly. When i try to create the new Discount() in my module, it return a "Class 'Discount' not found". Edit: I found how to add a new discount but when i put the code returned by prestashop its showed as a discount code, i want to apply directly to the shopping cart. Is it possible to apply directly this discount to the cart? Edited July 20, 2013 by vekia (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted July 20, 2013 Share Posted July 20, 2013 what ps version you use? Link to comment Share on other sites More sharing options...
waldette Posted July 20, 2013 Author Share Posted July 20, 2013 Solved for now. I create a new discount coupon and use the form for send the generated code and refresh the shoping cart for apply it. Thanks Link to comment Share on other sites More sharing options...
vekia Posted July 20, 2013 Share Posted July 20, 2013 thanks for information and solution im convinced that it will be really helpfull for other forum members im going to mark this thread as [solved] regards 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