예제 #1
0
    function hookAdminStatsModules()
    {
        $result = Db::getInstance()->ExecuteS($this->_query . ModuleGraph::getDateBetween() . $this->_query2);
        $this->_html = '
		<fieldset class="width3"><legend><img src="../modules/' . $this->name . '/logo.gif" /> ' . $this->displayName . '</legend>';
        $table = '<div style="overflow-y: scroll; height: 600px;">
		<table class="table" border="0" cellspacing="0" cellspacing="0">
		<thead>
			<tr>
				<th style="width:400px;">' . $this->l('keywords') . '</th>
				<th style="width:50px; text-align: right">' . $this->l('Occurences') . '</th>
				<th style="width:50px; text-align: right">' . $this->l('Results') . '</th>
			</tr>
		</thead><tbody>';
        foreach ($result as $row) {
            $table .= '<tr>
				<td>' . $row['keywords'] . '</td>
				<td style="text-align: right">' . $row['occurences'] . '</td>
				<td style="text-align: right">' . $row['total'] . '</td>
			</tr>';
        }
        $table .= '</tbody></table></div>';
        if (sizeof($result)) {
            $this->_html .= '<center>' . ModuleGraph::engine(array('type' => 'pie')) . '</center><br class="clear" />' . $table;
        } else {
            $this->_html .= '<p><strong>' . $this->l('No keywords searched more than once found.') . '</strong></p>';
        }
        $this->_html .= '</fieldset>';
        return $this->_html;
    }
예제 #2
0
    public function hookAdminStatsModules($params)
    {
        global $cookie;
        $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('
		SELECT COUNT(o.`id_order`) as total
		FROM `' . _DB_PREFIX_ . 'orders` o
		WHERE o.`date_add` BETWEEN ' . ModuleGraph::getDateBetween() . '
		' . ((int) Tools::getValue('id_order_state') ? 'AND (SELECT oh.id_order_state FROM `' . _DB_PREFIX_ . 'order_history` oh WHERE o.id_order = oh.id_order ORDER BY oh.date_add DESC, oh.id_order_history DESC LIMIT 1) = ' . (int) Tools::getValue('id_order_state') : ''));
        $states = OrderState::getOrderStates((int) $cookie->id_lang);
        if (Tools::getValue('export')) {
            $this->csvExport(array('type' => 'pie', 'option' => Tools::getValue('id_order_state')));
        }
        $this->_html = '
		<fieldset class="width3"><legend><img src="../modules/' . $this->name . '/logo.gif" /> ' . $this->displayName . '</legend>
			<form action="' . $_SERVER['REQUEST_URI'] . '" method="post" style="float: right;">
				<select name="id_order_state">
					<option value="0"' . (!Tools::getValue('id_order_state') ? ' selected="selected"' : '') . '>' . $this->l('All') . '</option>';
        foreach ($states as $state) {
            $this->_html .= '<option value="' . $state['id_order_state'] . '"' . ($state['id_order_state'] == Tools::getValue('id_order_state') ? ' selected="selected"' : '') . '>' . $state['name'] . '</option>';
        }
        $this->_html .= '</select>
				<input type="submit" name="submitState" value="' . $this->l('Filter') . '" class="button" />
			</form>
			<p><img src="../img/admin/down.gif" />' . $this->l('This graph represents the carrier distribution for your orders. You can also limit it to orders in one state.') . '</p>
			' . ($result['total'] ? ModuleGraph::engine(array('type' => 'pie', 'option' => Tools::getValue('id_order_state'))) . '<br /><br />	<a href="' . $_SERVER['REQUEST_URI'] . '&export=1&exportType=language"><img src="../img/admin/asterisk.gif" />' . $this->l('CSV Export') . '</a>' : $this->l('No valid orders for this period.')) . '
		</fieldset>';
        return $this->_html;
    }
예제 #3
0
    public function hookAdminStatsModules($params)
    {
        $equipment = $this->getEquipment();
        $this->_html = '
		<fieldset class="width3"><legend><img src="../modules/' . $this->name . '/logo.gif" /> ' . $this->displayName . '</legend>
			<center>
				<p><img src="../img/admin/down.gif" />' . $this->l('Determine the percentage of web browser used by your customers.') . '</p>
				' . ModuleGraph::engine(array('type' => 'pie', 'option' => 'wb')) . '<br /><br />
				<p><img src="../img/admin/down.gif" />' . $this->l('Determine the percentage of operating systems used by your customers.') . '</p>
				' . ModuleGraph::engine(array('type' => 'pie', 'option' => 'os')) . '';
        if ($equipment) {
            $this->_html .= '<table class="table space" border="0" cellspacing="0" cellpadding="0">
			<tr><th style="width: 200px">' . $this->l('Plug-ins') . '</th><th></th></tr>';
            foreach ($equipment as $name => $value) {
                $this->_html .= '<tr><td>' . $name . '</td><td>' . number_format(100 * $value, 2) . '%</td></tr>';
            }
            $this->_html .= '</table>';
        }
        $this->_html .= '
			</center>
		</fieldset><br />
		<fieldset class="width3"><legend><img src="../img/admin/comment.gif" /> ' . $this->l('Guide') . '</legend>
		<h2>' . $this->l('Ensure that your website is accessible to all') . '</h2>
			<p>
				' . $this->l('When managing Websites, it is important to keep track of software used by visitors in order to be sure that the site displays the same way for everyone, and PrestaShop was built in order to be compatible with most recent Web browsers and computer operating systems (OS). However, because you may end up adding advanced features to your Website or even modify the core PrestaShop code, these additions may not be accessible by everyone. That is why it is a good idea to keep tabs on the percentage of users for each type of software before adding or changing something that only a limited number of users will be able to access.') . '
			</p><br />
			
		</fieldset>';
        return $this->_html;
    }
예제 #4
0
    public function hookAdminStatsModules($params)
    {
        $totalRegistrations = $this->getTotalRegistrations();
        $totalBlocked = $this->getBlockedVisitors();
        $totalBuyers = $this->getFirstBuyers();
        $this->_html = '
		<fieldset class="width3"><legend><img src="../modules/' . $this->name . '/logo.gif" /> ' . $this->displayName . '</legend>
			<p>
				' . $this->l('Visitors who have stopped at the registering step:') . ' ' . intval($totalBlocked) . ($totalRegistrations ? ' (' . number_format(100 * $totalBlocked / ($totalRegistrations + $totalBlocked), 2) . '%)' : '') . '<br />
				' . $this->l('Visitors who have placed an order directly after the registration:') . ' ' . intval($totalBuyers) . ($totalRegistrations ? ' (' . number_format(100 * $totalBuyers / $totalRegistrations, 2) . '%)' : '') . '
			</p>
			<p>' . $this->l('Total customer accounts:') . ' ' . $totalRegistrations . '</p>
			<center>' . ModuleGraph::engine(array('type' => 'line')) . '</center>
		</fieldset><br />
		<fieldset class="width3"><legend><img src="../img/admin/comment.gif" /> ' . $this->l('Guide') . '</legend>
			<h2>' . $this->l('Number of customer accounts created') . '</h2>
			<p>' . $this->l('The total number of accounts created is not in itself important information. However, it is interesting to analyze the number created over time. This will indicate whether or not things are on the right track.') . '</p>
			<br /><h3>' . $this->l('How to act on the registrations\' evolution?') . '</h3>
			<p>
				' . $this->l('If you let your shop run without changing anything, the number of customer registrations should stay stable or slightly decline.') . '
				' . $this->l('A significant increase or decrease shows that there has probably been a change to your shop; therefore, you have to identify it in order to backtrack if this change makes the number of registrations decrease, or continue with it if it is advantageous.') . '<br />
				' . $this->l('Here\'s a summary of what can affect the creation of customer accounts:') . '
				<ul>
					<li>' . $this->l('An advertising campaign can attract a greater number of visitors. An increase in customer accounts which will ensue, which will depend on their \\"quality\\": well-targeted advertising can be more effective than large-scale advertising.') . '</li>
					<li>' . $this->l('Specials, sales, or contests create greater attention and curiosity, not only keeping your shop lively but also increasing its traffic. This way, you can push impulsive buyers to take the plunge.') . '</li>
					<li>' . $this->l('Design and user-friendliness are more important than ever: an ill-chosen or hard-to-follow graphical theme can turn off visitors. You have to strike the right balance between an innovative design and letting visitors move around easily. Proper spelling and clarity also inspire more customer confidence in your shop.') . '</li>
				</ul>
			</p><br />
		</fieldset>';
        return $this->_html;
    }
