Jump to content

Help needed on Customizing Customer Registration


Recommended Posts

Hi,

 

I'm trying to link prestashop customer registration with my core website registration.

When customer get register from prestashop registration form, an API call will be send to core website register api.

To do this, I have created custom auth module and call "hookActionValidateCustomerRegistration". But this hook doesn't get trigger. 

 

Is this approach is correct and why its not getting trigger when customer registering?


 

Quote

 

public function install()

    {

        return parent::install() &&

        $this->registerHook('hookActionValidateCustomerRegistration');

    }

 

    public function uninstall()

    {

        return parent::uninstall();

    }

 

    public function hookActionValidateCustomerRegistration($params)

    {

        PrestaShopLogger::addLog('Debug: hookActionValidateCustomerRegistration_customAuthenticationModulecalled');

       $apiResponse = CustomAuthAPI::authenticateUser($params['customer']);

}

 

 

Link to comment
Share on other sites

First of all welcome to our world 😎

You should use the core hooks and only in cases that they do not fulfill your needs to deploy custom ones.

In this scenario, actionCustomerAccountAdd is just fine I guess. View more

 

PS. When you deploy custom hooks you need 3 steps:

  • You register the hook (a record is created in the respective table if does not exist already)
  • You define the module action for the specific hook
  • YOU CALL THE HOOK (either in custom file or in override of any kind) like here

It is natural that nothing happens because there is no hook call ;)

Edited by Kogkalidis (see edit history)
Link to comment
Share on other sites

On 7/13/2023 at 3:20 PM, Kogkalidis said:

First of all welcome to our world 😎

You should use the core hooks and only in cases that they do not fulfill your needs to deploy custom ones.

In this scenario, actionCustomerAccountAdd is just fine I guess. View more

 

PS. When you deploy custom hooks you need 3 steps:

  • You register the hook (a record is created in the respective table if does not exist already)
  • You define the module action for the specific hook
  • YOU CALL THE HOOK (either in custom file or in override of any kind) like here

It is natural that nothing happens because there is no hook call ;)

 

@Kogkalidis Thank you for the reply.  

I tried to build custom module and called the actionCustomerAccountAdd as below code. But this hook is not getting fired. 

 

 

Quote

 

<?php

use PrestaShop\PrestaShop\Core\Logger\PrestaShopLogger;

class CustomAuthModule extends Module
{
    public function __construct()
    {
        $this->name = 'customauthmodule';
        $this->tab = 'others';
        $this->version = '1.0.0';
        $this->author = 'Amila Jayashanka';
        $this->need_instance = 0;
        
        parent::__construct();

        $this->displayName = $this->l('Custom Authentication Module');
        $this->description = $this->l('Custom module for integrating centralized authentication API.');

        $this->ps_versions_compliancy = array('min' => '1.7', 'max' => _PS_VERSION_);
    }

    public function install()
    { 
        return parent::install() &&
        $this->registerHook('actionCustomerAccountAdd');
    }

    public function uninstall()
    { 
        return parent::uninstall();
    }

    public function hookActionCustomerAccountAdd($params)
    { 
        //$this->logger->info('Hook action customer account add fired');
         PrestaShopLogger::addLog('Debug: hookActionCustomerAccountAdd_customAuthenticationModulecalled'); 
        $apiResponse = CustomAuthAPI::authenticateUser($params['customer']);

        if ($apiResponse->success) {
        }
    }

 

 

Link to comment
Share on other sites

Quote

/classes/ObjectModel.php line 589 in my version (8.1.0) function add

Hook::exec('actionObject' . $this->getFullyQualifiedName() . 'AddBefore', ['object' => $this]);

Hook::exec('actionObject' . $this->getFullyQualifiedName() . 'AddAfter', ['object' => $this]);

So in our case should be hook "actionObjectCustomerAddAfter".

The previously posted works afte some sort of control, so probably you don't pass that control.

Let me know about your progress.

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
On 7/17/2023 at 1:33 PM, Kogkalidis said:

Hook::exec('actionObject' . $this->getFullyQualifiedName() . 'AddBefore', ['object' => $this]);

Hook::exec('actionObject' . $this->getFullyQualifiedName() . 'AddAfter', ['object' => $this]);

So in our case should be hook "actionObjectCustomerAddAfter".

The previously posted works afte some sort of control, so probably you don't pass that control.

Let me know about your progress.

 

 

<?php
 
use PrestaShop\PrestaShop\Core\Logger\LogManager;

class CustomAuthModule extends Module
{
    public function __construct()
    {
        $this->name = 'customauthmodule';
        $this->tab = 'others';
        $this->version = '1.0.0';
        $this->author = 'Amila Jayashanka';
        $this->need_instance = 0;
        
        parent::__construct();

        $this->displayName = $this->l('Custom Authentication Module');
        $this->description = $this->l('Custom module for integrating centralized authentication API.');

        $this->ps_versions_compliancy = array('min' => '1.7', 'max' => _PS_VERSION_);
    }

    public function install()
    { 
        return parent::install() &&
        $this->registerHook('actionObjectCustomerAddAfter');
    }

    public function uninstall()
    { 
        return parent::uninstall();
    } 

    public function hookActionObjectCustomerAddAfter($params)
    {    
        LogManager::addLog('hookActionObjectCustomerAddAfter called', LogLevel::INFO, null, 'CustomAuthModule');

        $apiResponse = CustomAuthAPI::authenticateUser($params['customer']);
 
        if ($apiResponse->success) {
            // User authentication successful 
            //$this->storeUserData($apiResponse->data, $params['customer']);

     
        } else {
            // User authentication failed 
            $errorMessage = $apiResponse->message;
            $this->context->controller->errors[] = $this->l($errorMessage);
            $this->context->controller->redirectWithNotifications('index.php?controller=authentication');
        }
    }

