waldette Posted July 23, 2013 Share Posted July 23, 2013 (edited) Hello, I want to delete a Discount created previourly in my module with a button. I use the same link as Prestashop <a class='price_discount_delete' title='Eliminar' href='http://xxxxxx.com/index.php?controller=order?deleteDiscount=25'>Delete</a> But the problem is that in the admin panel the discount still showed in the table. But I see that when I execute this link the discount it's removed from products cart, not from admin discount's table. Is it posible to delete the discount from admin panel? Edited July 23, 2013 by waldette (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted July 24, 2013 Share Posted July 24, 2013 Hi, Of course, that simply removes it from the cart. To erase it, you must login to the admin panel and go to price rules ->cart rules, and remove it from there Link to comment Share on other sites More sharing options...
waldette Posted July 24, 2013 Author Share Posted July 24, 2013 -.- Im creating a module... i dont want enter to admin panel. Its posible that i explained bad.. I have a prducts cart module and i need to delete a discount from cart. When i try to execute above code, its remove from cart but still in db or admin panel. I need to delete discount from everywhere. Link to comment Share on other sites More sharing options...
waldette Posted July 24, 2013 Author Share Posted July 24, 2013 Is it not possible without enter to admin panel? Are there no code for erase from everywhere this discount? Link to comment Share on other sites More sharing options...
NemoPS Posted July 24, 2013 Share Posted July 24, 2013 In that case you must use a query, or create a new discount in the module using the ID $discount = new DIscount($id_discount); then $discount->delete(); And yes, you didn't explain well Link to comment Share on other sites More sharing options...
waldette Posted July 25, 2013 Author Share Posted July 25, 2013 ok, it's perfect. Sorry for my bad explain, I'm spanish and there are moments that it's difficult explain welll I'll try this option. I'll say you if work! Thanks! 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