change icons, css, add routing to merchandise, add mail templater, fixes
This commit is contained in:
@@ -14,6 +14,7 @@ class ArticleController extends Controller
|
||||
{
|
||||
$data['article'] = Articles::getArticleToSell($id);
|
||||
// $data['breadcrumb'] = Categories::getAncestorsByCategory($category_id);
|
||||
$data['offers2'] = Articles::getSiblings($id)->toArray();
|
||||
// dump($data);
|
||||
// exit;
|
||||
return view('Shop.Articles.show', $data);
|
||||
|
||||
@@ -10,6 +10,7 @@ use App\Repositories\Shop\Categories;
|
||||
use App\Repositories\Shop\TagGroups;
|
||||
|
||||
use App\Datatables\Shop\CategoriesDataTable;
|
||||
use App\Repositories\Shop\ArticleNatures;
|
||||
|
||||
class CategoryController extends Controller
|
||||
{
|
||||
@@ -18,43 +19,52 @@ class CategoryController extends Controller
|
||||
return $dataTable->render('Shop.Categories.list');
|
||||
}
|
||||
|
||||
public function show(Request $request, $category_id)
|
||||
public function show(Request $request, $category_id, $article_nature_id = false)
|
||||
{
|
||||
switch ($request->input('article_nature')) {
|
||||
case 'semences':
|
||||
$product_type = 'botanic';
|
||||
$article_nature_id = 1;
|
||||
break;
|
||||
case 'plants':
|
||||
$product_type = 'botanic';
|
||||
$article_nature_id = 2;
|
||||
break;
|
||||
case 'legumes':
|
||||
$product_type = 'botanic';
|
||||
$article_nature_id = 3;
|
||||
break;
|
||||
default:
|
||||
$product_type = 'botanic';
|
||||
$article_nature_id = 1;
|
||||
break;
|
||||
if ($article_nature_id) {
|
||||
$product_type = ArticleNatures::getProductType($article_nature_id);
|
||||
dump($product_type);
|
||||
exit;
|
||||
} else {
|
||||
// $product_type = Articles::getProductTypeByCategory($category_id);
|
||||
// dump($product_type);
|
||||
switch ($request->input('article_nature')) {
|
||||
case 'semences':
|
||||
$product_type = 'botanic';
|
||||
$article_nature_id = 1;
|
||||
break;
|
||||
case 'plants':
|
||||
$product_type = 'botanic';
|
||||
$article_nature_id = 2;
|
||||
break;
|
||||
case 'legumes':
|
||||
$product_type = 'botanic';
|
||||
$article_nature_id = 3;
|
||||
break;
|
||||
default:
|
||||
$product_type = 'botanic';
|
||||
$article_nature_id = 1;
|
||||
break;
|
||||
}
|
||||
// $product_type = ArticleNatures::getProductType($article_nature_id);
|
||||
// dump($product_type);
|
||||
}
|
||||
$data = [
|
||||
'category' => Categories::getFull($category_id),
|
||||
'breadcrumb' => Categories::getAncestorsByCategory($category_id),
|
||||
'display_by_rows' => $request->input('display_by_rows') ?? false,
|
||||
'product_type' => $product_type,
|
||||
'article_nature' => $request->input('article_nature'),
|
||||
'article_nature' => $article_nature_id,
|
||||
'tags_selected' => $request->input('tags') ?? [],
|
||||
'articles' => Articles::getArticlesToSell([
|
||||
'category_id' => $category_id,
|
||||
'tags' => $request->input('tags') ?? [],
|
||||
'product_type' => $product_type,
|
||||
'product_type' => $product_type ?? false,
|
||||
'article_nature_id' => $article_nature_id ?? false,
|
||||
]),
|
||||
'tags' => TagGroups::getWithTagsAndCountOffers($category_id),
|
||||
];
|
||||
// dump($data);
|
||||
// exit;
|
||||
return view('Shop.Shelves.shelve', $data);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user