    private function storeUserData($apiData, $customerData)
    {
        // Store additional user data in PrestaShop 
    }
}

@Kogkalidis Sorry I was not well last few days. Today I tested with  actionObjectCustomerAddAfter.  After registration submitted, I'm getting  below error, but user has registered successfully in prestashop database. 

 

This page isn’t working

iptest.isimaga.com is currently unable to handle this request.

HTTP ERROR 500

 

even log also not getting hit. 

This is registration URL https://iptest.isimaga.com/registration

We are using Prestashop 8.0

 

Edited by jayashanka (see edit history)
Link to comment
Share on other sites

The issue lies 99% in your API.

You can clarify by commenting out the actual code in the hook function and put instead something basic. Example

Quote

return true;

If it works, means that the issue lies in the api. If you still get 500 the error is somewhere else.

Moreover are we 100% sure that there is no code execution AFTER the successful call which leads to 500? (Either PrestaShop side or API side)

Link to comment
Share on other sites

53 minutes ago, Kogkalidis said:

The issue lies 99% in your API.

You can clarify by commenting out the actual code in the hook function and put instead something basic. Example

If it works, means that the issue lies in the api. If you still get 500 the error is somewhere else.

Moreover are we 100% sure that there is no code execution AFTER the successful call which leads to 500? (Either PrestaShop side or API side)

@Kogkalidis Thank you.  you are correct, issue was in the code inside the hook. I was able to fix it. By the way I'm facing another issue that I can't capture the password inside "actionObjectCustomerAddAfter" hook.   

Is there any other alternative I can use.

My  purpose is, when a customer get register in prestashop, send username and password to our core system. 

Edited by jayashanka (see edit history)
Link to comment
Share on other sites

7 hours ago, Kogkalidis said:

Did you try actionObjectCustomerAddBefore ?

With the function we already have its obvious why you can't. The customer object has already been sent.

@Kogkalidis  Haven't tried actionObjectCustomerAddBefore hook.   I will try with that.

According to some prestashop articles we can't get the readable password in actionObjectCustomerAddAfter hook, because its get encrypted after the registration complete. 

Edited by jayashanka (see edit history)
Link to comment
Share on other sites

Hi.

And have you considered using JavaScript and calling ajax functions?
In JavaScript, you can intercept the submit form call and send the text from the password field to your ajax file.

 

E.g.:

custom-javascript.js

$(document).ready(function() {
    /* register form */
    var isRegisterPage = $('#registration');
    var isRegisterForm = $('#customer-form');

    /* checkout form */
    var isCheckoutPage = $('#checkout');
    var isGuestForm = $('#checkout-guest-form');

    var okRegister = 0;

    if (isRegisterPage.length && isRegisterForm.length) {
        // OK, is register page
        okRegister = 1;
    }

    if (isCheckoutPage.length && isRegisterForm.length && isGuestForm.hasClass('active')) {
        // OK, is register page
        okRegister = 1;
    }

    // checkout register tab
    $('[href=#checkout-guest-form]').click(function () {
        okRegister = 1;
    });

    // checkout login tab
    $('[href=#checkout-login-form]').click(function () {
        okRegister = 0;
    });

    isRegisterForm.submit(function (e) {
        if (e.result == true && okRegister == 1) {
          var pwd = $('#field-password').val();
          var email = $('#field-email').val();
          afterPostSubmitForm(email, pwd);
        }
    });
});

function afterPostSubmitForm(email, pwd) {
    $.ajax({
        type: "POST",
        url: '/modules/my_module/ajax.php',
        data:'action=afterCreateAccount&email='+email+'&pwd='+pwd,
        success: function(data){
            if (data !== ''){
                // OK
            } 
        }
    });
}

 

ajax.php

// uncomment <?php
header("Access-Control-Allow-Origin: *");

include('../../config/config.inc.php');
include('../../init.php');

$module_name = 'my_module';

$token = pSQL(Tools::encrypt($module_name.'/ajax.php'));
$token_url = pSQL(Tools::getValue('token'));

$db = Db::getInstance();

$module = Module::getInstanceByName($module_name);
if ($token != $token_url || !Module::isInstalled($module_name)) {
    echo($module->l('AJAX error'));
}

if ($module->active && Tools::getValue('action') == 'afterCreateAccount' && Tools::getValue('email') && Tools::getValue('pwd')) {
    // OK, data exists
    $response = '';

    $email = Tools::getValue('email');
    $pwd = Tools::getValue('pwd') 
    
    // call function on my_module
    $response = $module->newRegisteredCustomer($email, $pwd);

    echo $response;
}

 

my-module.php

public function hookActionFrontControllerSetMedia($params)
{
    $pages = array('order', 'registration ');

    if (in_array($this->context->controller->php_self, $pages)) {
         $this->context->controller->addJs(_PS_MODULE_DIR_.$this->name.'/views/front/js/custom-javascript.js'); 
        $ajax = $this->context->shop->getBaseURL(true).'modules/'.$this->name.'/ajax.php?token='.Tools::encrypt($this->name.'/ajax.php'); 
        $jsDef = [
            'ajax_my_module' => $ajax,
        ];
        Media::addJsDef($jsDef);
    } 
}

/* my function called in ajax */
public function newRegisteredCustomer($email, $pwd)
{
    $db = Db::getInstance();

    $getCustomerByEmail = $db->getValue('SELECT id_customer FROM '._DB_PREFIX_.'customer WHERE email = '."'".$email."'");

    if ($getCustomerByEmail) {
        $customer = new Customer((int)$getCustomerByEmail);
        $plainPassword = $pwd;

        // your function call API
        $apiResponse = CustomAuthAPI::authenticateUser($customer);

        if ($apiResponse->success) {
            return true;
        } else {
            return false;
        }
            
    }
}

 

Edited by ps8moduly.cz (see edit history)
Link to comment
Share on other sites

Sample module for PS 1.7.6.5 > and classic theme.

 

Works in administration:

  * create customer

  * update customer

 

Works in the front:

  * register customer

  * checkout register customer

  * edit customer in my-account

 

The function newRegisteredCustomer() in the module saves the data to a file for demonstration.

 

Module:

ps8mod_customerpwd.zip

 

 

 

