Welcome, Guest
Username: Password: Remember me

TOPIC: Record filter for user

Record filter for user 13 Dec 2015 01:55 #13742

  • brokerad
  • brokerad's Avatar
  • Offline
  • New Member
  • Posts: 5
  • Karma: 0
Hi

can you help me to realize joomla user filter into the table view for frontend

for you more good understand:
I like create record into table to can show only related joomla user.

example into my project named '9119':
1) I create one table named 'customer' associated to one single joomla user.
2) a create another related table named ' invoice' with foreing key: 'customer id'
3) a created one table list and new record into the back site. Into new record I select the customer id for relation
4) I create one frontend record view for 'invoice'
and to this point I've the problem to filter the invoice for single user.

I wait one your feedback. thank

P.s. I've not programming experience, are you available for eventual development support inside my projects. how the cost?
The administrator has disabled public write access.

Record filter for user 17 Dec 2015 15:22 #13745

  • brokerad
  • brokerad's Avatar
  • Offline
  • New Member
  • Posts: 5
  • Karma: 0
We not receive any feedback from some day. This solution is supported?
The administrator has disabled public write access.

Record filter for user 21 Dec 2015 00:32 #13747

  • vlemos
  • vlemos's Avatar
  • Online
  • Elite Member
  • Posts: 295
  • Thank you received: 41
  • Karma: 21
Hello Brokerad

Is this what you have done so far? What are you hoping to achieve? I'm not sure your requirements are clear enough. However, I am almost sure the cook framework can get you where you are going.

Warm regards
vlemos

Using the combo box filter can allow you to filter by 'customer id' in the invoice collection view
Attachments:
The administrator has disabled public write access.

Record filter for user 21 Dec 2015 11:36 #13748

  • brokerad
  • brokerad's Avatar
  • Offline
  • New Member
  • Posts: 5
  • Karma: 0
Hi Vlemos

For you understanding good ;)

The administrator od the component to will creare record dedicated to single joomla user. for example service invoice.
Into the joomla user interface (post login), I like show into the invoice table only the invoice for single user loged.

Now I create one invoice list to show the invoice, but the single user look all invoice and not only their invoice.

Thank for support

Regard!
The administrator has disabled public write access.

Record filter for user 21 Dec 2015 12:34 #13749

  • vlemos
  • vlemos's Avatar
  • Online
  • Elite Member
  • Posts: 295
  • Thank you received: 41
  • Karma: 21
You are welcome Brokerad; however, I'm not sure that this approach is the most efficient route.

Feel free to explore your options and ask questions along the way.

Warm regards
vlemos
The administrator has disabled public write access.

Record filter for user 22 Dec 2015 15:44 #13752

  • Romkabouter
  • Romkabouter's Avatar
  • Offline
  • Elite Member
  • Posts: 310
  • Thank you received: 131
  • Karma: 48
Hi,

You should fork the model of the invoices, then fork the function prepareQuery and add a where clause on the current logged in user.
I will post some example code later

Regards,
The administrator has disabled public write access.

Record filter for user 25 Dec 2015 08:11 #13754

  • Romkabouter
  • Romkabouter's Avatar
  • Offline
  • Elite Member
  • Posts: 310
  • Thank you received: 131
  • Karma: 48
Hi,

What is the field in you customer table called? The one that is the ID of the Joomla User.
I understand that you are not a programmer, but you can not do what you want without getting yours hands dirty.

So, here are the steps.
- Browse to the components/yourcomponent folder on the server, create a folder named "fork" and in it a folder "models"
- Browse to the components/yourcomponent/_fork/models folder on the server (with underscore!) and copy the file invoices.php to your fork/models.
- Open the file components/yourcomponent/_fork/models/invoices.php and copy the function "prepareQuery". Paste it in your components/yourcomponent/fork/models/invoices.php file

To help you further, please copy your prepareQuery function here.
Last Edit: 25 Dec 2015 08:11 by Romkabouter.
The administrator has disabled public write access.
Time to create page: 0.120 seconds

Get Started