Closed intraordinaire closed 10 months ago
Hi, I remade the zip by including a first version of the cdc in the configuration page of the example module. prestashopexamplemodule.zip EDIT 23/10/2023 : Pick the one in the description
if you go on config page you should show something like this
You can find an updated example module version here prestashopexamplemodule.zip EDIT 23/10/2023 : Pick the one in the description
The ID have been added to the dependencies file in order to be able to correctly retrieve last available version & module name.
Hi,
Could a method like checkDependencies
be added to the DependencyBuilder class, returning a simple boolean, allowing module developers to check if all dependencies are already installed instead of having to parse the return of handleDependencies
?
Thanks!
@prestamodule Thanks for your feedback ! Indeed, it's a good idea and it will ease the development.
Are there any plans to let module developers customize this dependencies installation page (like Billing allows for customization of some elements of the UI)? Or expose some methods to let them build the routes themselves and take over the entire process? I think this would allow developers to better integrate this new process with their brand/module identity
@prestamodule It's the idea, yes. You could take the dependencies object and choose to display a page yourself, or deal with it as you want. We will add a documentation with the structure of the data, and the correct routes you should call to launch the installation process.
So it will be up to each dev to choose. Use the "all in one" solution, or build a custom one.
In order to correctly build the dependencies variable to instantiate the CDC, add an helper to ease the work of module devs.
So, we have to add a
module_dependencies.json
file in the root dir of the module.And then, in the module :
And later, in the tpl
Here you will find a module (compatible from 1.7.0) in order to test/try it : prestashopexamplemodule.zip
UPDATED 27/11/2023
Go to the config page, and you will see something like this :