pavla339
(Paja Koudy)
1
so there is for example an e-shop
I need a hint, links,… How to solve this:
- display always user name as a link.
the link leads to a page, where are displayed all user’s orders.
The issue is how to create a page which would display only the orders related to the user referenced in the link.
what is the best sustainable way to do it?
- statistics - top ten users who has most orders in the history and from the last 2 months.
konapaz
(Konapaz)
2
Hi palva
- add in your eshop layout the link of the current user only if Yii::app()->user->id is not null
To add user id see below
http://www.yiiframework.com/wiki/6/how-to-add-more-information-to-yii-app-user
1a)
The link should point to a specific controller/action that implements and render the orders of the current Yii:app()->user->id
- Create a widget to do this and then render the widget in eshop layout