Skip to main content
258 results for “custom module routes”
Sorted by relevance
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 { ...
Storefront / Twig
How do I add a custom twig function?
You can use the  add() method to add a custom twig function: \Aero\Store\Twig\Extensions\TwigFunctions::add([ new \Twig\TwigFunction('foo', function () { return 'bar'; }), ]); And then use it in twig: {{ foo() }}
Storefront / Events
How do I run a custom event?
You can run your own custom event using the  runEvent() method: window.Aero.runEvent('acme', { foo: 'bar' }); And listen for it wherever needed: window.AeroEvents.on('acme', (data) => { console.log(data); });
Account Area / General
How do I add a Custom CSS File to the account area?
You can add a custom CSS file to the account area by creating a file named  account-area.css in your public directory. Example contents where we're overriding the default colours: :root { --bpa-color-primary: deepskyblue; --bpa-color-success: forestgre...
Account Area / Pages
How do I create a custom page in the account area?
To create and register a custom account area page you need to u ...a::registerPage(\Aerocargo\Acme\CustomPage::class); Your account area page class must implement the  title(),  route(), and routeName() methods that all should return a string. It’s common pra...