  • Thanks 1
Link to comment
Share on other sites

22 hours ago, ps8moduly.cz said:

Hi.

And have you considered using JavaScript and calling ajax functions?
In JavaScript, you can intercept the submit form call and send the text from the password field to your ajax file.

 

E.g.:

custom-javascript.js

$(document).ready(function() {
    /* register form */
    var isRegisterPage = $('#registration');
    var isRegisterForm = $('#customer-form');

    /* checkout form */
    var isCheckoutPage = $('#checkout');
    var isGuestForm = $('#checkout-guest-form');

    var okRegister = 0;

    if (isRegisterPage.length && isRegisterForm.length) {
        // OK, is register page
        okRegister = 1;
    }

    if (isCheckoutPage.length && isRegisterForm.length && isGuestForm.hasClass('active')) {
        // OK, is register page
        okRegister = 1;
    }

    // checkout register tab
    $('[href=#checkout-guest-form]').click(function () {
        okRegister = 1;
    });

    // checkout login tab
    $('[href=#checkout-login-form]').click(function () {
        okRegister = 0;
    });

    isRegisterForm.submit(function (e) {
        if (e.result == true && okRegister == 1) {
          var pwd = $('#field-password').val();
          var email = $('#field-email').val();
          afterPostSubmitForm(email, pwd);
        }
    });
});

function afterPostSubmitForm(email, pwd) {
    $.ajax({
        type: "POST",
        url: '/modules/my_module/ajax.php',
        data:'action=afterCreateAccount&email='+email+'&pwd='+pwd,
        success: function(data){
            if (data !== ''){
                // OK
            } 
        }
    });
}

 

ajax.php

// uncomment <?php
header("Access-Control-Allow-Origin: *");

include('../../config/config.inc.php');
include('../../init.php');

$module_name = 'my_module';

$token = pSQL(Tools::encrypt($module_name.'/ajax.php'));
$token_url = pSQL(Tools::getValue('token'));

$db = Db::getInstance();

$module = Module::getInstanceByName($module_name);
if ($token != $token_url || !Module::isInstalled($module_name)) {
    echo($module->l('AJAX error'));
}

if ($module->active && Tools::getValue('action') == 'afterCreateAccount' && Tools::getValue('email') && Tools::getValue('pwd')) {
    // OK, data exists
    $response = '';

    $email = Tools::getValue('email');
    $pwd = Tools::getValue('pwd') 
    
    // call function on my_module
    $response = $module->newRegisteredCustomer($email, $pwd);

    echo $response;
}

 

my-module.php

public function hookActionFrontControllerSetMedia($params)
{
    $pages = array('order', 'registration ');

    if (in_array($this->context->controller->php_self, $pages)) {
         $this->context->controller->addJs(_PS_MODULE_DIR_.$this->name.'/views/front/js/custom-javascript.js'); 
        $ajax = $this->context->shop->getBaseURL(true).'modules/'.$this->name.'/ajax.php?token='.Tools::encrypt($this->name.'/ajax.php'); 
        $jsDef = [
            'ajax_my_module' => $ajax,
        ];
        Media::addJsDef($jsDef);
    } 
}

/* my function called in ajax */
public function newRegisteredCustomer($email, $pwd)
{
    $db = Db::getInstance();

    $getCustomerByEmail = $db->getValue('SELECT id_customer FROM '._DB_PREFIX_.'customer WHERE email = '."'".$email."'");

    if ($getCustomerByEmail) {
        $customer = new Customer((int)$getCustomerByEmail);
        $plainPassword = $pwd;

        // your function call API
        $apiResponse = CustomAuthAPI::authenticateUser($customer);

        if ($apiResponse->success) {
            return true;
        } else {
            return false;
        }
            
    }
}

 

@ps8moduly.cz Thank you so much.  

 

What I really need to do is, I have a core system developed using wordpress and I'm developing the multi vendor system using prestashop. 

1. All the users in core system, should be able to login to prestashop multi vendor system using their existing username and password.

2. New customers who get register from prestashop multi vendor system, should be saved in core system and be able to login to core system as well. 

Something similar to SSO concept. 

 

Therefore in the CustomAuth API handles the user credentials communication part between core system and the prestashop multi vendor system. 

Edited by jayashanka (see edit history)
Link to comment
Share on other sites

Hi.

Thank you for the explanation.

Basically everything you need is in the sample module.

Sending a new registration to several Prestashop e-shops is not a problem, as well as creating an encrypted password based on the cookie hash from a plain password.

It is nothing complicated, max. 4 hours of programming, even with the fact that if the password is changed in one e-shop, it will be changed in all e-shops.

Link to comment
Share on other sites

On 8/1/2023 at 1:39 PM, ps8moduly.cz said:

Hi.

Thank you for the explanation.

Basically everything you need is in the sample module.

Sending a new registration to several Prestashop e-shops is not a problem, as well as creating an encrypted password based on the cookie hash from a plain password.

It is nothing complicated, max. 4 hours of programming, even with the fact that if the password is changed in one e-shop, it will be changed in all e-shops.

@ps8moduly.cz thanks alot. Its really helpful. I have checked it and there are some input fields need to update with latest registration form. So I did it and tried. But after successful registration it didn't create any  file with response in the module folder.  I'm checking on that.  I'm using prestashop 8.0. 

Link to comment
Share on other sites

Hi.

The problem will be that the sample module is for the classic theme.

It would be useful to put console.log() in javascript to see if data is being sent to ajax.php.

It would also be a good idea to turn on debug mode so that the error is displayed in the console. So in front-customer.js insert the feedback display:

function afterPostSubmitForm(email, pwd) {

    console.log(email);
    console.log(pwd);

    $.ajax({
        type: "POST",
        url: ajax_ps8mod_customerpwd,
        data:'action=afterCreateAccount&email='+email+'&pwd='+pwd,
        success: function(data){
            console.log(data);
            
            if (data !== ''){
                // OK
            } 
        }
    });
}

 

and update ajax.php

if ($module->active && Tools::getValue('action') == 'afterCreateAccount' && Tools::getValue('email') && Tools::getValue('pwd')) {
    // OK, data exists
    $response = '';
    $idCustomer = 0;

    $email = Tools::getValue('email');
    $pwd = Tools::getValue('pwd');
    $idCustomer = $context->customer->id; 

    if ($idCustomer) {
        $response = $module->newRegisteredCustomer($email, $pwd, $idCustomer);
    } else  {
        $response = $module->l('Customer ID not exists');
    }

    echo $response;
}

 

In the console I can see that the data from the form is being sent correctly to ajax.php, but no response.

obrazek.png.b1fa73be539118c7154b97a37a59fffb.png

Edited by ps8moduly.cz (see edit history)
Link to comment
Share on other sites

22 hours ago, ps8moduly.cz said:

Hi.

The problem will be that the sample module is for the classic theme.

It would be useful to put console.log() in javascript to see if data is being sent to ajax.php.

It would also be a good idea to turn on debug mode so that the error is displayed in the console. So in front-customer.js insert the feedback display:

function afterPostSubmitForm(email, pwd) {

    console.log(email);
    console.log(pwd);

    $.ajax({
        type: "POST",
        url: ajax_ps8mod_customerpwd,
        data:'action=afterCreateAccount&email='+email+'&pwd='+pwd,
        success: function(data){
            console.log(data);
            
            if (data !== ''){
                // OK
            } 
        }
    });
}

 

and update ajax.php

if ($module->active && Tools::getValue('action') == 'afterCreateAccount' && Tools::getValue('email') && Tools::getValue('pwd')) {
    // OK, data exists
    $response = '';
    $idCustomer = 0;

    $email = Tools::getValue('email');
    $pwd = Tools::getValue('pwd');
    $idCustomer = $context->customer->id; 

    if ($idCustomer) {
        $response = $module->newRegisteredCustomer($email, $pwd, $idCustomer);
    } else  {
        $response = $module->l('Customer ID not exists');
    }

    echo $response;
}

 

In the console I can see that the data from the form is being sent correctly to ajax.php, but no response.

obrazek.png.b1fa73be539118c7154b97a37a59fffb.png

@ps8moduly.cz I tried this, seems like customer id not receiving in the context. 

Link to comment
Share on other sites

Hi.

Add $db to the beginning of ajax.php

$db = Db::getInstance();

// add
$context = Context::getContext();

Upload the whole ajax.php code for me here if you edited it.

 

update ajax.php

header("Access-Control-Allow-Origin: *");

include('../../../config/config.inc.php');
include('../../../init.php');

$module_name = 'ps8mod_customerpwd';

$token = pSQL(Tools::encrypt($module_name.'/ajax.php'));
$token_url = pSQL(Tools::getValue('token'));

$db = Db::getInstance();

$context = Context::getContext();

$module = Module::getInstanceByName($module_name);
if ($token != $token_url || !Module::isInstalled($module_name)) {
    echo($module->l('AJAX error'));
}

if ($module->active && Tools::getValue('action') == 'afterCreateAccount' && Tools::getValue('email') && Tools::getValue('pwd')) {
    // OK, data exists
    $response = '';
    $idCustomer = 0;

    $email = Tools::getValue('email');
    $pwd = Tools::getValue('pwd');
    $idCustomer = $context->customer->id; 

    if ($idCustomer) {
        $response = $module->newRegisteredCustomer($email, $pwd, $idCustomer);
    } else  {
        $response = $module->l('Customer ID not exists');
    }

    echo $response;
}

 

Edited by ps8moduly.cz (see edit history)
Link to comment
Share on other sites

5 hours ago, ps8moduly.cz said:

Hi.

Add $db to the beginning of ajax.php

$db = Db::getInstance();

// add
$context = Context::getContext();

Upload the whole ajax.php code for me here if you edited it.

 

update ajax.php

header("Access-Control-Allow-Origin: *");

include('../../../config/config.inc.php');
include('../../../init.php');

$module_name = 'ps8mod_customerpwd';

$token = pSQL(Tools::encrypt($module_name.'/ajax.php'));
$token_url = pSQL(Tools::getValue('token'));

$db = Db::getInstance();

$context = Context::getContext();

$module = Module::getInstanceByName($module_name);
if ($token != $token_url || !Module::isInstalled($module_name)) {
    echo($module->l('AJAX error'));
}

if ($module->active && Tools::getValue('action') == 'afterCreateAccount' && Tools::getValue('email') && Tools::getValue('pwd')) {
    // OK, data exists
    $response = '';
    $idCustomer = 0;

    $email = Tools::getValue('email');
    $pwd = Tools::getValue('pwd');
    $idCustomer = $context->customer->id; 

    if ($idCustomer) {
        $response = $module->newRegisteredCustomer($email, $pwd, $idCustomer);
    } else  {
        $response = $module->l('Customer ID not exists');
    }

    echo $response;
}

 

 

 

