Custom report tab in member area

Discussion in 'Customization & add-ons' started by chungtn2910, Jun 2, 2014.

  1. chungtn2910

    chungtn2910 New Member

    Joined:
    Mar 6, 2014
    Messages:
    3
    Hi,
    Is it possible to add a custom page with show some report function for user
    -count of some product purchase in week, month, year...

    i've add the new menu on member area succes full by add code to site.php

    Am_Di::getInstance()->hook->add(Am_Event::USER_MENU, 'onUserPartner');
    function onUserPartner(Am_Event $event)
    {
    $cuser = Am_Di::getInstance()->auth->getUser();
    if($cuser->data()->get('partner_id') != NULL){
    $event->getMenu()->addPage(
    array(
    'id' => 'partner-id',
    'controller' => 'partner',
    'label' => 'Partner',
    'order' => 1000
    )
    );
    }
    else {
    return;
    }
    }
    class PartnerController extends Am_Controller // a Zend_Controller_Action successor
    {
    function indexAction()
    {
    $user = $this->getDi()->user; //currently authenticated customer or throws exception if no auth
    $this->view->title = "Partner Report";
    $this->view->content = "Page content";
    $this->view->display('layout.phtml');
    }
    }

    but i don't know how to add the report function on this page.
    anybody can help me ?

Share This Page