Jump to content

Tab doesn't uninstall with module


Recommended Posts

Hello, I need help, I'm using PS 1.7.0.6, I've installed my custom module, everything works fine, but when uninstall it, Tab doesn't uninstall with the module

image.thumb.png.4ad63d8a810116914b4a8dfe2484e73d.png

This is my uninstall method Tab and module

public function uninstall()
    {
        return parent::uninstall() &&
        Configuration::deleteByName('COTIZADOR_NOTIFY_TO_EMAIL') &&
        Configuration::deleteByName('COTIZADOR_NOTIFY_NON_COMPLETE_ORDER') &&
        Configuration::deleteByName('COTIZADOR_NOTIFY_COMPLETE_ORDER') &&
        Configuration::deleteByName('COTIZADOR_TABLE_NAME') &&
        Configuration::deleteByName('COTIZADOR_PRODUCTS_TABLE_NAME') &&
        Configuration::deleteByName('COTIZADOR_PRODUCTS_LANG_TABLE_NAME') &&
        Configuration::deleteByName('COTIZADOR_PRODUCTS_CATEGORY_TABLE_NAME') &&
        Configuration::deleteByName('COTIZADOR_CATEGORYS_TO_USE') &&
        $this->uninstallDB() &&
        $this->uninstallTab();

    }
public function uninstallTab()
    {
        $id_tab = (int) Tab::getIdFromClassName('Cotizador');
        $tab = new Tab($id_tab);
        return $tab->delete();
    }

I Hope someone could help me

Link to comment
Share on other sites

2 hours ago, Rolige said:

Hello:

Try to move your


$this->uninstallTab();

upper before


parent::uninstall()

Or paste your installTab code to check it.

PD: You are from Chile? There are an spanish forum too.

Regards

 

Thanks for your answer, and yes, I'm from Chile, but I think here more people will respond.

Anyway, Now everything works fine.

Change this line

        $id_tab = (int) Tab::getIdFromClassName('Cotizador');

to

        $id_tab = (int) Tab::getIdFromClassName('AdminCotizador');
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...