예제 #5
0
    function hookAdminStatsModules()
    {
        $result = Db::getInstance()->ExecuteS($this->_query . ModuleGraph::getDateBetween() . $this->_query2);
        $this->_html = '<fieldset class="width3"><legend><img src="../modules/' . $this->name . '/logo.gif" /> ' . $this->displayName . '</legend>';
        if ($result and sizeof($result)) {
            $table = '<div style="overflow-y: scroll; height: 600px;">
			<table class="table" border="0" cellspacing="0" cellspacing="0">
			<thead>
				<tr><th style="width:400px;">' . $this->l('Keywords') . '</th>
				<th style="width:50px; text-align: right">' . $this->l('Occurences') . '</th></tr>
			</thead><tbody>';
            foreach ($result as $index => $row) {
                $keyword =& $row['keyword'];
                $occurences =& $row['occurences'];
                $table .= '<tr><td>' . $keyword . '</td><td style="text-align: right">' . $occurences . '</td></tr>';
            }
            $table .= '</tbody></table></div>';
            $this->_html .= '<center>' . ModuleGraph::engine(array('type' => 'pie')) . '</center><br class="clear" />' . $table;
        } else {
            $this->_html .= '<p><strong>' . $this->l('No keyword searched for more than once found') . '</strong></p>';
        }
        $this->_html .= '</fieldset><br class="clear" />
		<fieldset class="width3"><legend><img src="../img/admin/comment.gif" /> ' . $this->l('Guide') . '</legend>
			<h2>' . $this->l('Identify external search engines keywords') . '</h2>
			<p>' . $this->l('There are many ways to find a website, but one of the most common is to find it with a search engine. Identifying the most "visitor-making" keywords entered by your new visitors is really important, it allows you to see which product you have to put in front if you want more visitors and customers.') . '</p><br />
			<h3>' . $this->l('How does it work?') . '</h2>
			<p>' . $this->l('When a visitors comes to your website, the server knows its previous location. This module parses this URL and finds the keywords in it. Currently, it manages the following search engines:') . '<b> Google, AOL, Yandex, Ask, NHL, Yahoo, Baidu, Lycos, Exalead, Live, Voila</b> ' . $this->l('and') . ' <b>Altavista</b>. ' . $this->l('Soon it will be possible to add dynamically new search engine and to contribute to this module!') . '</p><br />
		</fieldset>';
        return $this->_html;
    }
예제 #6
0
    public function hookAdminStatsModules($params)
    {
        $totalVisits = $this->getTotalVisits();
        $totalGuests = $this->getTotalGuests();
        if (Tools::getValue('export')) {
            $this->csvExport(array('layers' => 2, 'type' => 'line', 'option' => 3));
        }
        $this->_html = '
		<fieldset class="width3"><legend><img src="../modules/' . $this->name . '/logo.gif" /> ' . $this->displayName . '</legend>
			<p><center>
				<img src="../img/admin/down.gif" />' . $this->l('A visit corresponds to an internet user coming to your shop. Until the end of their session, only one visit is counted.') . '
				' . $this->l('A visitor is an unknown person, who has not registered or logged on, surfing on your shop. A visitor can come and visit your shop many times.') . '
			</center></p>
			<div style="margin-top:20px"></div>
			<p>' . $this->l('Total visits:') . ' ' . $totalVisits . '</p>
			<p>' . $this->l('Total visitors:') . ' ' . $totalGuests . '</p>
			' . ($totalVisits ? ModuleGraph::engine(array('layers' => 2, 'type' => 'line', 'option' => 3)) . '<p><a href="' . $_SERVER['REQUEST_URI'] . '&export=1"><img src="../img/admin/asterisk.gif" />' . $this->l('CSV Export') . '</a></p>' : '') . '
			
		</fieldset>
		<br class="clear" />
		<fieldset class="width3"><legend><img src="../img/admin/comment.gif" /> ' . $this->l('Guide') . '</legend>
				<h2>' . $this->l('Determine the interest of a visit') . '</h2>
				' . $this->l('The visitors\' evolution graph strongly resembles the visits\' graph, but provides additional information:') . '<br />
				<ul>
					<li>' . $this->l('If this is the case, congratulations, your website is well planned and pleasing.') . '</li>
					<li>' . $this->l('Otherwise, the conclusion is not so simple. The problem can be aesthetic or ergonomic, or else the offer is not sufficient. It is also possible that these visitors mistakenly came here without particular interest for your shop; this phenomenon often happens with the search engines.') . '</li>
				</ul>
				' . $this->l('This information is mostly qualitative: you have to determine the interest of a disjointed visit.') . '<br />
		</fieldset>';
        return $this->_html;
    }
