2022-12-11 13:55:49 +05:00
|
|
|
|
<?php
|
2023-03-11 21:03:29 +05:00
|
|
|
|
|
|
|
|
|
|
2023-07-12 20:02:20 +05:00
|
|
|
|
\DB::set("ALTER TABLE `cart` ADD `order` int(10) NULL");
|
2023-03-11 21:03:29 +05:00
|
|
|
|
|
|
|
|
|
|
2022-12-24 21:12:23 +05:00
|
|
|
|
ini_set( 'display_errors', 0 );
|
2023-03-11 21:03:29 +05:00
|
|
|
|
//Получаем данные пользователя
|
2023-07-12 20:02:20 +05:00
|
|
|
|
|
|
|
|
|
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'] );
|
2023-03-11 21:03:29 +05:00
|
|
|
|
|
2022-12-24 21:12:23 +05:00
|
|
|
|
//Получить данные об организации
|
|
|
|
|
//Получить адреса доставки
|
2022-12-11 13:55:49 +05:00
|
|
|
|
?>
|