search

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
User avatar
harshithvemula
Posts: 33
Joined: 19 Jul 2020, 16:27

search

Post by harshithvemula » 30 Jul 2020, 15:19

1) I am trying to add search bar without categories and suppliers to the header. So i have added catalog/search in app.blade.php.

Code: Select all

</ul>
<?= $aibody['catalog/search'] ?>
@yield('aimeos_head')	
</div>

and also i have added in config/shop.php

Code: Select all

'page' => array(
		'app' => array('catalog/search'),
	),
and i am getting this error ErrorException Invalid argument supplied for foreach() http://127.0.0.1:8000/shop.I tried adding this search bar in account,cart and it works fine.Please help me.

2) I have added banners in app.blade.php but the banners are reflecting in every page like account,cart everywhere.How to limit them to display only in shop page.

3) How to decrease the size of header

4) when i add another css page to the app.blade.php the website crashes.

5) How to add categories in horizontal list view on header like structure

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: search

Post by aimeos » 31 Jul 2020, 09:42

harshithvemula wrote: 30 Jul 2020, 15:19 1) I am trying to add search bar without categories and suppliers to the header. So i have added catalog/search in app.blade.php.

Code: Select all

'page' => array(
		'app' => array('catalog/search'),
	),
and i am getting this error ErrorException Invalid argument supplied for foreach() http://127.0.0.1:8000/shop.I tried adding this search bar in account,cart and it works fine.Please help me.
There is no page "app" by default and you have to create it:
https://aimeos.org/docs/Laravel/Create_new_pages
harshithvemula wrote: 30 Jul 2020, 15:19 3) How to decrease the size of header
Use CSS
harshithvemula wrote: 30 Jul 2020, 15:19 4) when i add another css page to the app.blade.php the website crashes.
Most likely, you've added invalid HTML
harshithvemula wrote: 30 Jul 2020, 15:19 5) How to add categories in horizontal list view on header like structure
Add the "catalog/tree" component and change the styling with CSS
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
harshithvemula
Posts: 33
Joined: 19 Jul 2020, 16:27

Re: search

Post by harshithvemula » 31 Jul 2020, 15:14

This the app.blade.php file and when i edit this file i can see changes in/shop page and if this is not the page to work then how to edit the header and also the shop page



Code: Select all

<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	@yield('aimeos_header')

   
 

	<title>Aimeos on Laravel</title>
	<link type="text/css" rel="stylesheet" href='https://fonts.googleapis.com/css?family=Roboto:400,300'>
	<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
	<style>
		/* Theme: Black&White */
		/* body {
			--ai-primary: #000; --ai-primary-light: #000; --ai-primary-alt: #fff;
			--ai-bg: #fff; --ai-bg-light: #fff; --ai-bg-alt: #000;
			--ai-secondary: #555; --ai-light: #D0D0D0;
		} */
		body { color: #000; color: var(--ai-primary, #000); background-color: #fff; background-color: var(--ai-bg, #fff); }
		.navbar, footer { color: #000; color: var(--ai-primary-alt, #000); background-color: #f8f8f8; background-color: var(--ai-bg-alt, #2874f0); }
		.navbar a, .navbar a:before, .navbar span, footer a { color: #000 !important; color: var(--ai-primary-alt, #fff) !important; }
		.sm:before { font: normal normal normal 14px/1 FontAwesome; padding: 0 0.2em; font-size: 225% }
		.facebook:before { content: "\f082" } .twitter:before { content: "\f081" } .instagram:before { content: "\f16d" } .youtube:before { content: "\f167" }
	</style>
	@yield('aimeos_styles')
</head>
<body>
	<nav class="navbar navbar-expand-md navbar-light mb-5">
		<a class="navbar-brand" href="/">
			<img src="http://aimeos.org/fileadmin/template/icons/logo.png" height="30" title="Aimeos Logo">
		</a>
		<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
			<span class="navbar-toggler-icon"></span>
		</button>
		<div class="collapse navbar-collapse justify-content-end" id="navbarNav">
			<ul class="navbar-nav">
				@if (Auth::guest())
					<li class="nav-item"><a class="nav-link" href="/login">Login</a></li>
					<li class="nav-item"><a class="nav-link" href="/register">Register</a></li>
				@else
				<li class="nav-item"><a class="nav-link" href="/shop">Home</a></li>
					<li class="nav-item dropdown">
						<a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">{{ Auth::user()->name }} <span class="caret"></span></a>
						<ul class="dropdown-menu" role="menu">
							<li><a class="nav-link" href="{{ route('aimeos_shop_account',['site'=>Route::current()->parameter('site','default'),'locale'=>Route::current()->parameter('locale','en'),'currency'=>Route::current()->parameter('currency','EUR')]) }}" title="Profile">Profile</a></li>
							<li><form id="logout" action="/logout" method="POST">{{csrf_field()}}</form><a class="nav-link" href="javascript: document.getElementById('logout').submit();">Logout</a></li>
						</ul>
					</li>
				@endif
			</ul>
		
			@yield('aimeos_head')	
		</div>
	</nav>
	<div class="container">
		@yield('aimeos_nav')
		@yield('aimeos_stage')
		@yield('aimeos_body')
		@yield('aimeos_aside')
		@yield('content')
	</div>
	<footer class="mt-5 p-5">
		<div class="row">
			<div class="col-md-8">
				<div class="row">
					<div class="col-sm-6 my-4"><h2>LEGAL</h2><p><a href="#">Terms & Conditions</a></p><p><a href="#">Privacy Notice</a></p><p><a href="#">Imprint</a></p></div>
					<div class="col-sm-6 my-4"><h2>ABOUT US</h2><p><a href="#">Contact us</a></p><p><a href="#">Company</a></p></div>
				</div>
			</div>
			<div class="col-md-4 my-4">
				<div class="social"><a href="#" class="sm facebook"></a><a href="#" class="sm twitter"></a><a href="#" class="sm instagram"></a><a href="#" class="sm youtube"></a></div>
				<a class="px-2 py-4 d-inline-block" href="/"><img src="http://aimeos.org/fileadmin/template/icons/logo.png" style="width: 160px" title="Aimeos Logo"></a>
			</div>
		</div>
	</footer>
	<!-- Scripts -->
	<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
	<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"></script>
	<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
	@yield('aimeos_scripts')
	</body>
</html>

User avatar
harshithvemula
Posts: 33
Joined: 19 Jul 2020, 16:27

Re: search

Post by harshithvemula » 02 Aug 2020, 09:24

please help me

Post Reply