Jump to content

Edit History

sococa

sococa

Sorry for the time don't have good control of XDebug and i forgot how it works.
So i share you what i see : 

$this: Lebruntwofa
_path"/modules/lebruntwofa/"
local_path"/var/www/prestashop/modules/lebruntwofa/"

I tried with /var/www/prestashop/modules/lebruntwofa/sendcode in the display_before_body.tpl 
 

  jQuery("#generate_code").click(function () {
            let email = jQuery("#field-email").val();
            /*console.log(email); OK, l'email de l'input est bien récupéré*/

            $.ajax({
                type: "POST",
                url: "/var/www/prestashop/modules/lebruntwofa/sendcode",
                data: {
                    ajax: true,
                    action: 'sendCode',
                    email: email
                },
                dataType: "json",
                encode: true,
            }).done(function (data) {
                if (data.success) {
                    alert('Code sent successfully.');
                } else {
                    alert('Error: ' + data.error);
                }
            });
        });

But i have a 403 :   POST https://prestashop.local/var/www/prestashop/modules/lebruntwofa/sendcode 403 (Forbidden)

And also tried to access directly with https://prestashop.local/fr/modules/lebruntwofa/sendcode and other declinations, but 500 error .

Just have 
print_r($this->context->link->getModuleLink('lebruntwofa', 'sendcode')); without die cause too an infinity loop :/

sococa

sococa

Sorry for the time don't have good control of XDebug and i forgot how it works. So i share you what i think is important

 

×
×
  • Create New...