262 results
Sorted by relevance
Search / Listings
How can I add custom attributes to the listing model?
You can extend the
\Aero\Search\Elastic\Pipelines\ListingAttributes pipeline to add custom attributes to the listing model.
For example you can modify the listing's name to include the attributes when the listing is split by them.
\Aero\Search\Elastic\Pipelin...
Search / Listings
How can I add a custom facet?
You can add a custom facet by extending the listing document.
For example you can add a Stock Status facet:
\Aero\Search\Elastic\Documents\ListingDocument::add('string-facets', function ($document) {
$stock = $document->getModel()->availableStock() > 0;
...
Search / Listings
How can I pre-filter listings?
There may be occasions where you need to pre-filter listings. For example, you may want to only show listings that have stock:
\Aero\Search\Elastic\Repositories\ElasticListings::extend(function (\Aero\Search\Elastic\Repositories\ElasticListings $listings) {
...
Search / Documents
What are the available documents?
There are 2 documents available:
Aero\Search\Elastic\Documents\ListingsDocument used to hold information about the listings that are shown on the storefront.
Aero\Search\Elastic\Documents\ProductDocument used to hold information about the products within the s...
Search / General
How do I re-index documents?
Aero automatically manages indexing changes to documents.
For example, if a product's stock level changes the document is updated to reflect the current version.
Adding and removing documents is also taken care of for you, sparing the need to schedule in daily...
Search / General
How do I re-build documents?
At times (especially during the development phase of a store build), it may be necessary to delete and documents and freshly index them. This process can be achieved using the following command:
php artisan aero:search:rebuild
Due to the nature of how this pro...
Search / Documents
How can I extend the document structure?
To extend a document, use the
add() method, to define a closure that will return an
array of data to merge into the document structure:
\Aero\Search\Elastic\Documents\ListingDocument::add('search-result', function ($document) {
$colors = $document->getMo...
Search / Listings
How do I create a custom sort order for the listings pages?
When you set the sort get parameter in a listing pages url (e.g. ?sort=name-az), a method is called on the
\Aero\Search\Elastic\Query\Builder class (for name-az the method
sortByNameAz is called).
You can find the default sort by methods in the
Aero\Search\E...
Admin / Resource Lists
What are the available resource lists?
Class
View
\Aero\Admin\ResourceLists\AttributeGroupsResourceList
admin::resource-lists.index
\Aero\Admin\ResourceLists\BlocksResourceList
admin::resource-lists.index
\Aero\Admin\ResourceLists\CategoriesResourceList
admin::resource-lists.index
\Aero\Admin\Resou...
Admin / Resource Lists
How do I create a custom resource list?
To create a resource list you need a normal Laravel controller and a class that extends
Aero\Admin\ResourceListsAbstractResourceList.
class OrdersResourceList extends \Aero\Admin\ResourceLists\AbstractResourceList
{
//
}
Your controller should be like this...
Admin / Resource Lists
How do I add a column to an existing resource list?
You can use the
addColumn() method(s) to add a column to an existing resource list:
\Aero\Admin\ResourceLists\OrdersResourceList::extend(function (\Aero\Admin\ResourceLists\OrdersResourceList $list, \Closure $next) {
// Add it as the first column
$lis...
Admin / Resource Lists
How do I add a filter to an existing resource list?
You can use the
addFilter() method to add a filter to an existing resource list:
\Aero\Admin\ResourceLists\OrdersResourceList::extend(function (\Aero\Admin\ResourceLists\OrdersResourceList $list, \Closure $next) {
$list->addFilter(\Aero\Admin\Filters\Orde...
Admin / Resource Lists
How do I add a sort by to an existing resource list?
You can use the
addSortBy() method to add a filter to an existing resource list:
\Aero\Admin\ResourceLists\OrdersResourceList::extend(function (\Aero\Admin\ResourceLists\OrdersResourceList $list, \Closure $next) {
$list->addSortBy(\Aero\Admin\ResourceList...
Admin / Resource Lists
How do I add a bulk action to an existing resource list?
\Aero\Admin\BulkAction::create(
\Aero\Admin\BulkActions\DeleteProductsBulkAction::class,
\Aero\Admin\ResourceLists\ProductsResourceList::class
)
->title('Delete products')
->permissions('products.delete')
->confirm();
See here for how to create a custom b...
Admin / Resource Lists
How do I create a custom bulk action?
You can create a class that extends
\Aero\Admin\BulkActions\BulkActionJob and implement a
handle method:
class DeleteProductsBulkAction extends \Aero\Admin\BulkActions\BulkActionJob
implements \Illuminate\Contracts\Queue\ShouldQueue
{
protected $list...
General / Response Builders
What are the available response builders?
Storefront
Listed below are all the storefront response builders, the vast majority are view page responses or cart action responses:
Aero\Store\Http\Responses\AccountOverviewPage
Aero\Store\Http\Response\CartDiscountCodeApply
Aero\Store\Http\Response\CartDisc...
General / Response Builders
How do I pass data to a response?
The most common task performed when extending responses, is setting additional data. Typically, for HTML responses that render from a view, this involves sending data to the view to be used as a variable. If the response returns JSON, it may be adding addition...
General / Response Builders
How do I redirect a response?
Sometimes you may wish to redirect the user to another location, either to an external site or within the store. To do so, pass the URL,
route(), or an
Illuminate\Http\RedirectResponse instance to the
setRedirect() method.
For example, if you stored the age...