X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=56)
-   -   Run a sql command during mod installation (https://forum.x-cart.com/showthread.php?t=72827)

Phil Richman 09-24-2015 05:23 AM

Run a sql command during mod installation
 
Does anyone know how to run a sql command during the install of a mod? I have a mod that modifies how clean urls work in 5.2.x, but I had to manually run a sql command to remove all of the extensions from the clean url table. Is there a way I could have included that command in my mod, so that the command would run during installation?

cflsystems 09-24-2015 06:45 AM

Re: Run a sql command during mod installation
 
Use the hooks scripts - http://kb.x-cart.com/display/XDD/Upgrading+X-Cart+5

cflsystems 09-24-2015 06:46 AM

Re: Run a sql command during mod installation
 
Or make your module to check if the url has extension and remove it before returning the url

qualiteam 09-24-2015 09:17 PM

Re: Run a sql command during mod installation
 
You should look into implementing \XLite\Module\AModule::callInstallEvent() method in your Main.php class.


All times are GMT -8. The time now is 02:22 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.