 @ps8moduly.cz

ajax.php 

<?php
/**
* 2010-2023 Daniel Tengler
*
* NOTICE OF LICENSE
*
* All right is reserved,
* Please go through this link for complete license : https://ps8moduly.cz
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future. If you wish to customize this module for your
* needs please refer to https://ps8moduly.cz
*
*  @author    Daniel Tengler <[email protected]>
*  @copyright 2010-2023 Daniel Tengler
*  @license   https://ps8moduly.cz
*/
header("Access-Control-Allow-Origin: *");

include('../../../config/config.inc.php');
include('../../../init.php');

$module_name = 'ps8mod_customerpwd';

$token = pSQL(Tools::encrypt($module_name.'/ajax.php'));
$token_url = pSQL(Tools::getValue('token'));

$db = Db::getInstance();

$context = Context::getContext();

$module = Module::getInstanceByName($module_name);
if ($token != $token_url || !Module::isInstalled($module_name)) {
    echo($module->l('AJAX error'));
}

if ($module->active && Tools::getValue('action') == 'afterCreateAccount' && Tools::getValue('email') && Tools::getValue('pwd')) {
    // OK, data exists
    $response = '';
    $idCustomer = 0;

    $email = Tools::getValue('email');
    $pwd = Tools::getValue('pwd');
    $idCustomer = $context->customer->id; 

    //$response = $module->newRegisteredCustomer($email, $pwd, $idCustomer);

    if ($idCustomer) {
        $response = $module->newRegisteredCustomer($email, $pwd, $idCustomer);
    } else  {
        $response = $module->l('Customer ID not exists');
    }

    echo $response;
}

 

Link to comment
Share on other sites

In the console I can see the response from the module and the customer data correctly.

a:9:{s:9:"firstname";s:7:"scarlet";s:8:"lastname";s:8:"johansan";s:5:"email";s:18:"[email protected]";s:8:"password";s:60:"$2y$10$vT7lJl6p67gfZq4Kt5j3Ye2.R/RTnWmvC1c1wEsxi6TLwSN6gfHg6";s:14:"plain_password";s:15:"AAAbbb@1234$$$$";s:7:"company";s:0:"";s:5:"siret";s:0:"";s:3:"ape";s:0:"";s:8:"is_guest";s:1:"0";}a:9:{s:9:"firstname";s:7:"scarlet";s:8:"lastname";s:8:"johansan";s:5:"email";s:18:"[email protected]";s:8:"password";s:60:"$2y$10$vT7lJl6p67gfZq4Kt5j3Ye2.R/RTnWmvC1c1wEsxi6TLwSN6gfHg6";s:14:"plain_password";s:11:"Abcd@1234$$";s:7:"company";s:0:"";s:5:"siret";s:0:"";s:3:"ape";s:0:"";s:8:"is_guest";s:1:"0";}a:9:{s:9:"firstname";s:4:"Test";s:8:"lastname";s:6:"Tester";s:5:"email";s:14:"[email protected]";s:8:"password";s:60:"$2y$10$VGPDPJv.TMc/1K/RzuntueKWyhD/haVygAXconepjGpVVrSeNsjIK";s:14:"plain_password";s:9:"undefined";s:7:"company";s:0:"";s:5:"siret";s:0:"";s:3:"ape";s:0:"";s:8:"is_guest";s:1:"0";}

 

Edited by ps8moduly.cz (see edit history)
Link to comment
Share on other sites

14 hours ago, ps8moduly.cz said:

In the console I can see the response from the module and the customer data correctly.

a:9:{s:9:"firstname";s:7:"scarlet";s:8:"lastname";s:8:"johansan";s:5:"email";s:18:"[email protected]";s:8:"password";s:60:"$2y$10$vT7lJl6p67gfZq4Kt5j3Ye2.R/RTnWmvC1c1wEsxi6TLwSN6gfHg6";s:14:"plain_password";s:15:"AAAbbb@1234$$$$";s:7:"company";s:0:"";s:5:"siret";s:0:"";s:3:"ape";s:0:"";s:8:"is_guest";s:1:"0";}a:9:{s:9:"firstname";s:7:"scarlet";s:8:"lastname";s:8:"johansan";s:5:"email";s:18:"[email protected]";s:8:"password";s:60:"$2y$10$vT7lJl6p67gfZq4Kt5j3Ye2.R/RTnWmvC1c1wEsxi6TLwSN6gfHg6";s:14:"plain_password";s:11:"Abcd@1234$$";s:7:"company";s:0:"";s:5:"siret";s:0:"";s:3:"ape";s:0:"";s:8:"is_guest";s:1:"0";}a:9:{s:9:"firstname";s:4:"Test";s:8:"lastname";s:6:"Tester";s:5:"email";s:14:"[email protected]";s:8:"password";s:60:"$2y$10$VGPDPJv.TMc/1K/RzuntueKWyhD/haVygAXconepjGpVVrSeNsjIK";s:14:"plain_password";s:9:"undefined";s:7:"company";s:0:"";s:5:"siret";s:0:"";s:3:"ape";s:0:"";s:8:"is_guest";s:1:"0";}

 

@ps8moduly.cz you are getting this customer object because I have hardcoded a customerId to test remaining code part. Scarlet Johansan customer's customerId 72.  Let me remove that hardcoded value. 

After remove it, customer object doesn't receive in this context. 

And if you refer to that customer data printed in console, CustomerId is missing in that object.

a:9:{s:9:"firstname";s:7:"scarlet";s:8:"lastname";s:8:"johansan";s:5:"email";s:18:"[email protected]";s:8:"password";s:60:"$2y$10$vT7lJl6p67gfZq4Kt5j3Ye2.R/RTnWmvC1c1wEsxi6TLwSN6gfHg6";s:14:"plain_password";s:15:"AAAbbb@1234$$$$";s:7:"company";s:0:"";s:5:"siret";s:0:"";s:3:"ape";s:0:"";s:8:"is_guest";s:1:"0";}a:9:{s:9:"firstname";s:7:"scarlet";s:8:"lastname";s:8:"johansan";s:5:"email";s:18:"[email protected]";s:8:"password";s:60:"$2y$10$vT7lJl6p67gfZq4Kt5j3Ye2.R/RTnWmvC1c1wEsxi6TLwSN6gfHg6";s:14:"plain_password";s:11:"Abcd@1234$$";s:7:"company";s:0:"";s:5:"siret";s:0:"";s:3:"ape";s:0:"";s:8:"is_guest";s:1:"0";}a:9:{s:9:"firstname";s:4:"Test";s:8:"lastname";s:6:"Tester";s:5:"email";s:14:"[email protected]";s:8:"password";s:60:"$2y$10$VGPDPJv.TMc/1K/RzuntueKWyhD/haVygAXconepjGpVVrSeNsjIK";s:14:"plain_password";s:9:"undefined";s:7:"company";s:0:"";s:5:"siret";s:0:"";s:3:"ape";s:0:"";s:8:"is_guest";s:1:"0";}

 

