Richard Holy Posted November 6, 2018 Share Posted November 6, 2018 Hello, Is there a way that I could load the Prestashop application or framework and use it's libraries and classes from CLI? I am trying to create scripts for cloning instances and it would be great to be able to clear the cache, change the admin password or re-create the SEO URL cache by PHP script running from CLI. Perhaps having something like CLI presenter would do it...? Any suggestions? Thanks, Richard Link to comment Share on other sites More sharing options...
hhennes Posted November 8, 2018 Share Posted November 8, 2018 Hi, I've done a console using the symfony console component You can check its possibilities on github : https://github.com/nenes25/prestashop_console Since the version 1.7. of prestashop a native console is also available you can run it with this command in the prestashop root dir php bin/console And starting with version 1.7.5 you can register your own commands. See : https://devdocs.prestashop.com/1.7/modules/concepts/commands/ Regards, Link to comment Share on other sites More sharing options...
alreadynight Posted January 31, 2020 Share Posted January 31, 2020 Hi, I'm trying to create a new command but documentation it isn't really clear according to me (I admit I'm not a prestashop/symfony expert). I'm having problem with namespaces: does someone give me an example on how to add a simple command by a custom module? Thank you Link to comment Share on other sites More sharing options...
fbenoist.com Posted February 4, 2020 Share Posted February 4, 2020 Hi Try this sample module : https://github.com/frederic-benoist/fbsample-console 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