me42th / eco

Framework Opensource para Comercio Virtual
http://cabra.io
GNU Affero General Public License v3.0
0 stars 0 forks source link

CODIGO REPETIDO ROTAS #14

Open me42th opened 5 years ago

me42th commented 5 years ago

COLOCAR CODIGO DAS ROTAS NA SUPER CLASSE DE ROTAS

FILE: ROUTE_SITE_USER

$app->get("/perfil/pedido/:idorder",function($idorder){
    User::verify_login();

    $order = Order::find_by_id($idorder);
    $resume = Cart::get_resume();
    $page = new Page(debug(),get_home_header($resume['amount'], $resume['sum']));
    $resume = Cart::get_resume($order['idcart']); 
    $products = $resume['products'];
    $amount = $resume['amount'];
    $vlfreight = Cart::find($order['idcart'])[0]['vlfreight'];
    $page->setTpl("profile-orders-detail",[
        'order' => $order,
        'products' => $products,
        'amount' => $amount,
        'vlfreight' => $vlfreight
    ]);
});