예제 #7
0
    public function hookAdminStatsModules($params)
    {
        $totalVisits = $this->getTotalVisits();
        $totalGuests = $this->getTotalGuests();
        $this->_html = '
		<fieldset class="width3"><legend><img src="../modules/' . $this->name . '/logo.gif" /> ' . $this->displayName . '</legend>
			<p><center>
				<img src="../img/admin/down.gif" />' . $this->l('A visit correspond to the coming of an internet user on your shop. Until the end of his session, only one visit is counted.') . '
				' . $this->l('A visitor is an unknown person - who has not registered or logged on - surfing on your shop. A visitor can come and visit your shop many times.') . '
			</center></p>
			<div style="margin-top:20px"></div>
			<p>' . $this->l('Total visits:') . ' ' . $totalVisits . '</p>
			<p>' . $this->l('Total visitors:') . ' ' . $totalGuests . '</p>
			' . ($totalVisits ? ModuleGraph::engine(array('layers' => 2, 'type' => 'line', 'option' => 3)) . '<br /><br />' : '') . '
		</fieldset>
		<br class="clear" />
		<fieldset class="width3"><legend><img src="../img/admin/comment.gif" /> ' . $this->l('Guide') . '</legend>
				<h2>' . $this->l('Determine the interest of a visit') . '</h2>
				' . $this->l('Visitors\' evolution graph strongly looks like to the visits\' graph, but provides an additional information: <strong>Do your visitors come back?</strong>') . '<br />
				<ul>
					<li>' . $this->l('if this is the case, congratulations, your website is well-thought-out and undeniably pleases.') . '</li>
					<li>' . $this->l('Otherwise, the conclusion is not so simple. The problem can be esthetic or ergonomic, or else the offer not sufficient. It\'s also possible that these visitors mistakenly came here, without particular interest for your shop; this phenomenon often happens with the search engines.') . '</li>
				</ul>
				' . $this->l('This information is mostly qualitative: you have to determin the interest of a disjointed visit.') . '<br />
		</fieldset>';
        return $this->_html;
    }
    public function hookAdminStatsModules($params)
    {
        $this->_html = '<fieldset class="width3"><legend><img src="../modules/' . $this->name . '/logo.gif" /> ' . $this->displayName . '</legend>';
        if (sizeof(Customer::getCustomers())) {
            if (Tools::getValue('export')) {
                if (Tools::getValue('exportType') == 'gender') {
                    $this->csvExport(array('type' => 'pie', 'option' => 'gender'));
                } elseif (Tools::getValue('exportType') == 'age') {
                    $this->csvExport(array('type' => 'pie', 'option' => 'age'));
                } elseif (Tools::getValue('exportType') == 'country') {
                    $this->csvExport(array('type' => 'pie', 'option' => 'country'));
                } elseif (Tools::getValue('exportType') == 'currency') {
                    $this->csvExport(array('type' => 'pie', 'option' => 'currency'));
                } elseif (Tools::getValue('exportType') == 'language') {
                    $this->csvExport(array('type' => 'pie', 'option' => 'language'));
                }
            }
            $this->_html .= '
			
				<center><p><img src="../img/admin/down.gif" />' . $this->l('Gender distribution allows you to determine the percentage of men and women among your customers.') . '</p>
				' . ModuleGraph::engine(array('type' => 'pie', 'option' => 'gender')) . '<br /></center>
				<p><a href="' . $_SERVER['REQUEST_URI'] . '&export=1&exportType=gender"><img src="../img/admin/asterisk.gif" />' . $this->l('CSV Export') . '</a></p>
				<br class="clear" /><br />
				<center><p><img src="../img/admin/down.gif" />' . $this->l('Age ranges allows you to determine in which age range your customers are.') . '</p>
				' . ModuleGraph::engine(array('type' => 'pie', 'option' => 'age')) . '<br /></center>
				<p><a href="' . $_SERVER['REQUEST_URI'] . '&export=1&exportType=age"><img src="../img/admin/asterisk.gif" />' . $this->l('CSV Export') . '</a></p><br /><br />
				<center><p><img src="../img/admin/down.gif" />' . $this->l('Country distribution allows you to determine in which part of the world your customers are shopping from.') . '</p>
				' . ModuleGraph::engine(array('type' => 'pie', 'option' => 'country')) . '<br /></center>
				<p><a href="' . $_SERVER['REQUEST_URI'] . '&export=1&exportType=country"><img src="../img/admin/asterisk.gif" />' . $this->l('CSV Export') . '</a></p><br /><br />
				<center><p><img src="../img/admin/down.gif" />' . $this->l('Currency ranges allows you to determine which currencies your customers are using.') . '</p>
				' . ModuleGraph::engine(array('type' => 'pie', 'option' => 'currency')) . '<br /></center>
				<p><a href="' . $_SERVER['REQUEST_URI'] . '&export=1&exportType=currency"><img src="../img/admin/asterisk.gif" />' . $this->l('CSV Export') . '</a></p><br /><br />
				<center><p><img src="../img/admin/down.gif" />' . $this->l('Language distribution allows you to determine the general languages your customers are using on your shop.') . '</p>
				' . ModuleGraph::engine(array('type' => 'pie', 'option' => 'language')) . '<br /></center>
				<p><a href="' . $_SERVER['REQUEST_URI'] . '&export=1&exportType=language"><img src="../img/admin/asterisk.gif" />' . $this->l('CSV Export') . '</a></p>
			</center>';
        } else {
            $this->_html .= '<p>' . $this->l('No customers registered yet.') . '</p>';
        }
        $this->_html .= '
		</fieldset><br />
		<fieldset class="width3"><legend><img src="../img/admin/comment.gif" /> ' . $this->l('Guide') . '</legend>
			<h2>' . $this->l('Target your audience') . '</h2>
			<p>
				' . $this->l('In order for each message to have an impact, you need to know to whom it should be addressed.') . '
				' . $this->l('Addressing the right audience is essential for choosing the right tools to win them over.') . '
				' . $this->l('It is best to limit action to a group or groups of clients.') . '
				' . $this->l('Registered customer information allows you to accurately define the typical customer profile so that you can adapt your specials to various criteria.') . '
			</p><br />
			<p>
				' . $this->l('You should use this information to increase your sales by') . '
				<ul>
					<li class="bullet">' . $this->l('launching ad campaigns addressed to specific customers who might be interested in a particular offer at specific dates and times.') . '</li>
					<li class="bullet">' . $this->l('Contacting a group of clients by e-mail / newsletter.') . '</li>
				</ul>
			</p><br />
		</fieldset>';
        return $this->_html;
    }
