Ejemplo n.º 1
0
 public function productReviews()
 {
     $user = $this->getIdentity();
     $model = new \Shop\Models\Orders();
     $state = $model->populateState()->getState();
     $is_reviewed = null;
     if (strlen($state->get('filter.is_reviewed'))) {
         if ($state->get('filter.is_reviewed')) {
             $is_reviewed = true;
         } else {
             $is_reviewed = false;
         }
     }
     try {
         $paginated = \Shop\Models\Customers::purchasedProducts($user, array('offset' => $state->get('list.offset'), 'keyword' => $state->get('filter.keyword'), 'is_reviewed' => $is_reviewed));
     } catch (\Exception $e) {
     }
     $this->app->set('meta.title', 'My Reviews');
     $this->app->set('paginated', $paginated);
     $this->app->set('state', $state);
     echo $this->theme->render('Shop/Site/Views::account/product_reviews.php');
 }