    $currentCustomer = $context->customer; 
    //$response = $module->newRegisteredCustomer($email, $pwd, $idCustomer);

    if ($idCustomer) {
        $response = $module->newRegisteredCustomer($email, $pwd, $idCustomer);
    } else  {
        $response = $module->l(serialize($currentCustomer));
    }

 

Edited by jayashanka (see edit history)
Link to comment
Share on other sites

22 hours ago, jayashanka said:

@ps8moduly.cz you are getting this customer object because I have hardcoded a customerId to test remaining code part. Scarlet Johansan customer's customerId 72.  Let me remove that hardcoded value. 

After remove it, customer object doesn't receive in this context. 

And if you refer to that customer data printed in console, CustomerId is missing in that object.

a:9:{s:9:"firstname";s:7:"scarlet";s:8:"lastname";s:8:"johansan";s:5:"email";s:18:"[email protected]";s:8:"password";s:60:"$2y$10$vT7lJl6p67gfZq4Kt5j3Ye2.R/RTnWmvC1c1wEsxi6TLwSN6gfHg6";s:14:"plain_password";s:15:"AAAbbb@1234$$$$";s:7:"company";s:0:"";s:5:"siret";s:0:"";s:3:"ape";s:0:"";s:8:"is_guest";s:1:"0";}a:9:{s:9:"firstname";s:7:"scarlet";s:8:"lastname";s:8:"johansan";s:5:"email";s:18:"[email protected]";s:8:"password";s:60:"$2y$10$vT7lJl6p67gfZq4Kt5j3Ye2.R/RTnWmvC1c1wEsxi6TLwSN6gfHg6";s:14:"plain_password";s:11:"Abcd@1234$$";s:7:"company";s:0:"";s:5:"siret";s:0:"";s:3:"ape";s:0:"";s:8:"is_guest";s:1:"0";}a:9:{s:9:"firstname";s:4:"Test";s:8:"lastname";s:6:"Tester";s:5:"email";s:14:"[email protected]";s:8:"password";s:60:"$2y$10$VGPDPJv.TMc/1K/RzuntueKWyhD/haVygAXconepjGpVVrSeNsjIK";s:14:"plain_password";s:9:"undefined";s:7:"company";s:0:"";s:5:"siret";s:0:"";s:3:"ape";s:0:"";s:8:"is_guest";s:1:"0";}

 

    $currentCustomer = $context->customer; 
    //$response = $module->newRegisteredCustomer($email, $pwd, $idCustomer);