예제 #9
0
    public function hookAdminStatsModules($params)
    {
        $totals = $this->getTotals();
        $this->_html = '
		<fieldset class="width3"><legend><img src="../modules/' . $this->name . '/logo.gif" /> ' . $this->displayName . '</legend>
			<p>' . $this->l('Registrations from customers:') . ' ' . intval($totals['customers']) . '</p>
			<p>' . $this->l('Registrations from visitors:') . ' ' . intval($totals['visitors']) . '</p>
			<p>' . $this->l('Both:') . ' ' . intval($totals['both']) . '</p>
			<center>' . ModuleGraph::engine(array('type' => 'line', 'layers' => 3)) . '</center>
		</fieldset>';
        return $this->_html;
    }
예제 #10
0
    function hookAdminStatsModules()
    {
        $websites = $this->getOrigins(ModuleGraph::getDateBetween());
        if (Tools::getValue('export')) {
            if (Tools::getValue('exportType') == 'top') {
                $this->csvExport(array('type' => 'pie'));
            }
        }
        $this->_html = '<fieldset class="width3"><legend><img src="../modules/' . $this->name . '/logo.gif" /> ' . $this->l('Origin') . '</legend>';
        if (sizeof($websites)) {
            $this->_html .= '
			<center><p><img src="../img/admin/down.gif" />' . $this->l('Here is the percentage of the 10 most popular referrer websites by which visitors went through to get to your shop.') . '</p>
			' . ModuleGraph::engine(array('type' => 'pie')) . '</center>
			<p><a href="' . Tools::safeOutput($_SERVER['REQUEST_URI']) . '&export=1&exportType=top"><img src="../img/admin/asterisk.gif" />' . $this->l('CSV Export') . '</a></p><br /><br />
			<div style="overflow-y: scroll; height: 600px;">
			<center>
			<table class="table " border="0" cellspacing="0" cellspacing="0">
				<tr>
					<th style="width:400px;">' . $this->l('Origin') . '</th>
					<th style="width:50px; text-align: right">' . $this->l('Total') . '</th>
				</tr>';
            foreach ($websites as $website => $total) {
                $this->_html .= '<tr><td>' . (!strstr($website, ' ') ? '<a href="' . Tools::getProtocol() . $website . '">' : '') . $website . (!strstr($website, ' ') ? '</a>' : '') . '</td><td style="text-align: right">' . $total . '</td></tr>';
            }
            $this->_html .= '</table></center></div>';
        } else {
            $this->_html .= '<p><strong>' . $this->l('Direct links only') . '</strong></p>';
        }
        $this->_html .= '</fieldset><br />
		<fieldset class="width3"><legend><img src="../img/admin/comment.gif" /> ' . $this->l('Guide') . '</legend>
		<h2>' . $this->l('What is a referrer website?') . '</h2>
			<p>
				' . $this->l('When visiting a webpage, the referrer is the URL of the previous webpage from which a link was followed.') . '<br />
				' . $this->l('A referrer enables you to know which keywords are entered by visitors in search engines when getting to your shop and allows you to optimize web promotion.') . '<br /><br />
				' . $this->l('A referrer can be:') . '
				<ul>
					<li class="bullet">' . $this->l('Someone who put a link on their website for your shop') . '</li>
					<li class="bullet">' . $this->l('A partner with whom you made a link exchange in order to bring in sales or attract new customers') . '</li>
				</ul>
			</p>
		</fieldset>';
        return $this->_html;
    }
예제 #11
0
    public function hookAdminStatsModules($params)
    {
        if (Module::isInstalled('blocknewsletter')) {
            $totals = $this->getTotals();
            if (Tools::getValue('export')) {
                $this->csvExport(array('type' => 'line', 'layers' => 3));
            }
            $this->_html = '
			<fieldset class="width3"><legend><img src="../modules/' . $this->name . '/logo.gif" /> ' . $this->displayName . '</legend>
				<p>' . $this->l('Registrations from customers:') . ' ' . (int) $totals['customers'] . '</p>
				<p>' . $this->l('Registrations from visitors:') . ' ' . (int) $totals['visitors'] . '</p>
				<p>' . $this->l('Both:') . ' ' . (int) $totals['both'] . '</p>
				<center>' . ModuleGraph::engine(array('type' => 'line', 'layers' => 3)) . '</center>
				<p><a href="' . Tools::safeOutput($_SERVER['REQUEST_URI']) . '&export=1"><img src="../img/admin/asterisk.gif" />' . $this->l('CSV Export') . '</a></p>
			</fieldset>';
        } else {
            $this->_html = '<p>' . $this->l('Module Newsletter Block must be installed') . '</p>';
        }
        return $this->_html;
    }
