The stable 2019.04 release contains some major improvements:
- Improved core APIs and rewritten frontend controllers
- XML importer for attributes, categories, customers, products and suppliers
- Increased performance for complex queries
- More SEO friendly URLs
The Aimeos core already offered an easy to learn API for working with managers, items and providers. All methods are now supporting fluent interfaces if possible so method calls can be chained like:
$item = $manager->createItem()->fromArray( $map ) ->setType( 'default' )->addPropertyItem( $propItem );
Additionally, the frontend controller API for working with the shop objects efficiently in the HTML clients and the JSON REST API has been completely overhauled. All objects contain simple, fluent methods that can be concatenated like in the core library. Implementing your own product list in the frontend is now only a matter of a few easy to understand calls:
$products = \Aimeos\Controller\Frontend::create( $context, 'product' ) ->uses( ['text', 'price', 'media' )->category( 123 )->text( 'sneaker' ) ->sort( 'name' )->slice( 0, 48 )->search();
This statement would retrieve the first 48 products with texts, prices and images that are in category “123” and contain the text “sneaker” sorted by their names. In Laravel, facades simplify working with the frontend controller even more:
$products = Product::uses( ['text', 'price', 'media' )->category( 123 ) ->text( 'sneaker' )->sort( 'name' )->slice( 0, 48 )->search();
It’s now possible to import attributes, categories, customers, products and suppliers using Aimeos XML files. They are as flexible as the Aimeos data structures so you can import all items in a document oriented way. A simple example for a product XML import file would be:
<products> <product ref="test-article"> <product.type>event</product.type> <product.code>test-article</product.code> <product.label>Test event</product.label> <product.datestart>2000-01-01T10:00:00</product.datestart> <lists> <text><textitem>...</textitem></text> <price><priceitem>...</priceitem></price> <media><mediaitem>...</mediaitem></media> </lists> </product> </products>
The product XML export job produces the same XML format so you can share data between different Aimeos instances too.
Aimeos has gotten faster once more. Complex queries which ask for entries that reference items from other domains or have properties of a specific value are now lightning fast in all DBMS when using the *:has and *:prop search functions. To fetch all products which reference a specific attribute use:
$search = $manager->createSearch(); $func = $search->createFunction( 'product:has', ['attribute', 'default', 123 ); $search->setConditions( $search->combine( '!=', $func, null ) ); $products = $manager->searchItems();
To get notfied about queries which take longer than one second, a monitoring similar to the MySQL slowlog is now active. Furthermore, using utf8mb4 as charset in MySQL doesn’t have a performance drawback any more so it’s now used by default. Existing setups are migrated towards this charset if possible (requires MySQL >= 5.7.8).
SEO friendly URLs
In the past, Aimeos required the product ID to be part of the URL. Due to the simplifed index for product texts which contains the product URL name and due to optimized routes, the URLs of all detail pages can now look like
The product name in the URL can be localized for each language of corse.