Jump to content

Unable To Delete Categories


Recommended Posts

Hello,

I am unable to delete categories in the back office and before I start tinkering with files uploaded on the server I might just aswell ask here.

When i select a category and deletes me, it just throws me in the main categories menu and does nothing when I check, if anything happened. I can enable and disable them without any problems, I am just unable to delete them.

Please help

Edited by Papasmur (see edit history)
Link to comment
Share on other sites

If there's no error I don't have any idea what may cause this.

Try a hardcoded delete like this.

See the number id of one category that you want to delete, edit file YOUR_PRESTA/controllers/admin/AdminCategoriesController.php and at the beginning of __construct() function add:

$catdel = new Category(999);
$catdel->delete();

Make sure in the code above you replace 999 with the id of category you want to delete.

After that refresh the categories page and check if the category was deleted or not.

Link to comment
Share on other sites

I don't want to be such a pain in the a**, but I am quite new to this and not sure how everything works.

I located the said file and found 2 parts with ''_construct'' and am not sure where should i paste the code. 

screenshots of locations: https://gyazo.com/8d4e632568df906a098d3dfc34977087 https://gyazo.com/5a32908c80640d376b62c58297d31907

I really appreciate all the help

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...