예제 #12
0
    public function hookAdminStatsModules($params)
    {
        global $cookie;
        $totals = $this->getTotals();
        $currency = new Currency(Configuration::get('PS_CURRENCY_DEFAULT'));
        $this->_html = '
		<fieldset class="width3"><legend><img src="../modules/' . $this->name . '/logo.gif" /> ' . $this->displayName . '</legend>
			<form action="' . $_SERVER['REQUEST_URI'] . '" method="post" style="float: right; margin-left: 10px;">
				<select name="id_country">
					<option value="0"' . (!Tools::getValue('id_order_state') ? ' selected="selected"' : '') . '>' . $this->l('All') . '</option>';
        foreach (Country::getCountries($cookie->id_lang) as $country) {
            $this->_html .= '<option value="' . $country['id_country'] . '"' . ($country['id_country'] == Tools::getValue('id_country') ? ' selected="selected"' : '') . '>' . $country['name'] . '</option>';
        }
        $this->_html .= '</select>
				<input type="submit" name="submitCountry" value="' . $this->l('Filter') . '" class="button" />
			</form>
			<p><center><img src="../img/admin/down.gif" />
				' . $this->l('These graphs represent the evolution of your orders and sales turnover for a given period. It is not an advanced analysis tools, but at least you can overview the rentability of your shop in a flash. You can also keep a watch on the difference with some periods like Christmas. Only valid orders are included in theses two graphs.') . '
			</center></p>
			<p>' . $this->l('Total orders placed:') . ' ' . intval($totals['allOrderCount']) . '</p>
			<p>' . $this->l('Total orders placed (valid):') . ' ' . intval($totals['orderCount']) . '</p>
			<p>' . $this->l('Total products ordered (valid):') . ' ' . intval($totals['products']) . '</p>
			<center>' . ModuleGraph::engine(array('type' => 'line', 'option' => '1-' . intval(Tools::getValue('id_country')), 'layers' => 3)) . '</center>
			<p>' . $this->l('Sales:') . ' ' . Tools::displayPrice($totals['orderSum'], $currency) . '</p>
			<center>' . ModuleGraph::engine(array('type' => 'line', 'option' => '2-' . intval(Tools::getValue('id_country')))) . '<br /><br />
			<p class="space"><img src="../img/admin/down.gif" />
				' . $this->l('You can see the order state distribution below.') . '
			</p><br />
			' . ($totals['orderCount'] ? ModuleGraph::engine(array('type' => 'pie', 'option' => '3-' . intval(Tools::getValue('id_country')))) : $this->l('No order for this period')) . '</center>
		</fieldset>
		<br class="clear" />
		<fieldset class="width3"><legend><img src="../img/admin/comment.gif" /> ' . $this->l('Guide') . '</legend>
			<h2>' . $this->l('Various order status') . '</h2>
			<p>
				' . $this->l('In your back-office, you can find many order status : Awaiting cheque payment, Payment accepted, Preparation in progress, Shipping, Delivered, Canceled, Refund, Payment error, Out of stock, and Awaiting bank wire payment.') . '<br />
				' . $this->l('These status cannot be removed from the back-office, but you have the possibility to add some more.') . '
			</p>
		</fieldset>';
        return $this->_html;
    }
예제 #13
0
    public function hookAdminStatsModules()
    {
        if (Tools::isSubmit('submitSEK')) {
            Configuration::updateValue('SEK_FILTER_KW', trim(Tools::getValue('SEK_FILTER_KW')));
            Configuration::updateValue('SEK_MIN_OCCURENCES', (int) Tools::getValue('SEK_MIN_OCCURENCES'));
            Tools::redirectAdmin('index.php?tab=AdminStats&token=' . Tools::getValue('token') . '&module=' . $this->name);
        }
        if (Tools::getValue('export')) {
            $this->csvExport(array('type' => 'pie'));
        }
        $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($this->_query . ModuleGraph::getDateBetween() . $this->_query2);
        $total = count($result);
        $this->_html = '<fieldset class="width3"><legend><img src="../modules/' . $this->name . '/logo.gif" /> ' . $this->displayName . '</legend>
		' . $total . ' ' . ($total == 1 ? $this->l('keyword matches your query.') : $this->l('keywords match your query.')) . '<div class="clear">&nbsp;</div>';
        if ($result and count($result)) {
            $table = '
			<div style="overflow-y: scroll; height: 600px;">
			<table class="table" border="0" cellspacing="0" cellspacing="0">
			<thead>
				<tr><th style="width:400px;">' . $this->l('Keywords') . '</th>
				<th style="width:50px; text-align: right">' . $this->l('Occurrences') . '</th></tr>
			</thead><tbody>';
            foreach ($result as $index => $row) {
                $keyword =& $row['keyword'];
                $occurences =& $row['occurences'];
                $table .= '<tr><td>' . $keyword . '</td><td style="text-align: right">' . $occurences . '</td></tr>';
            }
            $table .= '</tbody></table></div>';
            $this->_html .= '<center>' . ModuleGraph::engine(array('type' => 'pie')) . '</center>
			<br class="clear" />
			<p><a href="' . Tools::safeOutput($_SERVER['REQUEST_URI']) . '&export=1&exportType=language"><img src="../img/admin/asterisk.gif" />' . $this->l('CSV Export') . '</a></p><br class="clear" />
			<form action="' . Tools::htmlentitiesUTF8($_SERVER['REQUEST_URI']) . '" method="post">
				' . $this->l('Filter by keyword') . ' <input type="text" name="SEK_FILTER_KW" value="' . Tools::htmlentitiesUTF8(Configuration::get('SEK_FILTER_KW')) . '" />
				' . $this->l('and min occurrences') . ' <input type="text" name="SEK_MIN_OCCURENCES" value="' . (int) Configuration::get('SEK_MIN_OCCURENCES') . '" />
				<input type="submit" class="button" name="submitSEK" value="' . $this->l('   Apply   ') . '" />
			</form>
			<br class="clear" />' . $table;
        } else {
            $this->_html .= '<p><strong>' . $this->l('No keywords') . '</strong></p>';
        }
        $this->_html .= '</fieldset><br class="clear" />
		<fieldset class="width3"><legend><img src="../img/admin/comment.gif" /> ' . $this->l('Guide') . '</legend>
			<h2>' . $this->l('Identify keywords from external search engines') . '</h2>
			<p>' . $this->l('There are a number of ways of being directed to a Website but one of the most common ones is via a search engine. Identifying the most popular keywords entered by your new visitors allows you to see which products should be featured in order to attract more visitors and potential customers.') . '</p><br />
			<h3>' . $this->l('How does it work?') . '</h2>
			<p>' . $this->l('nWhen a visitor is directed to your website, the server picks up their previous location. This module parses the URL and finds the keywords in it. Currently, it manages the following search engines:n') . '<b> Google, AOL, Yandex, Ask, NHL, Yahoo, Baidu, Lycos, Exalead, Live, Voila</b> ' . $this->l('and') . ' <b>Altavista</b>. ' . $this->l('Soon it will be possible to dynamically add new search engines and contribute to this module.') . '</p><br />
		</fieldset>';
        return $this->_html;
    }
