263 results
for “custom module routes”
Sorted by relevance
Developer Documentation / Admin Reports
How do I add admin filters to my custom report?
... the article "How do I create a custom report?
To register your newly ...s array.
<?php
namespace Acme\MyModule\Reports;
use Aero\Admin\Filters\Order\OrderOrderedAtDateAdminFilter;
use Aero\Admin\Reports\Report;
use Aero\Admin\Reports\Traits\HasFilters;
u...
Storefront Developer Documentation / Checkout
How do I add a Custom CSS File to the Checkout?
You can add a custom CSS file to the checkout by creating a
checkout.cssfile in your public directory.
Example contents where we are changing the to use a black background:
.header {
background-color:#000000;
}
.header__progress li:before {
background...
Storefront Developer Documentation / Themes
How do I create a custom theme?
If you've created a custom .yml config file you can build ...:build your_theme_name --config=custom.yml
Additional information
When running the theme build command you will be prompted to run
npm run initthis will compile your theme styles upon build and is ...
Developer Documentation / Admin Reports
How do I add lenses to my custom report?
...ur lens.
<?php
namespace Acme\MyModule\Reports\Lenses;
use Aero\Admin\ ...s array.
<?php
namespace Acme\MyModule\Reports;
use Acme\MyModule\Reports\Lenses\TotalOrdersLens;
use Aero\Admin\Reports\Report;
use Aero\Admin\Reports\Traits\HasLens;
use Aero\Cart\...
Developer Documentation / Admin Reports
How do I add a table to my custom report?
...columns.
<?php
namespace Acme\MyModule\Reports\Tables;
use Aero\Admin\ ...s array.
<?php
namespace Acme\MyModule\Reports;
use Acme\MyModule\Reports\Tables\OrdersReportTabl ...ing
Null
<?php
namespace Acme\MyModule\Reports\Tables;
use Aero\Admin\Reports\Rep...
Discount Management / Discounts
How do I add a custom amount resolver?
...rait, which allows you to set a custom amount resolver for a discount ...olvers (e.g. if you had another custom resolver for percentage discoun ... resolve the largest amount for customers but the lowest amount for gu ...function(array $amounts) {
$customer = \Aero\Cart\Facades\Cart::cu...
Order Management / Shipping
How do I set a custom order validator for shipping rates?
... shipping rate only for certain customer groups.
First, define an avai ... $group->boolean('restricted_by_customer_group')->default(false);
...$group->eloquent('allowed_customer_groups', \Aero\Account\Models ...\CustomerGroup::class)->multiple()->don...
Cart / General
How can I add a custom code handler?
You can use the
addCodeHandler() method to add custom behaviour for specific codes wh ...aerocargo/automated-add-to-cart module can be used to automatically add items to the cart based on rules.
Admin / Resource Lists
How do I create a custom resource list?
... ->with('status', 'customer', 'items', 'currency')
...er, or here for how to create a custom filter.
Sort Bys
To add sort bys to your resource list you need to implement the protected
sortBys() method and make it return an
array of yo...
Order Management / Shipping
How do I set a custom price totalizer for shipping rates?
Shipping rates can define a custom price totalizer to adjust the c ...ce before it is returned to the customer.
For example, you may want to add a fixed cost for each item in the order.
First, define the cost per item on the shipping method:
\Aero\Cart\Models\...
Order Management / Shipping
How do I set a custom applicable items filter for shipping rates?
Shipping rates can define a custom-applicable items filter to control which order items are considered when determining whether a rate is applicable.
For example, you may want to restrict a shipping method to products from specific manufacturers.
First, define...
Admin / Mail Notifications
How do I add a custom mail layout?
To add a custom mail layout you can use the
addLayout() method on the mail action:
\Aero\Events\Models\MailAction::addLayout('acme', 'Acme');
Then you can create the
emails.acme twig view, which will be used to render your layout:
Acme {{ body | raw }}
Admin / Filters
How do I create a custom admin filter?
To create a custom admin filter you must create a class that extends
\Aero\Admin\Filters\AdminFilter and implement a
handle method:
class OrderStatusAdminFilter extends \Aero\Admin\Filters\AdminFilter
{
use \Aero\Admin\Filters\Traits\HasDefault;
use ...
Admin / Transformers
How do I add custom data to a transformer?
You can add a custom field using the
add() method and returning an array:
\Aero\Admin\Transformers\ProductTransformer::add(function ($data) {
/* @var \Aero\Catalog\Models\Product */
$product = $data['product'];
return [
'foo' => 'bar',
];
}...
Search / Listings
How can I add custom attributes to the listing model?
...stingAttributes 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\Pipelines\ListingAttributes::extend(function (array $att...
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;
...
Catalog Management / Listing Rules
How can I add a custom listing rule?
To add a custom listing rule you need to create a class that extends
Aero\Catalog\Rules\ListingRule\AttributedWithRule.
For example we will add a rule that checks if the listing has specific attributes.
First, we need to index the attribute ids so that they c...
Checkout / General
How do I add a Custom CSS File to the Checkout?
You can add a custom CSS file to the checkout by creating a
checkout.css file in your public directory.
Example contents where we are changing the checkout to use a black background:
.header {
background-color:#000000;
}
.header__progress li:before {
...