Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
sales.phtml
Go to the documentation of this file.
1 <?php
7 // @codingStandardsIgnoreFile
8 
11 $singleStoreMode = $block->isSingleStoreMode();
12 ?>
13 <div class="entry-edit fieldset-wrapper">
14 
15  <div class="fieldset-wrapper-title">
16  <span class="title"><?= $block->escapeHtml(__('Sales Statistics')) ?></span>
17  </div>
18 
19  <table class="data-table">
20  <thead>
21  <tr>
22  <?php if (!$singleStoreMode): ?>
23  <th><?= $block->escapeHtml(__('Web Site')) ?></th>
24  <th><?= $block->escapeHtml(__('Store')) ?></th>
25  <th><?= $block->escapeHtml(__('Store View')) ?></th>
26  <?php endif; ?>
27  <th><?= $block->escapeHtml(__('Lifetime Sales')) ?></th>
28  <th class="last"><?= $block->escapeHtml(__('Average Sale')) ?></th>
29  </tr>
30  </thead>
31  <?php if (!$singleStoreMode): ?>
32  <tfoot>
33  <tr>
34  <td colspan="3"><strong><?= $block->escapeHtml(__('All Store Views')) ?></strong></td>
35  <td class="emph"><strong><?= $block->escapeHtml($block->formatCurrency($block->getTotals()->getBaseLifetime())) ?></strong></td>
36  <td class="emph last"><strong><?= $block->escapeHtml($block->formatCurrency($block->getTotals()->getAvgsale())) ?></strong></td>
37  </tr>
38  </tfoot>
39  <?php endif; ?>
40  <?php if ($block->getRows()): ?>
41  <tbody>
42  <?php $_i = 0; ?>
43  <?php foreach ($block->getRows() as $_websiteId => $_groups): ?>
44  <?php $_websiteRow = false; ?>
45  <?php foreach ($_groups as $_groupId => $_stores): ?>
46  <?php $_groupRow = false; ?>
47  <?php foreach ($_stores as $_row): ?>
48  <?php if (!$singleStoreMode): ?>
49  <?php if ($_row->getStoreId() == 0): ?>
50  <td colspan="3"><?= $block->escapeHtml($_row->getStoreName()) ?></td>
51  <?php else: ?>
52  <tr<?= ($_i++ % 2 ? ' class="even"' : '') ?>>
53  <?php if (!$_websiteRow): ?>
54  <td rowspan="<?= $block->escapeHtmlAttr($block->getWebsiteCount($_websiteId)) ?>"><?= $block->escapeHtml($_row->getWebsiteName()) ?></td>
55  <?php $_websiteRow = true; ?>
56  <?php endif; ?>
57  <?php if (!$_groupRow): ?>
58  <td rowspan="<?= count($_stores) ?>"><?= $block->escapeHtml($_row->getGroupName()) ?></td>
59  <?php $_groupRow = true; ?>
60  <?php endif; ?>
61  <td><?= $block->escapeHtml($_row->getStoreName()) ?></td>
62  <?php endif; ?>
63  <?php else: ?>
64  <tr>
65  <?php endif; ?>
66  <td><?= $block->escapeHtml($block->formatCurrency($_row->getLifetime(), $_row->getWebsiteId())) ?></td>
67  <td><?= $block->escapeHtml($block->formatCurrency($_row->getAvgsale(), $_row->getWebsiteId())) ?></td>
68  </tr>
69  <?php endforeach; ?>
70  <?php endforeach; ?>
71  <?php endforeach; ?>
72  </tbody>
73  <?php else: ?>
74  <tbody>
75  <tr class="hidden"><td colspan="<?= /* @noEscape */ $singleStoreMode ? 2 : 5 ?>"></td></tr>
76  </tbody>
77  <?php endif; ?>
78  </table>
79 </div>
if(! $singleStoreMode)(__( 'Web Site')) ?></th >< th ><? endif
Definition: sales.phtml:25
__()
Definition: __.php:13
$block
Definition: block.php:8
endforeach
Definition: sales.phtml:67
$singleStoreMode
Definition: sales.phtml:11
if($block->getRows()) foreach($block->getRows() as $_websiteId=> $_groups) foreach($_groups as $_groupId=> $_stores) foreach( $_stores as $_row)(! $singleStoreMode)( $_row->getStoreId()==0)( $_row->getStoreName()) ?></td ><?php else( $_i++% 2 ? ' class="even"' :'') ?>><?php if(! $_websiteRow)( $block->getWebsiteCount( $_websiteId)) ?>"><? $_websiteRow
Definition: sales.phtml:55
if(empty( $_rates))( 'You must first configure currency options before being able to see currency rates.') ?></p ></div ><?php else() ?>"> <? $_i
Definition: matrix.phtml:30
if(! $_groupRow)( $_stores) ?>"><? $_groupRow
Definition: sales.phtml:59