예제 #14
0
    public function hookAdminStatsModules($params)
    {
        global $cookie, $currentIndex;
        $id_category = (int) Tools::getValue('id_category');
        $currency = new Currency(Configuration::get('PS_CURRENCY_DEFAULT'));
        if (Tools::getValue('export')) {
            if (!Tools::getValue('exportType')) {
                $this->csvExport(array('layers' => 2, 'type' => 'line', 'option' => '42'));
            }
        }
        $this->_html = '<fieldset class="width3"><legend><img src="../modules/' . $this->name . '/logo.gif" /> ' . $this->displayName . '</legend>';
        if ($id_product = (int) Tools::getValue('id_product')) {
            if (Tools::getValue('export')) {
                if (Tools::getValue('exportType') == 1) {
                    $this->csvExport(array('layers' => 2, 'type' => 'line', 'option' => '1-' . $id_product));
                } elseif (Tools::getValue('exportType') == 2) {
                    $this->csvExport(array('type' => 'pie', 'option' => '3-' . $id_product));
                }
            }
            $product = new Product($id_product, false, (int) $cookie->id_lang);
            $totalBought = $this->getTotalBought($product->id);
            $totalSales = $this->getTotalSales($product->id);
            $totalViewed = $this->getTotalViewed($product->id);
            $this->_html .= '<h3>' . $product->name . ' - ' . $this->l('Details') . '</h3>
			<p>' . $this->l('Total bought:') . ' ' . $totalBought . '</p>
			<p>' . $this->l('Sales (-Tx):') . ' ' . Tools::displayprice($totalSales, $currency) . '</p>
			<p>' . $this->l('Total viewed:') . ' ' . $totalViewed . '</p>
			<p>' . $this->l('Conversion rate:') . ' ' . number_format($totalViewed ? $totalBought / $totalViewed : 0, 2) . '</p>
			<center>' . ModuleGraph::engine(array('layers' => 2, 'type' => 'line', 'option' => '1-' . $id_product)) . '</center>
			<br />
			<p><a href="' . $_SERVER['REQUEST_URI'] . '&export=1&exportType=1"><img src="../img/admin/asterisk.gif" />' . $this->l('CSV Export') . '</a></p>';
            if ($hasAttribute = $product->hasAttributes() and $totalBought) {
                $this->_html .= '<h3 class="space">' . $this->l('Attribute sales distribution') . '</h3><center>' . ModuleGraph::engine(array('type' => 'pie', 'option' => '3-' . $id_product)) . '</center><br />
			<p><a href="' . $_SERVER['REQUEST_URI'] . '&export=1&exportType=2"><img src="../img/admin/asterisk.gif" />' . $this->l('CSV Export') . '</a></p><br />';
            }
            if ($totalBought) {
                $sales = $this->getSales($id_product, $cookie->id_lang);
                $this->_html .= '<br class="clear" />
				<h3>' . $this->l('Sales') . '</h3>
				<div style="overflow-y: scroll; height: ' . min(400, (count($sales) + 1) * 32) . 'px;">
				<table class="table" border="0" cellspacing="0" cellspacing="0">
				<thead>
					<tr>
						<th>' . $this->l('Date') . '</th>
						<th>' . $this->l('Order') . '</th>
						<th>' . $this->l('Customer') . '</th>
						' . ($hasAttribute ? '<th>' . $this->l('Attribute') . '</th>' : '') . '
						<th>' . $this->l('Qty') . '</th>
						<th>' . $this->l('Price') . '</th>
					</tr>
				</thead><tbody>';
                $tokenOrder = Tools::getAdminToken('AdminOrders' . (int) Tab::getIdFromClassName('AdminOrders') . (int) $cookie->id_employee);
                $tokenCustomer = Tools::getAdminToken('AdminCustomers' . (int) Tab::getIdFromClassName('AdminCustomers') . (int) $cookie->id_employee);
                foreach ($sales as $sale) {
                    $this->_html .= '
					<tr>
						<td>' . Tools::displayDate($sale['date_add'], (int) $cookie->id_lang, false) . '</td>
						<td align="center"><a href="?tab=AdminOrders&id_order=' . $sale['id_order'] . '&vieworder&token=' . $tokenOrder . '">' . (int) $sale['id_order'] . '</a></td>
						<td align="center"><a href="?tab=AdminCustomers&id_customer=' . $sale['id_customer'] . '&viewcustomer&token=' . $tokenCustomer . '">' . (int) $sale['id_customer'] . '</a></td>
						' . ($hasAttribute ? '<td>' . $sale['product_name'] . '</td>' : '') . '
						<td>' . (int) $sale['product_quantity'] . '</td>
						<td>' . Tools::displayprice($sale['total'], $currency) . '</td>
					</tr>';
                }
                $this->_html .= '</tbody></table></div>';
                $crossSelling = $this->getCrossSales($id_product, $cookie->id_lang);
                if (count($crossSelling)) {
                    $this->_html .= '<br class="clear" />
					<h3>' . $this->l('Cross Selling') . '</h3>
					<div style="overflow-y: scroll; height: 200px;">
					<table class="table" border="0" cellspacing="0" cellspacing="0">
					<thead>
						<tr>
							<th>' . $this->l('Product name') . '</th>
							<th>' . $this->l('Quantity sold') . '</th>
							<th>' . $this->l('Average price') . '</th>
						</tr>
					</thead><tbody>';
                    $tokenProducts = Tools::getAdminToken('AdminCatalog' . (int) Tab::getIdFromClassName('AdminCatalog') . (int) $cookie->id_employee);
                    foreach ($crossSelling as $selling) {
                        $this->_html .= '
						<tr>
							<td ><a href="?tab=AdminCatalog&id_product=' . (int) $selling['id_product'] . '&addproduct&token=' . $tokenProducts . '">' . $selling['pname'] . '</a></td>
							<td align="center">' . (int) $selling['pqty'] . '</td>
							<td align="right">' . Tools::displayprice($selling['pprice'], $currency) . '</td>
						</tr>';
                    }
                    $this->_html .= '</tbody></table></div>';
                }
            }
        } else {
            $categories = Category::getCategories((int) $cookie->id_lang, true, false);
            $this->_html .= '
			<label>' . $this->l('Choose a category') . '</label>
			<div class="margin-form">
				<form action="" method="post" id="categoriesForm">
					<select name="id_category" onchange="$(\'#categoriesForm\').submit();">
						<option value="0">' . $this->l('All') . '</option>';
            foreach ($categories as $category) {
                $this->_html .= '<option value="' . $category['id_category'] . '"' . ($id_category == $category['id_category'] ? ' selected="selected"' : '') . '>' . $category['name'] . '</option>';
            }
            $this->_html .= '
					</select>
				</form>
			</div>
			<div class="clear space"></div>
			' . $this->l('Click on a product to access its statistics.') . '
			<div class="clear space"></div>
			<h2>' . $this->l('Products available') . '</h2>
			<div style="overflow-y: scroll; height: 600px;">
			<table class="table" border="0" cellspacing="0" cellspacing="0">
			<thead>
				<tr>
					<th>' . $this->l('Ref.') . '</th>
					<th>' . $this->l('Name') . '</th>
					<th>' . $this->l('Stock') . '</th>
				</tr>
			</thead><tbody>';
            foreach ($this->getProducts($cookie->id_lang) as $product) {
                $this->_html .= '<tr><td>' . $product['reference'] . '</td><td><a href="' . $currentIndex . '&token=' . Tools::getValue('token') . '&module=' . $this->name . '&id_product=' . $product['id_product'] . '">' . $product['name'] . '</a></td><td>' . $product['quantity'] . '</td></tr>';
            }
            $this->_html .= '</tbody></table><br /></div><br />
				<a href="' . $_SERVER['REQUEST_URI'] . '&export=1"><img src="../img/admin/asterisk.gif" />' . $this->l('CSV Export') . '</a><br />';
        }
        $this->_html .= '</fieldset><br />
		<fieldset class="width3"><legend><img src="../img/admin/comment.gif" /> ' . $this->l('Guide') . '</legend>
		<h2>' . $this->l('Number of purchases compared to number of viewings') . '</h2>
			<p>
				' . $this->l('After choosing a category and selecting a product, informational graphs will appear. Then, you will be able to analyze them.') . '
				<ul>
					<li class="bullet">' . $this->l('If you notice that a product is successful and often purchased, but viewed infrequently, you should put it more prominently on your webshop front-office.') . '</li>
					<li class="bullet">' . $this->l('On the other hand, if a product has many viewings but is not often purchased, we advise you to check or modify this product\'s information, description and photography again.') . '
					</li>
				</ul>
			</p>
		</fieldset>';
        return $this->_html;
    }
