public function viewProfile($user_code_seo_title)
 {
     $error_msg = trans('webshopauthenticate::myaccount/viewProfile.invalid_user');
     $d_arr = $breadcrumb_arr = $user_arr = array();
     $user_id = CUtil::getUserIdFromSlug($user_code_seo_title);
     $shop_url = '';
     if ($user_id != '') {
         $user_arr = User::where('id', '=', $user_id)->first(array('id', 'created_at'));
         if (count($user_arr) > 0) {
             $error_msg = '';
             $user_details = array();
             $user_details = \Webshoppack::getUserDetails($user_id);
             //\Agriya\Webshoppack\CUtil::getUserDetails($user_id);
             $breadcrumb_arr[] = $user_details['display_name'];
             $title = str_replace('VAR_USER_NAME', $user_details['display_name'], trans('meta.viewprofile_title'));
             $user_arr['is_shop_owner'] = CUtil::isShopOwner($user_id);
             //if($user_arr['is_shop_owner'])
             //{
             //$mp_product_service = new \Agriya\Webshoppack\ProductService();
             //$d_arr['shop_details'] = \Webshoppack::getShopDetails($user_id);
             //$d_arr['shop_product_list'] = \Webshoppack::fetchShopItems($user_id, $this->shop_product_list_limit);
             //$shop_url = \Webshoppack::getProductShopURL($d_arr['shop_details']['id'], $d_arr['shop_details']);
             //}
         }
     }
     $d_arr['error_msg'] = $error_msg;
     //$d_arr['shop_url'] = $shop_url;
     $user = \Config::get('webshoppack::logged_user_id');
     $logged_user_id = $user();
     return \View::make('webshopauthenticate::myaccount.userProfile', compact('user_details', 'breadcrumb_arr', 'd_arr', 'user_id', 'user_arr', 'logged_user_id'));
 }
		<li @if($route_action == 'Agriya\Webshopauthenticate\ProfileController@viewProfile') class="active" @endif><i class="fa fa-angle-right"></i> <span>{{ HTML::link($user_details['profile_url'], trans('webshopauthenticate::myaccount/viewProfile.profile'), array()) }}</span></li>

		@if(Sentry::check())
			@if($logged_user_id != $user_id )
				<li><a href="{{Url::to(\Config::get('webshoppack::shop_uri').'/user/message/add/'.$user_details['user_code']) }}" class="fn_signuppop"><i class="fa fa-angle-right"></i><span>{{ trans('webshopauthenticate::myaccount/viewProfile.contact') }}</span></a></li>
			@endif
		@else
			<?php 
$login_url = \url(\Config::get('webshopauthenticate::uri') . '/login?form_type=selLogin');
?>
			<li><a href="{{Url::to(\Config::get('webshoppack::shop_uri').'/user/message/add/'.$user_details['user_code']) }}" class="fn_signuppop"><i class="fa fa-angle-right"></i><span>{{ trans('webshopauthenticate::myaccount/viewProfile.contact') }}</span></a></li>
			<!--<li><a href="{{ $login_url }}" class="fn_signuppop"><i class="fa fa-angle-right"></i><span>{{ trans('webshopauthenticate::myaccount/viewProfile.contact') }}</span></a></li>-->
		@endif
	</ul>
</div>
{{-- Shop block start --}}
<div class="aside-bar">
	<div class="title-block">
		<h3>{{ trans('webshopauthenticate::myaccount/viewProfile.shop') }}</h3>
    </div>
	@if($user_arr['is_shop_owner'] == 'Yes')
		<?php 
$d_arr['shop_details'] = \Webshoppack::getShopDetails($user_arr['id']);
?>
		<a href="{{ $d_arr['shop_details']['shop_url'] }}"><strong>{{{ $d_arr['shop_details']['shop_name'] }}}</strong></a>
		<p class="text-muted mt10">{{{ $d_arr['shop_details']['shop_slogan'] }}}</p>
	@else
		<p class="alert alert-info">{{ trans('webshopauthenticate::myaccount/viewProfile.shop_not_added_yet') }}</p>
	@endif
</div>
{{-- Shop block end --}}
示例#3
0
<div class="panel panel-info no-mar">
    <div class="panel-heading">
        @if(count($d_arr['shop_product_list']) > 0)
            <a href='{{ $d_arr['shop_url'] }}' class="pull-right"><i class="fa fa-angle-double-right"></i> see more</a>
        @endif
        <h4>Shop Products</h4>
    </div>
    @if(count($d_arr['shop_product_list']) > 0)
        <ul class="list-unstyled list-inline userprofile-shop clearfix mb0">
            @foreach($d_arr['shop_product_list'] AS $prd)
                <?php 
$p_img_arr = Webshoppack::populateProductDefaultThumbImages($prd->id);
$p_thumb_img = Webshoppack::getProductDefaultThumbImage($prd->id, 'thumb', $p_img_arr);
$view_url = Webshoppack::getProductViewURL($prd->id, $prd);
?>
                <li>
                    <a href="{{ $view_url }}" class="img81x64"><img src="{{ $p_thumb_img['image_url'] }}" @if(isset($p_thumb_img["thumbnail_width"])) width='{{ $p_thumb_img["thumbnail_width"] }}' height='{{ $p_thumb_img["thumbnail_height"] }}' @endif title="{{ $prd->product_name  }}" alt="{{ $prd->product_name  }}" /></a>
                </li>
            @endforeach
        </ul>
    @else
        <div class="alert alert-info">No Products Found</div>
    @endif
</div>