Максим

Максим

Был в сети 09 августа 2023, 13:12
Заказы принимаю
[2018-02-21 14:45:31] (ERROR @ /var/www/u0459941/data/www/cloverflower.ru/core/components/minishop2/model/minishop2/msorderhandler.class.php : 381) PHP warning: Invalid argument supplied for foreach()
[2018-02-21 14:45:33] (ERROR @ /var/www/u0459941/data/www/cloverflower.ru/core/xpdo/xpdo.class.php : 644) Could not load class: msoptionsprice from msoptionsprice.msoptionsprice.
[2018-02-21 14:45:33] (ERROR @ /var/www/u0459941/data/www/cloverflower.ru/core/xpdo/xpdo.class.php : 1247) Problem getting service msoptionsprice.msoptionsprice, instance of class msoptionsprice.msoptionsprice, from path /var/www/u0459941/data/www/cloverflower.ru/core/components/msoptionsprice/model/
делайте ссылку с id юзера на страницу просмотора
типа такого
<a href="profil?usr=Alex" class="link_user">Подробнее</a>
и на странице пользователя как-то так:

сниппет
<?php
$out="";
$tpl="profile_page";
if (!empty($_REQUEST['usr']))
$opt=array('username'=>$_REQUEST['usr']);
if (!empty($_REQUEST['usrid']))
$opt=$_REQUEST['usrid'];
$user = $modx->getObject('modUser',$opt);
if(isset($user)){
$userinfo=$user->getOne('Profile');
$msg=$userinfo->toArray();
$msg['username']=$user->get('username');
$out .= $modx->getChunk($tpl, $msg) . $outputSeparator;
}else $out='пользователь не найден.';
return $out;

и чанк
[[If?
   &subject=`[[!+fullname]]`
   &operator=`!empty`

   &then=`[[!+fullname]]`
&else=`[[!+username]]`
]]