Matteus Posted January 29, 2014 Report Share Posted January 29, 2014 Пользователь залогинился, и по его е-мэйл или телефону отбираются заказы из базы и потом вывести в виде ссылок на странице пользователя. Кто-то делал такое? Не подскажете? Quote Link to post Share on other sites
Matteus Posted January 29, 2014 Author Report Share Posted January 29, 2014 Вроде бы стандартно это есть...Вроде бы или есть? Я, честно, не знал. Не подскажете как вывести в шаблон? Quote Link to post Share on other sites
Kosjak76 Posted January 29, 2014 Report Share Posted January 29, 2014 Есть точно.Как вывести - смотрите в шаблоне default Quote Link to post Share on other sites
Matteus Posted January 29, 2014 Author Report Share Posted January 29, 2014 О! Спасибо, Константин) Я что-то не догадался сразу. Quote Link to post Share on other sites
Matteus Posted January 29, 2014 Author Report Share Posted January 29, 2014 {if $orders} <p></p> <h2>Ваши заказы</h2> <ul id="orders_history"> {foreach name=orders item=order from=$orders} <li> {$order->date|date} <a href='order/{$order->url}'>Заказ №{$order->id}</a> {if $order->paid == 1}оплачен,{/if} {if $order->status == 0}ждет обработки{elseif $order->status == 1}в обработке{elseif $order->status == 2}выполнен{/if} </li> {/foreach} </ul> {/if} вот оно в шаблоне Quote Link to post Share on other sites
Kosjak76 Posted January 29, 2014 Report Share Posted January 29, 2014 Ага Quote Link to post Share on other sites
Matteus Posted January 29, 2014 Author Report Share Posted January 29, 2014 Хм. Работает, если оставить заказ, когда ползователь залогинен. Представим, что не залогинен. Как можно сделать проверку по емейл: "если заказы с таким емейлом (телфоном) есть в базе -> выводим" Quote Link to post Share on other sites
Matteus Posted January 29, 2014 Author Report Share Posted January 29, 2014 Представляю, что можно зарегистрировать пользователя при заказе.. и сформировать ему пароль. Quote Link to post Share on other sites
Matteus Posted January 29, 2014 Author Report Share Posted January 29, 2014 Или, допустим, пользователь несколько раз уже покупал товар.. Потом зарегистрировался. И у при регистрации отыскались все заказы с этим емэйл и телефоном. Так было бы лучше, а то принудительная регистрация - это не хорошо ) Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.