Last active
January 4, 2020 19:02
-
-
Save rafhaelhp/e76bd7f9aaba8b4e8c0ad1c1d97d3bda to your computer and use it in GitHub Desktop.
Ultimos pedidos Mercado Livre Dashboard
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* ===================================================== | |
* Opcional: Box de exibição dos ultimos pedidos Mercado Livre para ser exibido na dashboard do painel. | |
* ===================================================== | |
*/ | |
<div class="box box50"> | |
<div class="panel_header alert"> | |
<h2 class="icon-cart">ÚLTIMOS PEDIDOS MERCADO LIVRE:</h2> | |
</div> | |
<div class="panel dashboard_orders"> | |
<?php | |
$Read->FullRead("SELECT * FROM " . DB_ML_ORDERS . " ORDER BY order_date DESC LIMIT 4"); | |
if (!$Read->getResult()): | |
echo Erro("<span class='icon-info al_center'>Ainda não existem pedidos realizados através do Mercado Livre!</span>", E_USER_NOTICE); | |
else: | |
foreach ($Read->getResult() as $Order): | |
extract($Order); | |
echo "<p class='order'><span><a title='Detalhes do pedido' href='dashboard.php?wc=mercadolivre/order&id={$order_id}'>#{$ml_order_id}</a></span><span>" . date("d/m/Y", strtotime($order_date)) . "</span><span>R$ " . number_format($order_price, '2', ',', '.') . "</span><span>" . getMlOrderStatus($order_status)['name'] . "</span></p>"; | |
endforeach; | |
endif; | |
?> | |
<div class="clear"></div> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment