fixed user dashboard for store owner (store settings, store reports)/ fixed login/register page/
This commit is contained in:
@@ -50,25 +50,34 @@ class TeamStoreController extends Controller {
|
||||
foreach ($product_array as $p => $pr_arr) {
|
||||
|
||||
$thumbnails_array = $m->getProductThumbnails($pr_arr->Id);
|
||||
foreach ($thumbnails_array as $t => $thumb) {
|
||||
|
||||
if($thumb->ImageClass == 'custom'){
|
||||
$displayThumbnails = $thumb->Image;
|
||||
break;
|
||||
if(!empty($thumbnails_array)){
|
||||
foreach ($thumbnails_array as $t => $thumb) {
|
||||
|
||||
if($thumb->ImageClass == 'custom'){
|
||||
$displayThumbnails = $thumb->Image;
|
||||
break;
|
||||
}
|
||||
|
||||
if($thumb->ImageClass == 'active'){
|
||||
$displayThumbnails = $thumb->Image;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if($thumb->ImageClass == 'active'){
|
||||
$displayThumbnails = $thumb->Image;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$thumbnails[] = array(
|
||||
'folder' => $store_array[0]->ImageFolder,
|
||||
'product_id' => $pr_arr->Id,
|
||||
'thumb' => $displayThumbnails
|
||||
|
||||
);
|
||||
|
||||
$thumbnails[] = array(
|
||||
'folder' => $store_array[0]->ImageFolder,
|
||||
'product_id' => $pr_arr->Id,
|
||||
'thumb' => $displayThumbnails
|
||||
|
||||
);
|
||||
}else{
|
||||
$thumbnails[] = array(
|
||||
'folder' => $store_array[0]->ImageFolder,
|
||||
'product_id' => $pr_arr->Id,
|
||||
'thumb' => "product-image-placeholder.png"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// var_dump($thumbnails);
|
||||
@@ -100,7 +109,6 @@ class TeamStoreController extends Controller {
|
||||
// var_dump(array_unique($arr_teamstore));
|
||||
|
||||
$m = new TeamStoreModel;
|
||||
|
||||
$q = $request->input('q');
|
||||
$sort = $request->input('s');
|
||||
|
||||
@@ -139,9 +147,6 @@ class TeamStoreController extends Controller {
|
||||
->with('stores_array', $stores_array)
|
||||
->with('keyword', $q)
|
||||
->with('filter', $sort);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function checkTeamStorePassword(Request $request)
|
||||
@@ -168,11 +173,21 @@ class TeamStoreController extends Controller {
|
||||
$teams_array = array();
|
||||
$store_array = $m->selectTeamStore('StoreUrl', $teamStoreURL);
|
||||
$product_array = $m->selectTeamStoreProducts('ProductURL', $productURL);
|
||||
// var_dump($product_array);
|
||||
|
||||
$thumbnails_array = $m->getThumbnails($product_array[0]->Id);
|
||||
$teams_array = $m->getTeams($product_array[0]->Id);
|
||||
// $sizes_array = $m->getSizes();
|
||||
|
||||
if(empty($thumbnails_array)){
|
||||
|
||||
$data = (object) array(
|
||||
'Image' => 'product-image-placeholder.png',
|
||||
'ImageClass' => 'active'
|
||||
);
|
||||
|
||||
|
||||
$thumbnails_array[] = $data;
|
||||
}
|
||||
|
||||
|
||||
$x = explode(",", $product_array[0]->AvailableSizes );
|
||||
|
||||
Reference in New Issue
Block a user