예제 #15
0
    public function hookAdminStatsModules($params)
    {
        global $cookie, $currentIndex;
        $id_category = intval(Tools::getValue('id_category'));
        $currency = new Currency(Configuration::get('PS_CURRENCY_DEFAULT'));
        $this->_html = '<fieldset class="width3"><legend><img src="../modules/' . $this->name . '/logo.gif" /> ' . $this->displayName . '</legend>';
        if ($id_product = intval(Tools::getValue('id_product'))) {
            $product = new Product($id_product, false, intval($cookie->id_lang));
            $totalBought = $this->getTotalBought($product->id);
            $totalViewed = $this->getTotalViewed($product->id);
            $this->_html .= '<h3>' . $product->name . ' - ' . $this->l('Details') . '</h3>
			<p>' . $this->l('Conversion rate:') . ' ' . number_format($totalViewed ? $totalBought / $totalViewed : 0, 2) . '</p>
			<p>' . $this->l('Total bought:') . ' ' . $totalBought . '</p>
			<center>' . ModuleGraph::engine(array('type' => 'line', 'option' => '1-' . $id_product)) . '</center>
			<p>' . $this->l('Total viewed:') . ' ' . $totalViewed . '</p>
			<center>' . ModuleGraph::engine(array('type' => 'line', 'option' => '2-' . $id_product)) . '</center>';
            if ($hasAttribute = $product->hasAttributes() and $totalBought) {
                $this->_html .= '<h3 class="space">' . $this->l('Attribute sales distribution') . '</h3><center>' . ModuleGraph::engine(array('type' => 'pie', 'option' => '3-' . $id_product)) . '</center>';
            }
            if ($totalBought) {
                $sales = $this->getSales($id_product, $cookie->id_lang);
                $this->_html .= '<br class="clear" />
				<h3>' . $this->l('Sales') . '</h3>
				<div style="overflow-y: scroll; height: 600px;">
				<table class="table" border="0" cellspacing="0" cellspacing="0">
				<thead>
					<tr>
						<th>' . $this->l('Date') . '</th>
						<th>' . $this->l('Order') . '</th>
						' . ($hasAttribute ? '<th>' . $this->l('Attribute') . '</th>' : '') . '
						<th>' . $this->l('Qty') . '</th>
						<th>' . $this->l('Price') . '</th>
						<th>' . $this->l('Tax') . '</th>
					</tr>
				</thead><tbody>';
                foreach ($sales as $sale) {
                    $this->_html .= '
					<tr>
						<td>' . Tools::displayDate($sale['date_add'], intval($cookie->id_lang), false) . '</td>
						<td>' . intval($sale['id_order']) . '</td>
						' . ($hasAttribute ? '<td>' . $sale['product_name'] . '</td>' : '') . '
						<td>' . intval($sale['product_quantity']) . '</td>
						<td>' . Tools::displayprice($sale['total'], $currency) . '</td>
						<td>' . $sale['tax_name'] . '</td>
					</tr>';
                }
                $this->_html .= '</tbody></table></div>';
            }
        } else {
            $categories = Category::getCategories(intval($cookie->id_lang), true, false);
            $this->_html .= '
			<label>' . $this->l('Choose a category') . '</label>
			<div class="margin-form">
				<form action="" method="post" id="categoriesForm">
					<select name="id_category" onchange="$(\'#categoriesForm\').submit();">
						<option value="0">' . $this->l('All') . '</option>';
            foreach ($categories as $category) {
                $this->_html .= '<option value="' . $category['id_category'] . '"' . ($id_category == $category['id_category'] ? ' selected="selected"' : '') . '>' . $category['name'] . '</option>';
            }
            $this->_html .= '
					</select>
				</form>
			</div>
			<div class="clear space"></div>
			' . $this->l('Click on a product to access its statistics.') . '
			<div class="clear space"></div>
			<h2>' . $this->l('Products available') . '</h2>
			<div style="overflow-y: scroll; height: 600px;">
			<table class="table" border="0" cellspacing="0" cellspacing="0">
			<thead>
				<tr>
					<th>' . $this->l('Ref.') . '</th>
					<th>' . $this->l('Name') . '</th>
					<th>' . $this->l('Stock') . '</th>
				</tr>
			</thead><tbody>';
            foreach ($this->getProducts($cookie->id_lang) as $product) {
                $this->_html .= '<tr><td>' . $product['reference'] . '</td><td><a href="' . $currentIndex . '&token=' . Tools::getValue('token') . '&module=' . $this->name . '&id_product=' . $product['id_product'] . '">' . $product['name'] . '</a></td><td>' . $product['quantity'] . '</td></tr>';
            }
            $this->_html .= '</tbody></table></div>';
        }
        $this->_html .= '</fieldset><br />
		<fieldset class="width3"><legend><img src="../img/admin/comment.gif" /> ' . $this->l('Guide') . '</legend>
		<h2>' . $this->l('Number of purchases compared to number of viewings') . '</h2>
			<p>
				' . $this->l('After choosing a category and selecting a product available in this category, some graphs appear. Then, you can analyze them.') . '
				<ul>
					<li class="bullet">' . $this->l('If you notice that a product is successful, very purchased, but also little viewed: you should put it more prominently on your webshop front-office.') . '</li>
					<li class="bullet">' . $this->l('On the other hand, if a product knows a lot of viewings but is not really purchased: we advise you to check or modify this product\'s information, description and photography again.') . '
					</li>
				</ul>
			</p>
		</fieldset>';
        return $this->_html;
    }
