This commit is contained in:
2026-03-28 11:33:56 +01:00
parent 412e235512
commit aa8e21862d
132 changed files with 24381 additions and 10882 deletions

View File

@@ -32,7 +32,7 @@
</tr>
</thead>
<tbody>
<? if ( \S::is_array_fix( $this -> last_orders ) ): foreach ( $this -> last_orders as $order ):?>
<? if ( \Shared\Helpers\Helpers::is_array_fix( $this -> last_orders ) ): foreach ( $this -> last_orders as $order ):?>
<tr class="status-<?= $order['status'];?>">
<td><?= date( "Y-m-d H:i", strtotime( $order['date_order'] ) );?></td>
<td>
@@ -122,8 +122,8 @@
</tr>
</thead>
<tbody>
<? if ( \S::is_array_fix( $this -> best_sales_products ) ): foreach ( $this -> best_sales_products as $row ):?>
<? $product = \shop\Product::getFromCache( (int)$row['parent_product_id'], \front\factory\Languages::default_language() );?>
<? if ( \Shared\Helpers\Helpers::is_array_fix( $this -> best_sales_products ) ): foreach ( $this -> best_sales_products as $row ):?>
<? $product = (new \Domain\Product\ProductRepository($GLOBALS['mdb']))->findCached( (int)$row['parent_product_id'], ( new \Domain\Languages\LanguagesRepository( $GLOBALS['mdb'] ) )->defaultLanguage() );?>
<tr>
<td>
<?
@@ -132,7 +132,7 @@
echo '<img src="'. $product['images'][0]['src'] . '">';
?>
</td>
<td><?= $product -> language['name'];?></td>
<td><?= $product['language']['name'];?></td>
<td class="text-center"><?= $row['quantity_summary'];?></td>
<td class="text-right"><?= number_format( $row['sales'], 2, '.', " " );?> zł</td>
</tr>
@@ -157,8 +157,8 @@
</tr>
</thead>
<tbody>
<? if ( \S::is_array_fix( $this -> most_view_products ) ): foreach ( $this -> most_view_products as $row ):?>
<? $product = new \shop\Product( $row['id'] );?>
<? if ( \Shared\Helpers\Helpers::is_array_fix( $this -> most_view_products ) ): foreach ( $this -> most_view_products as $row ):?>
<? $product = ( new \Domain\Product\ProductRepository( $GLOBALS['mdb'] ) )->findCached( $row['id'] );?>
<tr>
<td>
<?