Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Sébastien Monterisi
    @SebSept
    I can do both. The module is at an early dev stage.
    It's better with composer I guess.
    Pablo Borowicz
    @eternoendless
    normally you only need to run composer install if you need composer :)
    Sébastien Monterisi
    @SebSept
    (Note that the Prestashop was not installed using composer.)
    Pablo Borowicz
    @eternoendless
    no matter what method you used to install PS, you only need to run composer on the module if the module itself needs composer (either it uses it for autoloading or for dependencies)
    assuming PS was installed using the zip release, or if you are using the development sources, that you ran composer install at the root of PS
    Sébastien Monterisi
    @SebSept
    it was installed using a zip release. (it's 1.7.5.0)
    (I'm trying a few things ...)
    Sébastien Monterisi
    @SebSept
    still stuck with that error "Class "VuesEclatee\AdminController\AjaxAdminController" does not exist." when requesting the admin controller :/
    I'll publish a dummy copy version of the module to let you/anyone test if you wish ...
    or maybe someone has an example module using autoload so that I can try on my shop ... (?)
    Pablo Borowicz
    @eternoendless
    if you want to use composer autoloader you have to declare your namespace, see https://github.com/PrestaShop/ps_linklist/blob/master/composer.json#L17-L19
    Sébastien Monterisi
    @SebSept
    that's what I did.
    thx, I'm reading linklist module code ... maybe I'll find the problem...
    Sébastien Monterisi
    @SebSept
    ps_linklist module rely on the fact that vendor directory is present. This will not be the case for a new module.
    Pablo Borowicz
    @eternoendless
    why not?
    it will if you launch composer install
    Sébastien Monterisi
    @SebSept
    for sure
    but the module can't be installed in the admin
    that's my problem in fact.
    (vendor directory should not be in version control (or in module code).)
    Pablo Borowicz
    @eternoendless
    currently the vendor module has to be bundled with the module
    Sébastien Monterisi
    @SebSept
    crap.
    Pablo Borowicz
    @eternoendless
    i know this is bad practice but the old system is not ready to handle composer on its own
    Sébastien Monterisi
    @SebSept
    ok.
    so that's not a problem with my code.
    Pablo Borowicz
    @eternoendless
    we want to improve this in the next version so that modules will be installed/upgraded/uninstalled using composer
    nope
    Sébastien Monterisi
    @SebSept
    great !
    thanks for feedback.
    Pablo Borowicz
    @eternoendless
    (next major version, don’t get your hopes up :P)
    :thumbsup:
    Sébastien Monterisi
    @SebSept
    thanks again, bye :)
    Pablo Borowicz
    @eternoendless
    you’re welcome!
    Sébastien Monterisi
    @SebSept
    Hello :)
    Inside a module main file (modules/bla/bla.php) , in hookDisplayAdminProductsExtra(), what's the recommender way to generate an admin url (admin ajax controller) ?
    $this->context->link->getAdminLink('', true, ['route' => 'vueseclatees_ajax_admin_post'])
    vs
    $this->get('router')->generate('vueseclatees_ajax_admin_post', [], UrlGeneratorInterface::ABSOLUTE_URL)
    prestashop 1.7.5 (no need for backward compat)
    GoT
    @PierreRambaud
    If you're allowed to use $this->get('router') and you only want to make it works with 1.7.5, I think it's a good idea to keep the container style instead legacy link context.
    Sébastien Monterisi
    @SebSept
    ok. that's what sounds reasonable to me too.
    thanks
    Sébastien Monterisi
    @SebSept
    Hello, me again :)
    my module implements hookDisplayAdminProductsExtra()
    form is displayed, ok.
    how do I handle the form saving ? Any hook for that ?
    Sébastien Monterisi
    @SebSept
    or should I add a save button pointing to a custom controller ?
    Cupsa Darius
    @cupsadarius
    Hello, I was wondering if there is a way to register a hook from a module that would get triggered when a new message is sent on a customer service thread. I didn't see anything in the documentation that would easily let me hook into that flow. Or if there is a better way of doing that ? I would be very grateful if you guys can point me into the right direction.
    nj
    @nicoja
    image.png
    Hello How can I solve this :