Show database data selected on base of id of logged in user / object user orders
Author: Spring Produkties
Visited 1085,
Followers 1,
Shared 0
on our website we work with automatic registration of users
once the user has logged in, we can visualize his orders through the object 'User Orders'
but on that same page we use the 'User Orders' object on
we would like to show other data from an other database, in which we select the fiel based on the active logged in user
-> how can we do that ? (how can we retrieve e.g. de ID of the active logged in user, to make the right selection (e.g. filtered on that ID) of other data in an other database ?
thanks in advance for putting us on the right track.
Posted on the
Hello,
If I don't make a mistake, you cannot have more than one database online by e-Commerce project.
Enjoy!
Axel
Hello
You could take a look at REPORTICO. https://www.reportico.org/site2/index.php
With this tool you can make reports involving more tables and databases. http://www.reportico.org/documentation/6.0.0/doku.php?id=working_with_multiple_datasources
The output can be in html. It is possible to use a userID from outside ( from another system )
http://www.reportico.org/documentation/6.0.0/doku.php?id=the_query_details_menu&s[]=external
REPORTICO is a very powerful tool to create output from MySQL databases - and it is free.
The possibility to let the user be able to make selections at "runtime" is very useful. The selections can be intervals ( date or number ) , groups and other possibilities.
The html-output can be integrated in your X5 using iframes.
Author
Author
Hello John
Thanks for the hint, we will check it.
But on that html page, how can we catch the ID of the active user (as we will need that ID in order to filter the right fields in that additional table?
Best regards
Wim
You read the X5 logged-in user into a variable, that you can use for selection in the REPORTICO.
You can read something here : http://www.reportico.org/documentation/6.0.0/doku.php?id=embedding_reportico#reporting_by_user
@Spring
You said "the additional data could also be stored in the same database, but in an other table. "... But you have no option into the software to write other data "external" into the same DB even into other table.
Author
@ Axel, in our case then forturnately in X5 we only have to read and visualize the data from the second table / database (as that ione is fed directly in MySQL by an other tool. So we do not have to write data from X5 to the table / database
Author
@ John thanks for the hints, it might indeed be a possible sollution. By the way : in case we would nee some help, are you doing free lance work for such things ? Or can you advise some one ? Offline we can discuss scope and conditions.
I don't work for money - I do it for fun
I could maybe assist you - you can contact me here : http://calendarforum.dk/contact.html
The forum on REPORTICO is useful - and the author of the REPORTICO is very helpful.