diff --git a/app/Controller/UserController.php b/app/Controller/UserController.php index 5c6ad085..156d4724 100755 --- a/app/Controller/UserController.php +++ b/app/Controller/UserController.php @@ -394,15 +394,21 @@ function profile() if ($this->isConnected) { $this->loadModel('User'); - $this->set('title_for_layout', $this->User->getKey('pseudo')); $this->layout = $this->Configuration->getKey('layout'); if ($this->EyPlugin->isInstalled('eywek.shop')) { + $this->loadModel('Shop.ItemsBuyHistory'); + $this->loadModel('Shop.Item'); + $histories = $this->ItemsBuyHistory->find('all', array( + 'recursive' => 1, + 'order' => 'ItemsBuyHistory.created DESC', + 'conditions' => ['user_id' => $this->User->getKey('id')] + )); + $this->set(compact('histories')); $this->set('shop_active', true); } else { $this->set('shop_active', false); } - $available_ranks = array(0 => $this->Lang->get('USER__RANK_MEMBER'), 2 => $this->Lang->get('USER__RANK_MODERATOR'), 3 => $this->Lang->get('USER__RANK_ADMINISTRATOR'), 4 => $this->Lang->get('USER__RANK_ADMINISTRATOR'), 5 => $this->Lang->get('USER__RANK_BANNED')); $this->loadModel('Rank'); $custom_ranks = $this->Rank->find('all'); diff --git a/app/View/User/profile.ctp b/app/View/User/profile.ctp index 16cffd52..6e738389 100755 --- a/app/View/User/profile.ctp +++ b/app/View/User/profile.ctp @@ -141,9 +141,32 @@ - + isInstalled('eywek.shop')) { ?> +
+

get('SHOP__HISTORY_PURCHASES') ?>

+ + + + + + + + + + + + + + + + + + + +
get('DASHBOARD__PURCHASES') ?> IDget('GLOBAL__CREATED') ?>get('SHOP__ITEM_PRICE') ?>get('SHOP__ITEMS') ?>
+ loadModules('user_profile') ?> -