예제 #16
0
    function hookAdminStatsModules()
    {
        if (Tools::getValue('export')) {
            $this->csvExport(array('type' => 'pie'));
        }
        $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($this->_query . ModuleGraph::getDateBetween() . $this->_query2);
        $this->_html = '
		<fieldset class="width3"><legend><img src="../modules/' . $this->name . '/logo.gif" /> ' . $this->displayName . '</legend>';
        $table = '<div style="overflow-y: scroll; height: 600px;">
		<table class="table" border="0" cellspacing="0" cellspacing="0">
		<thead>
			<tr>
				<th style="width:400px;">' . $this->l('Keywords') . '</th>
				<th style="width:50px; text-align: right">' . $this->l('Occurrences') . '</th>
				<th style="width:50px; text-align: right">' . $this->l('Results') . '</th>
			</tr>
		</thead><tbody>';
        foreach ($result as $row) {
            if (Tools::strlen($row['keywords']) >= Configuration::get('PS_SEARCH_MINWORDLEN')) {
                $table .= '<tr>
					<td>' . $row['keywords'] . '</td>
					<td style="text-align: right">' . $row['occurences'] . '</td>
					<td style="text-align: right">' . $row['total'] . '</td>
				</tr>';
            }
        }
        $table .= '</tbody></table></div>';
        if (sizeof($result)) {
            $this->_html .= '<center>' . ModuleGraph::engine(array('type' => 'pie')) . '</center>
									<p><a href="' . Tools::safeOutput($_SERVER['REQUEST_URI']) . '&export=1"><img src="../img/admin/asterisk.gif" />' . $this->l('CSV Export') . '</a></p>
									<br class="clear" />' . $table;
        } else {
            $this->_html .= '<p><strong>' . $this->l('No keywords searched more than once found.') . '</strong></p>';
        }
        $this->_html .= '</fieldset>';
        return $this->_html;
    }
예제 #17
0
    public function hookAdminStatsModules($params)
    {
        global $cookie;
        $totals = $this->getTotals();
        $currency = new Currency((int) Configuration::get('PS_CURRENCY_DEFAULT'));
        if (($id_export = (int) Tools::getValue('export')) == 1) {
            $this->csvExport(array('layers' => 2, 'type' => 'line', 'option' => '1-' . (int) Tools::getValue('id_country')));
        } elseif ($id_export == 2) {
            $this->csvExport(array('layers' => 0, 'type' => 'line', 'option' => '2-' . (int) Tools::getValue('id_country')));
        } elseif ($id_export == 3) {
            $this->csvExport(array('type' => 'pie', 'option' => '3-' . (int) Tools::getValue('id_country')));
        }
        $this->_html = '
		<fieldset class="width3"><legend><img src="../modules/' . $this->name . '/logo.gif" /> ' . $this->displayName . '</legend>
			<form action="' . $_SERVER['REQUEST_URI'] . '" method="post" style="float: right; margin-left: 10px;">
				<select name="id_country">
					<option value="0"' . (!Tools::getValue('id_order_state') ? ' selected="selected"' : '') . '>' . $this->l('All') . '</option>';
        foreach (Country::getCountries($cookie->id_lang) as $country) {
            $this->_html .= '<option value="' . $country['id_country'] . '"' . ($country['id_country'] == Tools::getValue('id_country') ? ' selected="selected"' : '') . '>' . $country['name'] . '</option>';
        }
        $this->_html .= '</select>
				<input type="submit" name="submitCountry" value="' . $this->l('Filter') . '" class="button" />
			</form>
			<p><center><img src="../img/admin/down.gif" />
				' . $this->l('These graphs represent the evolution of your orders and sales turnover for a given period. This tool allows for quick overview of the viability of your shop. You can also keep watch on the difference between time periods (like the holiday season). Only valid orders are included in these two graphs.') . '
			</center></p>
			<p>' . $this->l('Orders placed:') . ' ' . (int) $totals['orderCount'] . '</p>
			<p>' . $this->l('Products bought:') . ' ' . (int) $totals['products'] . '</p>
			<center>' . ModuleGraph::engine(array('type' => 'line', 'option' => '1-' . (int) Tools::getValue('id_country'), 'layers' => 2)) . '</center>
			<p><a href="' . $_SERVER['REQUEST_URI'] . '&export=1"><img src="../img/admin/asterisk.gif" alt="" />' . $this->l('CSV Export') . '</a></p>
			<p>' . $this->l('Sales:') . ' ' . Tools::displayPrice($totals['orderSum'], $currency) . '</p>
			<center>' . ModuleGraph::engine(array('type' => 'line', 'option' => '2-' . (int) Tools::getValue('id_country'))) . '</center></p>
			<p><a href="' . $_SERVER['REQUEST_URI'] . '&export=2"><img src="../img/admin/asterisk.gif" alt="" />' . $this->l('CSV Export') . '</a></p>
			<p class="space"><img src="../img/admin/down.gif" />
				' . $this->l('You can see the order state distribution below.') . '
			</p><br />
			' . ($totals['orderCount'] ? ModuleGraph::engine(array('type' => 'pie', 'option' => '3-' . (int) Tools::getValue('id_country'))) : $this->l('No orders for this period.')) . '</center>
			<p><a href="' . $_SERVER['REQUEST_URI'] . '&export=3"><img src="../img/admin/asterisk.gif" />' . $this->l('CSV Export') . '</a></p>
		</fieldset>
		<br class="clear" />
		<fieldset class="width3"><legend><img src="../img/admin/comment.gif" /> ' . $this->l('Guide') . '</legend>
			<h2>' . $this->l('Various order statuses') . '</h2>
			<p>
				' . $this->l('In your back-office, you can find the following order statuses : Awaiting check payment, Payment accepted, Preparation in progress, Shipping, Delivered, Cancelled, Refund, Payment error, Out of stock, and Awaiting bank wire payment.') . '<br />
				' . $this->l('Statuses cannot be removed from the back-office, but you have the option to add more.') . '
			</p>
		</fieldset>';
        return $this->_html;
    }