Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    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 :
    cannot use base64 encode and decode ??? no method in Tools, so how ?
    image.png
    nj
    @nicoja
    And it used in Tools
    GoT
    @PierreRambaud
    Hi @nicoja , it was originaly used for retrieving personnal data from merchants, which is forbidden. Today there are other uses such API calls which needs data to be encoded, and we accept the use of these methods
    nj
    @nicoja
    Ok, thanks for your answer
    Krystian Podemski
    @kpodemski
    @PierreRambaud are you sure it is allowed on addons.marketplace? :)
    GoT
    @PierreRambaud
    @Quetzacoalt91 Said me yes :)
    Krystian Podemski
    @kpodemski
    i remember fighting with addons team years ago about base64 :D
    i had theme with serialized array treated with base64 just to not use json, because 5.2 was a thing back in the days and sometimes json was faulty
    theme was removed from the market because of that, #1 in category :D
    MarineCARTSGURU
    @MarineCARTSGURU
    Hello everyone :) I am having an issue with my Module in Prestashop Addons. The users cannot put reviews on it... Can someone please help me with this issue? Thanks a lot
    Rémy Lefebvre
    @Thorfy
    Hi guys, I tried to upload file with hookDisplayAdminProductsExtra and hookActionProductUpdate, it doesn't work. I tried to search information about that but i just found 1 github thread that said it was not possible anymore due to new symfony legacy controller. But I did not find anything more,
    Do you have a hint to suggest me?
    hi @SebSept you can check your date with the hook hookActionProductUpdate or hookActionProductSave (but file uploading bug)
    your data*
    Rémy Lefebvre
    @Thorfy
    @cupsadarius Hi, I do not know a hook to do that, but I think you should easily be able to add one custom in the class or the customerThread controlle
    Sébastien Monterisi
    @SebSept
    Hello @Thorfy , sorry I missed your answer. I finaly choose to implement hookActionAdminProductsControllerSaveBefore() .
    I think it's better than hookActionProductUpdate because, the form is displayed in the admin, but not present every time a product is saved (api, module, etc).
    Thanks for the effort to provide an answer ;)
    Another question : is it possible for a module to override files in /pdf folder ? (not asking to override in the theme but with a module).
    Sébastien Monterisi
    @SebSept
    (answer is No).
    Sébastien Monterisi
    @SebSept
    Is there a cleaner way to write this (in hookDisplayHeader()) :
    $this->context->controller->registerStylesheet($this->name, "modules/{$this->name}/views/css/vueseclatees.css", ['media' =>'all']);
    (the hardcoded "modules" could lead to problem)
    Matt75
    @Matt75
    If you look in native module, you can see
    $this->context->controller->registerStylesheet('modules-homeslider', 'modules/'.$this->name.'/css/homeslider.css', ['media' => 'all', 'priority' => 150]);
    The first argument is important because it's an id so it must be unique.
    So I suggest to you to use $this->context->controller->registerStylesheet("modules-{$this->name}-vueseclatees", "modules/{$this->name}/views/css/vueseclatees.css", ['media' =>'all']); if you want to include more than one css file
    No problem with use of the hardcoded modulesI think due to StylesheetManager classe
    Sébastien Monterisi
    @SebSept
    ok, thanks for advice on id param.