Advanced Search
Search Results
418 total results found
Settings
Settings
What are the settings available to developers?
Settings allow you to add dynamic values to your modules that can be modified by admin users easily through the admin. The values of your settings (unless the value is the default you set) are stored in json files inside of your storage directory. └─ storage ...
Do do I set the default value of my custom setting?
You can add a default value to any setting by using the defaultmethod and passing your default value. <?php namespace Acme\MyModule; use Aero\Common\Facades\Settings; use Aero\Common\Providers\ModuleServiceProvider; use Aero\Common\Settings\SettingGroup; class...
How do I register custom settings?
To register settings you need to use the Aero\Common\Facades\Settingsfacade from the setupmethod of your modules service provider. You should call the groupmethod on the facade and pass in a unique name for your settings group and a closure that defines your s...
How do I access a custom setting?
You can access a setting by using the settingfunction that is available in PHP, Blade, and Twig. You simply need to pass your setting group name, a full stop, and then the settings name. setting(‘acme-my-module.allow_list’)
What are the available setting types?
Setting Description $group->array(‘allow_list’); Returns an array. $group->boolean(‘enabled’); Returns a boolean, true or false. $group->eloquent('order_status', OrderStatus::class); Stores the key of the eloquent model you pass and returns an instance of the ...
How do I configure the admin edit page?
By default your setting group is editable through the admin by a generated edit page. You cannot remove this generated edit page but you can stop users from being able to edit the settings using it. It’s important to note that if you disable editing through th...
How do I handle translations?
When defining your setting groups title/summary, or a settings label/hint you can make use of Laravel Localization for translations. <?php namespace Acme\MyModule; use Aero\Common\Facades\Settings; use Aero\Common\Providers\ModuleServiceProvider; use Aero\Comm...
How do I add settings to the product model?
Using the same syntax as when you create settings <?php namespace Acme\MyModule; use Aero\Catalog\Models\Product; use Aero\Common\Providers\ModuleServiceProvider; use Aero\Common\Settings\SettingGroup; class ServiceProvider extends ModuleServiceProvider { p...
Validation
Validation
How do I create custom validation requests?
To create a custom validation request, we need to extend the AeroRequestabstract class that’s located in aerocommerce/core. To create a custom request, open the terminal in the project root directory and type the following command: php artisan make:request MyR...
How do I use validation requests?
To use a custom validation request, we have to replace the request that is passed to the controller function we wish to affect. Change from: public function updateAddress(Request $request, Customer $customer) Change to: public function updateAddress(UpdateAddr...
How do I display validation error messages?
There are multiple ways of displaying your validation errors. From the backend perspective, the request always returns errors to the view if validation had not passed. Alert partial view Aero has an error partial which automatically displays all the validation...
What are the available validation requests?
Example: <?php namespace Aero\Store\Http\Requests; use Aero\Common\Requests\AeroRequest; class UpdateAddressRequest extends AeroRequest { /** * Determine if the user is authorized to make this request. * * @return bool */ public fun...
How do I set a custom order validator for shipping methods?
You can define logic that will be used to confirm if a shipping method is available for a specific order. By default all shipping methods that have available shipping rates (you can set a custom order validator for shipping rates too) for an order are availabl...
How do I set a custom order validator for shipping rates?
You can override the default logic that decides whether a shipping rate is applicable to an order. By default shipping rates are validated against their configuration set in the admin (allowed/disallowed tags, total weight, and total price). To set the logic y...
How do I use a custom total item price totalizer for a shipping rate?
Setting a custom item price totalizer allows you to define the logic used to get the total price of a collection of order items (this value will be used when validating that a shipping rate is available for an order). To set the logic you need to use the **\Ae...
How do I use a custom total item weight totalizer for a shipping rate?
Setting a custom item weight totalizer allows you to define the logic used to get the total weight of a collection of order items (this value will be used when validating that a shipping rate is available for an order). To set the logic you need to use the **\...