28 lines
973 B
PHP
28 lines
973 B
PHP
<?php
|
||
|
||
|
||
\DB::set("ALTER TABLE `cart` ADD `order` int(10) NULL");
|
||
|
||
|
||
ini_set( 'display_errors', 0 );
|
||
//Получаем данные пользователя
|
||
|
||
if ($_SESSION['user_id']){
|
||
$user=\DB::getAll("SELECT * FROM `users` WHERE `id`=?", $_SESSION['user_id']);
|
||
$smarty -> assign( 'user', $user );
|
||
//получаем организации пользователя
|
||
$orgs=\DB::getAll("SELECT * FROM `org` WHERE `id` IN (SELECT `org` FROM `users_orgs` WHERE `user`=?)", $_SESSION['user_id']);
|
||
$smarty -> assign( 'orgs', $orgs );
|
||
$ad=\DB::getAll("SELECT * FROM `adres_dostavki` WHERE `user_id`=?", $_SESSION['user_id']);
|
||
$smarty -> assign( 'ad', $ad );
|
||
}
|
||
//print_r(core::getCart());
|
||
|
||
$cart=core::getCart();
|
||
|
||
$smarty -> assign( 'itogcart', $cart['cart'] );
|
||
$smarty -> assign( 'summ', $cart['summ'] );
|
||
|
||
//Получить данные об организации
|
||
//Получить адреса доставки
|
||
?>
|