WebSite X5Help Center

 
Spring Produkties
Spring Produkties
User

How can i pass the userid (of logged in user) to the database viewer component on the same page ?  nl

Autore: Spring Produkties
Visite 664, Followers 1, Condiviso 0  

situation :

- we have page with the USER ORDERS component showing the orders of the logged in user  (users have registered earlier through the automatic registration method of X5 PRO)

- on the same page we have the DATABASE VIEWER component getting data from a MYSQL database

but we should be able to filter the table data of the MYSQL-database, for the logged in user (the table contains the data of all users of course)

so how can we pass the userID (of logged in user) to the DATABASE VIEWER component on the same page please ?

thanks in advance for your help

Yuliya

Spring Produkties

Postato il
5 RISPOSTE
Andre E
Andre E
Moderator

To my best knowladge x5 can't do this standard.

Leggi di più
Postato il da Andre E
Spring Produkties
Spring Produkties
User
Autore

indeed, we are aware about the fact that X5 can not standard, but how can we do it through PHP e.g. ?  

Leggi di più
Postato il da Spring Produkties
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator
Spring Produkties
indeed, we are aware about the fact that X5 can not standard, but how can we do it through PHP e.g. ?  

(It > En) ... in the page, (which must have a .php extension),  paste this code into an HTML Code Object:
<?php $pa = Configuration::getPrivateArea(); $user = $pa->whoIsLogged(); echo "Benvenuto".$user['realname']; ?>

>> source:  https://helpcenter.websitex5.com/it/post/159381#comment6

.

ciao

.

Leggi di più
Postato il da  ‪ KolAsim ‪ ‪
Spring Produkties
Spring Produkties
User
Autore

@KolAsim  : thanks that helps us one step ahead.  The next step is to pass to the database viewer object to make the right filter. How can we do that please?

best regards,

Yuliya

Leggi di più
Postato il da Spring Produkties
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator

... I do not know; ... with that code, each user will see their name on their own private page ...

ciao

.

Leggi di più
Postato il da  ‪ KolAsim ‪ ‪