262 results
Sorted by relevance
Storefront / Image Factory
How do I use the image factory?
The image factory can be called using the
image_factory() helper function from within PHP (.php and .blade.php) and Twig (.twig) files. When initialising an instance, the width and height of the resized image must be provided (in pixels).
The image factory ou...
Storefront / Pages
What are the standard storefront pages?
Aero includes the following standard e-commerce pages.
These are automatically created when you create a new Aero store:
Homepage: Displays the main landing page of the store.
Listings: Displays product listings based on searches or category selection.
Product...
Storefront / Twig
What is Twig?
Storefront pages are built using the Twig template engine.
Twig is a fast, secure and flexible PHP templating solution. Before developing with Aero, we recommend that you become acquainted with the core concepts of Twig. The official Twig documentation is a gr...
Storefront / Routing
How do I set a slug validator?
You can control if a collection of slugs is valid or not by setting your own validator:
\Aero\Store\Routing\Slugs::setValidator(function ($slugs, $resolver) {
if ($resolver !== 'listings') return true;
if ($slugs->count() < 3 && $slugs->where('model_ty...
Storefront / Tutorials
How do I add featured products to the homepage of my store?
The recommended way to add featured products to the homepage of your store is to use the
aerocargo/listing-collections package.
Install
Run this command in the root of your project:
composer require aerocargo/listing-collections
Create a section
1. Create the...
Storefront / Tutorials
How do I add a contact form to my storefront?
1. Create the file:
themes/acme/resources/forms/contact.twig
Replace
acme with the name of your theme.
Any files created inside the
forms directory can be included on a page using
{% form "contact" %}.
2. Add the twig:
<form action="{{ route('form', 'contac...
General / Tutorials
How do I add a custom price to a product with a module?
In this mini tutorial, we’ll add checkboxes to a product page that allow customers to select additional charges. The product page will update the additional price dynamically as options are selected, and the total will continue to update when the product price...
Modules / General
How do I create a custom module?
When interacting with the admin, especially when making a custom module, it is important to require
aerocommerce/admin in the modules’
composer.json file.
Scaffolding modules
Modules can be created using artisan, a command line interface supplied with Larave...
Modules / Vue
How do I register a custom Vue component for my module?
To register a Vue component for our module, we will need to create a JavaScript file for our components and in order to initialise Vue.
Link assets
In order to link all the assets, which is a necessary step of registering a Vue component, we need to add a func...
Admin / Tutorials
How do I add a custom field to the new and edit product page?
In this mini tutorial we will add a notes field to the product new and edit page for the product and each variant.
This mini tutorial assumes that you have a module setup or you’re happy working from the app service provider (using the
boot method). You can s...
SEO / General
How do I add SEO Metadata to a page?
You can use the
\Aero\Marketing\Facades\SearchOptimization facade to add SEO Metadata to a page.
See below an example of how we do it for
\Aero\Store\Http\Responses\Homepage &
Aero\Store\Http\Responses\InformationPage by adding the
Aero\Store\Http\Response...
General / Services
What is the tax accountant service?
The Tax Account is the service responsible for determining the tax multiplier that should be applied to a product price.
It uses the store's tax configuration together with the current customer's tax information and location to determine which tax rules and ra...
General / Services
What is the combination serializer service?
The combination serializer service is used to serialize and deserialize models.
Serializing
This is used to take a collection of models and convert them into a string that can be used to find a corresponding combination.
Let's say you have a category called
m...
General / Services
What is the login blocker service?
The login blocker service can be used to block customers from logging in based on criteria.
For example, you might want to blacklist certain IPs.
First, define a setting to store blacklisted IPs:
\Aero\Common\Facades\Settings::group('customers', static functio...
General / Services
What is the volume service?
The volume service is used to normalize volumes into the store's base unit (
cm^3 by default) as well as convert between different units.
Units
By default the volume service has the following units:
mm^3
cm^3
m^3
Adding a Unit
Use
addUnit() to add a unit, for...
General / Services
What is the weight service
The weight service is used to normalize weights into the store's base unit (
g by default) as well as convert between different units.
Units
By default the weight service has the following units:
g
oz
lb
kg
Adding a Unit
Use
addUnit() to add a unit, for examp...
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...
Admin / Tables
What are the available tables?
Customers
Aero\Admin\Tables\Customers\CustomerOrdersTable
Aero\Admin\Tables\Customers\CustomerVouchersTable
Fulfillments
Aero\Admin\Tables\Fulfillments\FulfillmentItemsTable
Orders
Aero\Admin\Tables\Orders\OrderCreateFulfillmentTable
Aero\Admin\Tables\Orders\O...