    if ($idCustomer) {
        $response = $module->newRegisteredCustomer($email, $pwd, $idCustomer);
    } else  {
        $response = $module->l(serialize($currentCustomer));
    }

 

 

@ps8moduly.cz after I removed the hardcoded value, I'm getting below result in customer object.

 

{&quot;id&quot;:null,&quot;id_shop&quot;:null,&quot;id_shop_group&quot;:null,&quot;secure_key&quot;:null,&quot;note&quot;:null,&quot;id_gender&quot;:0,&quot;id_default_group&quot;:1,&quot;id_lang&quot;:null,&quot;lastname&quot;:null,&quot;firstname&quot;:null,&quot;birthday&quot;:null,&quot;email&quot;:null,&quot;newsletter&quot;:null,&quot;ip_registration_newsletter&quot;:null,&quot;newsletter_date_add&quot;:null,&quot;optin&quot;:null,&quot;website&quot;:null,&quot;company&quot;:null,&quot;siret&quot;:null,&quot;ape&quot;:null,&quot;outstanding_allow_amount&quot;:0,&quot;show_public_prices&quot;:0,&quot;id_risk&quot;:null,&quot;max_payment_days&quot;:0,&quot;passwd&quot;:null,&quot;last_passwd_gen&quot;:null,&quot;active&quot;:true,&quot;is_guest&quot;:false,&quot;deleted&quot;:false,&quot;date_add&quot;:null,&quot;date_upd&quot;:null,&quot;years&quot;:null,&quot;days&quot;:null,&quot;months&quot;:null,&quot;geoloc_id_country&quot;:null,&quot;geoloc_id_state&quot;:null,&quot;geoloc_postcode&quot;:null,&quot;logged&quot;:false,&quot;id_guest&quot;:&quot;5394&quot;,&quot;groupBox&quot;:null,&quot;reset_password_token&quot;:null,&quot;reset_password_validity&quot;:null,&quot;id_shop_list&quot;:[],&quot;force_id&quot;:false}"

 

Link to comment
Share on other sites

@ps8moduly.cz below is the context and its seems customer object properties are null.

 

{
"context=={";cart";:{";id";:null,";id_shop_group";:1,";id_shop";:1,";id_address_delivery";:0,";id_address_invoice";:0,";id_currency";:3,";id_customer";:null,";id_guest";:5396,";id_lang";:1,";recyclable";:false,";gift";:false,";gift_message";:null,";mobile_theme";:null,";date_add";:null,";secure_key";:null,";id_carrier";:0,";date_upd";:null,";checkedTos";:false,";pictures";:null,";textFields";:null,";delivery_option";:null,";allow_seperated_package";:false,";id_shop_list";:[],";force_id";:false},";customer";:{";id";:null,";id_shop";:null,";id_shop_group";:null,";secure_key";:null,";note";:null,";id_gender";:0,";id_default_group";:1,";id_lang";:null,";lastname";:null,";firstname";:null,";birthday";:null,";email";:null,";newsletter";:null,";ip_registration_newsletter";:null,";newsletter_date_add";:null,";optin";:null,";website";:null,";company";:null,";siret";:null,";ape";:null,";outstanding_allow_amount";:0,";show_public_prices";:0,";id_risk";:null,";max_payment_days";:0,";passwd";:null,";last_passwd_gen";:null,";active";:true,";is_guest";:false,";deleted";:false,";date_add";:null,";date_upd";:null,";years";:null,";days";:null,";months";:null,";geoloc_id_country";:null,";geoloc_id_state";:null,";geoloc_postcode";:null,";logged";:false,";id_guest";:";5396";,";groupBox";:null,";reset_password_token";:null,";reset_password_validity";:null,";id_shop_list";:[],";force_id";:false},";cookie";:{},";session";:{},";link";:{";protocol_link";:";https://";,";protocol_content";:";https://";},";country";:{";id";:195,";id_zone";:";3";,";id_currency";:";0";,";iso_code";:";LK";,";call_prefix";:";94";,";name";:";Sri Lanka";,";contains_states";:";0";,";need_identification_number";:";0";,";need_zip_code";:";1";,";zip_code_format";:";NNNNN";,";display_tax_label";:";1";,";active";:";1";,";id_shop_list";:[],";force_id";:false},";employee";:null,";controller";:{";warning";:[],";success";:[],";info";:[],";iso";:null,";orderBy";:null,";orderWay";:null,";p";:null,";n";:null,";auth";:false,";guestAllowed";:false,";authRedirection";:false,";ssl";:true,";nb_items_per_page";:null,";objectPresenter";:{},";cart_presenter";:{},";page_name";:null,";css_files";:[],";js_files";:[],";ajax";:false,";controller_type";:";front";,";php_self";:null,";errors";:[],";layout";:null},";override_controller_name_for_translations";:null,";language";:{";id";:1,";name";:";English (English)";,";iso_code";:";en";,";locale";:";en-US";,";language_code";:";en-us";,";date_format_lite";:";m/d/Y";,";date_format_full";:";m/d/Y H:i:s";,";is_rtl";:";0";,";active";:";1";,";id_shop_list";:[],";force_id";:false},";currency";:{";id";:3,";name";:";Sri Lankan Rupee";,";iso_code";:";LKR";,";iso_code_num";:";144";,";numeric_iso_code";:";144";,";conversion_rate";:";331.000000";,";deleted";:";0";,";unofficial";:";0";,";modified";:";0";,";active";:";1";,";sign";:";Rs";,";symbol";:";Rs";,";format";:null,";blank";:1,";decimals";:1,";precision";:";2";,";pattern";:{";1";:";";},";prefix";:null,";suffix";:null,";id_shop_list";:[],";force_id";:false},";currentLocale";:{},";tab";:null,";shop";:{";id_shop_group";:";1";,";id_category";:";2";,";theme_name";:";vinova_nuranium_marketplace";,";name";:";iPlus Shop";,";color";:";";,";active";:";1";,";deleted";:";0";,";physical_uri";:";/";,";virtual_uri";:";";,";domain";:";iptest.isimaga.com";,";domain_ssl";:";iptest.isimaga.com";,";address";:null,";theme";:{},";id";:1,";id_shop_list";:[],";force_id";:false},";tmpOldShop";:null,";smarty";:{";auto_literal";:true,";error_unassigned";:false,";use_include_path";:false,";_templateDirNormalized";:true,";_joined_template_dir";:";/home/iplus/domains/iptest.isimaga.com/public_html/themes/vinova_nuranium_marketplace/templates/";,";_configDirNormalized";:false,";_joined_config_dir";:null,";default_template_handler_func";:null,";default_config_handler_func";:null,";default_plugin_handler_func";:null,";_compileDirNormalized";:true,";_pluginsDirNormalized";:false,";_cacheDirNormalized";:true,";force_compile";:true,";use_sub_dirs";:true,";allow_ambiguous_resources";:false,";merge_compiled_includes";:false,";extends_recursion";:true,";force_cache";:false,";left_delimiter";:";{";,";right_delimiter";:";}";,";literals";:[],";security_class";:";Smarty_Security";,";security_policy";:null,";allow_php_templates";:false,";debugging";:false,";debugging_ctrl";:";NONE";,";smarty_debug_id";:";SMARTY_DEBUG";,";debug_tpl";:";/home/iplus/domains/iptest.isimaga.com/public_html/themes/debug.tpl";,";error_reporting";:null,";config_overwrite";:true,";config_booleanize";:true,";config_read_hidden";:false,";compile_locking";:true,";cache_locking";:false,";locking_timeout";:10,";default_resource_type";:";file";,";caching_type";:";file";,";default_config_type";:";file";,";cache_modified_check";:false,";registered_plugins";:{";function";:{";widget";:[[{},";smartyWidget";],true,[]],";render";:[[{},";smartyRender";],true,[]],";form_field";:[[{},";smartyFormField";],true,[]],";l";:[";smartyTranslate";,true,[]],";hook";:[[{},";smartyHook";],true,[]],";dateFormat";:[[{},";dateFormat";],true,[]],";url";:[[{},";getUrlSmarty";],true,[]]},";block";:{";widget_block";:[[{},";smartyWidgetBlock";],true,[]]},";modifier";:{";escape";:[[{},";smartyEscape";],true,[]],";truncate";:[[{},";smarty_modifier_truncate";],true,[]],";json_encode";:[[{},";json_encode";],true,[]],";json_decode";:[[{},";json_decode";],true,[]],";boolval";:[[{},";boolval";],true,[]],";cleanHtml";:[[{},";smartyCleanHtml";],true,[]],";classname";:[[{},";smartyClassname";],true,[]],";classnames";:[[{},";smartyClassnames";],true,[]],";addcslashes";:[[{},";addcslashes";],true,[]],";addslashes";:[[{},";addslashes";],true,[]],";date";:[[{},";date";],true,[]],";end";:[[{},";end";],true,[]],";floatval";:[[{},";floatval";],true,[]],";htmlentities";:[[{},";htmlentities";],true,[]],";intval";:[[{},";intval";],true,[]],";mt_rand";:[[{},";mt_rand";],true,[]],";rand";:[[{},";rand";],true,[]],";strtolower";:[[{},";strtolower";],true,[]],";str_replace";:[[{},";str_replace";],true,[]],";strval";:[[{},";strval";],true,[]],";trim";:[[{},";trim";],true,[]],";ucfirst";:[[{},";ucfirst";],true,[]],";urlencode";:[[{},";urlencode";],true,[]],";htmlspecialchars";:[[{},";htmlspecialchars";],true,[]]}},";registered_objects";:[],";registered_classes";:[],";registered_filters";:[],";registered_resources";:{";module";:{";paths";:{";theme";:";/home/iplus/domains/iptest.isimaga.com/public_html/themes/vinova_nuranium_marketplace/modules/";,";modules";:";/home/iplus/domains/iptest.isimaga.com/public_html/modules/";},";isAdmin";:false,";uncompiled";:false,";recompiled";:false,";hasCompiledHandler";:false},";parent";:{";paths";:[],";uncompiled";:false,";recompiled";:false,";hasCompiledHandler";:false}},";registered_cache_resources";:[],";autoload_filters";:[],";default_modifiers";:[],";escape_html";:true,";start_time";:1691721218.080294,";_current_file";:null,";_parserdebug";:false,";_objType";:1,";_debug";:null,";cache_id";:null,";compile_id";:null,";caching";:0,";compile_check";:1,";cache_lifetime";:3600,";tplFunctio…"}

 

Link to comment
Share on other sites

JS update (added setTimeout)

    $('button[data-link-action="save-customer"]').click(function () {

        if (ajax_page_name == 'registration') {
            var email = $('input[name$="email"]').val();
            var pwd = $('input[name$="password"]').val();
        }

        if (ajax_page_name == 'identity') {
            var email = $('#field-email').val();
            if ($('#field-new_password').length) {
                var pwd = $('#field-new_password').val();
            } else  {
                var pwd = $('#field-password').val();
            }
        }
        setTimeout(function() { 
            afterPostSubmitForm(email, pwd);
        }, 1000);
    });

    $('button[data-link-action="register-new-customer"]').click(function () {

        if (ajax_page_name == 'registration') {
            var email = $('#field-email').val();
            var pwd = $('#field-password').val();
        }
        setTimeout(function() { 
            afterPostSubmitForm(email, pwd);
        }, 1000);
    });

 

  • Thanks 1
Link to comment
Share on other sites

@ps8moduly.cz I tried with time out, context has data except customer object. 

and if you see below context, it has wrong customer data which was used in a previous registration. 



a:9:{s:9:"firstname";s:7:"scarlet";s:8:"lastname";s:8:"johansan";s:5:"email";s:18:"[email protected]";s:8:"password";s:60:"$2y$10$vT7lJl6p67gfZq4Kt5j3Ye2.R/RTnWmvC1c1wEsxi6TLwSN6gfHg6";s:14:"plain_password";s:15:"AAAbbb@1234$$$$";s:7:"company";s:0:"";s:5:"siret";s:0:"";s:3:"ape";s:0:"";s:8:"is_guest";s:1:"0";}a:9:{s:9:"firstname";s:7:"scarlet";s:8:"lastname";s:8:"johansan";s:5:"email";s:18:"[email protected]";s:8:"password";s:60:"$2y$10$vT7lJl6p67gfZq4Kt5j3Ye2.R/RTnWmvC1c1wEsxi6TLwSN6gfHg6";s:14:"plain_password";s:11:"Abcd@1234$$";s:7:"company";s:0:"";s:5:"siret";s:0:"";s:3:"ape";s:0:"";s:8:"is_guest";s:1:"0";}a:9:{s:9:"firstname";s:4:"Test";s:8:"lastname";s:6:"Tester";s:5:"email";s:14:"[email protected]";s:8:"password";s:60:"$2y$10$VGPDPJv.TMc/1K/RzuntueKWyhD/haVygAXconepjGpVVrSeNsjIK";s:14:"plain_password";s:9:"undefined";s:7:"company";s:0:"";s:5:"siret";s:0:"";s:3:"ape";s:0:"";s:8:"is_guest";s:1:"0";}{"cart":{"id":null,"id_shop_group":1,"id_shop":1,"id_address_delivery":0,"id_address_invoice":0,"id_currency":3,"id_customer":null,"id_guest":5431,"id_lang":1,"recyclable":false,"gift":false,"gift_message":null,"mobile_theme":null,"date_add":null,"secure_key":null,"id_carrier":0,"date_upd":null,"checkedTos":false,"pictures":null,"textFields":null,"delivery_option":null,"allow_seperated_package":false,"id_shop_list":[],"force_id":false},"customer":{"id":null,"id_shop":null,"id_shop_group":null,"secure_key":null,"note":null,"id_gender":0,"id_default_group":1,"id_lang":null,"lastname":null,"firstname":null,"birthday":null,"email":null,"newsletter":null,"ip_registration_newsletter":null,"newsletter_date_add":null,"optin":null,"website":null,"company":null,"siret":null,"ape":null,"outstanding_allow_amount":0,"show_public_prices":0,"id_risk":null,"max_payment_days":0,"passwd":null,"last_passwd_gen":null,"active":true,"is_guest":false,"deleted":false,"date_add":null,"date_upd":null,"years":null,"days":null,"months":null,"geoloc_id_country":null,"geoloc_id_state":null,"geoloc_postcode":null,"logged":false,"id_guest":"5431","groupBox":null,"reset_password_token":null,"reset_password_validity":null,"id_shop_list":[],"force_id":false},"cookie":{},"session":{},"link":{"protocol_link":"https:\/\/","protocol_content":"https:\/\/"},"country":{"id":195,"id_zone":"3","id_currency":"0","iso_code":"LK","call_prefix":"94","name":"Sri Lanka","contains_states":"0","need_identification_number":"0","need_zip_code":"1","zip_code_format":"NNNNN","display_tax_label":"1","active":"1","id_shop_list":[],"force_id":false},"employee":null,"controller":{"warning":[],"success":[],"info":[],"iso":null,"orderBy":null,"orderWay":null,"p":null,"n":null,"auth":false,"guestAllowed":false,"authRedirection":false,"ssl":true,"nb_items_per_page":null,"objectPresenter":{},"cart_presenter":{},"page_name":null,"css_files":[],"js_files":[],"ajax":false,"controller_type":"front","php_self":null,"errors":[],"layout":null},"override_controller_name_for_translations":null,"language":{"id":1,"name":"English (English)","iso_code":"en","locale":"en-US","language_code":"en-us","date_format_lite":"m\/d\/Y","date_format_full":"m\/d\/Y H:i:s","is_rtl":"0","active":"1","id_shop_list":[],"force_id":false},"currency":{"id":3,"name":"Sri Lankan Rupee","iso_code":"LKR","iso_code_num":"144","numeric_iso_code":"144","conversion_rate":"331.000000","deleted":"0","unofficial":"0","modified":"0","active":"1","sign":"Rs","symbol":"Rs","format":null,"blank":1,"decimals":1,"precision":"2","pattern":{"1":""},"prefix":null,"suffix":null,"id_shop_list":[],"force_id":false},"currentLocale":{},"tab":null,"shop":{"id_shop_group":"1","id_category":"2","theme_name":"vinova_nuranium_marketplace","name":"iPlus Shop","color":"","active":"1","deleted":"0","physical_uri":"\/","virtual_uri":"","domain":"iptest.isimaga.com","domain_ssl":"iptest.isimaga.com","address":null,"theme":{},"id":1,"id_shop_list":[],"force_id":false},"tmpOldShop":null,"smarty":{"auto_literal":true,"error_unassigned":false,"use_include_path":false,"_templateDirNormalized":true,"_joined_template_dir":"\/home\/iplus\/domains\/iptest.isimaga.com\/public_html\/themes\/vinova_nuranium_marketplace\/templates\/","_configDirNormalized":false,"_joined_config_dir":null,"default_template_handler_func":null,"default_config_handler_func":null,"default_plugin_handler_func":null,"_compileDirNormalized":true,"_pluginsDirNormalized":false,"_cacheDirNormalized":true,"force_compile":true,"use_sub_dirs":true,"allow_ambiguous_resources":false,"merge_compiled_includes":false,"extends_recursion":true,"force_cache":false,"left_delimiter":"{","right_delimiter":"}","literals":[],"security_class":"Smarty_Security","security_policy":null,"allow_php_templates":false,"debugging":false,"debugging_ctrl":"NONE","smarty_debug_id":"SMARTY_DEBUG","debug_tpl":"\/home\/iplus\/domains\/iptest.isimaga.com\/public_html\/themes\/debug.tpl","error_reporting":null,"config_overwrite":true,"config_booleanize":true,"config_read_hidden":false,"compile_locking":true,"cache_locking":false,"locking_timeout":10,"default_resource_type":"file","caching_type":"file","default_config_type":"file","cache_modified_check":false,"registered_plugins":{"function":{"widget":[[{},"smartyWidget"],true,[]],"render":[[{},"smartyRender"],true,[]],"form_field":[[{},"smartyFormField"],true,[]],"l":["smartyTranslate",true,[]],"hook":[[{},"smartyHook"],true,[]],"dateFormat":[[{},"dateFormat"],true,[]],"url":[[{},"getUrlSmarty"],true,[]]},"block":{"widget_block":[[{},"smartyWidgetBlock"],true,[]]},"modifier":{"escape":[[{},"smartyEscape"],true,[]],"truncate":[[{},"smarty_modifier_truncate"],true,[]],"json_encode":[[{},"json_encode"],true,[]],"json_decode":[[{},"json_decode"],true,[]],"boolval":[[{},"boolval"],true,[]],"cleanHtml":[[{},"smartyCleanHtml"],true,[]],"classname":[[{},"smartyClassname"],true,[]],"classnames":[[{},"smartyClassnames"],true,[]],"addcslashes":[[{},"addcslashes"],true,[]],"addslashes":[[{},"addslashes"],true,[]],"date":[[{},"date"],true,[]],"end":[[{},"end"],true,[]],"floatval":[[{},"floatval"],true,[]],"htmlentities":[[{},"htmlentities"],true,[]],"intval":[[{},"intval"],true,[]],"mt_rand":[[{},"mt_rand"],true,[]],"rand":[[{},"rand"],true,[]],"strtolower":[[{},"strtolower"],true,[]],"str_replace":[[{},"str_replace"],true,[]],"strval":[[{},"strval"],true,[]],"trim":[[{},"trim"],true,[]],"ucfirst":[[{},"ucfirst"],true,[]],"urlencode":[[{},"urlencode"],true,[]],"htmlspecialchars":[[{},"htmlspecialchars"],true,[]]}},"registered_objects":[],"registered_classes":[],"registered_filters":[],"registered_resources":{"module":{"paths":{"theme":"\/home\/iplus\/domains\/iptest.isimaga.com\/public_html\/themes\/vinova_nuranium_marketplace\/modules\/","modules":"\/home\/iplus\/domains\/iptest.isimaga.com\/public_html\/modules\/"},"isAdmin":false,"uncompiled":false,"recompiled":false,"hasCompiledHandler":false},"parent":{"paths":[],"uncompiled":false,"recompiled":false,"hasCompiledHandler":false}},"registered_cache_resources":[],"autoload_filters":[],"default_modifiers":[],"escape_html":true,"start_time":1691745903.49892,"_current_file":null,"_parserdebug":false,"_objType":1,"_debug":null,"cache_id":null,"compile_id":null,"caching":0,"compile_check":1,"cache_lifetime":3600,"tplFunctions":[],"_cache":[],"template_class":"SmartyDevTemplate","tpl_vars":{"request_uri":{"value":"\/modules\/ps8mod_customerpwd\/ajax\/ajax.php?token=d5ea52086d2556aed4a977a85a1e8fe6","nocache":false}},"parent":null,"config_vars":[],"ext":{"objType":1,"registerResource":{"objMap":3},"registerPlugin":{"objMap":3},"createData":{"objMap":3}}},"mobile_detect":{},"mode":null,"container":null,"virtualTotalTaxExcluded":0,"virtualTotalTaxIncluded":0}

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...