public function statsAction($id, $from, $to)
    {
        $em = $this->getDoctrine()->getManager();

        /** @var Actor $entity */
        $entity = $em->getRepository('EcommerceBundle:Product')->find($id);
        
        /** @var FrontManager $frontManager */
        $adminManager =  $this->container->get('admin_manager');
        $stats = $adminManager->getProductStats($entity, $from, $to);

        $label = array();
        $visits = array();
        foreach ($stats as  $stat) {
            $label[] = $stat['day'];
            $visits[] = $stat['visits'];
        }
        
        $returnValues = new \stdClass();
        $returnValues->count = count($stats);
        $returnValues->labels = implode(',', $label);
        $returnValues->visits = implode(',', $visits);

        return new JsonResponse($returnValues);
    }