Installation
composer create-project symfony/website-skeleton:~4.4 myshop
cd myshop
composer require aimeos/aimeos-symfony:^2023.10 friendsofsymfony/user-bundle:^4.0
Add the post-install-cmd and post-update-cmd scripts to composer.json as shown in the README.
Configure Bundles
fos_user config to ./config/packages/fos_user.yaml.aimeos_shop config to ./config/packages/aimeos_shop.yaml (FS, MShop, and customer manager settings)../config/routes/aimeos_shop.yaml and ./config/routes/fos_user.yaml.Database Setup
Configure doctrine.yaml and .env with your database credentials.
Run Installer
composer update
./bin/console aimeos:account --admin admin@example.com
Test Start the server:
php -S 127.0.0.1:8000 -t public
Access the shop at http://127.0.0.1:8000/shop and admin at http://127.0.0.1:8000/admin.
Admin Interface
Log in to /admin and navigate to Catalog → Products.
Click Add to create a new product.
Product Attributes Fill in:
prod-001).Save & Publish Click Save and then Publish to make the product live.
Frontend Verification
Visit /shop to see the product in the catalog.
/admin) for product, category, and attribute management.$productManager = $this->container->get('aimeos_mshop_product_manager');
$product = $productManager->findItem('prod-001', ['price', 'stock']);
aimeos:mshop:product:import command for CSV/JSON imports./cart/add)./checkout./order/confirm).// Extend order workflow in a custom service
$eventDispatcher = $this->container->get('event_dispatcher');
$eventDispatcher->addListener('aimeos.mshop.order.place.after', [$this, 'onOrderPlaced']);
templates/AimeosShopBundle/ (e.g., product/list.html.twig).{% block aimeos_product_price %}
{{ parent() }}
<span class="custom-badge">{{ product.custom_field }}</span>
{% endblock %}
$client = $this->container->get('aimeos.client.jsonapi');
$response = $client->get('/product?filter[code][like]=prod-001');
aimeos_shop.yaml:
mshop:
payment:
method:
- name: PayPal
active: true
shipping:
method:
- name: Standard
active: true
Aimeos\MShop\Payment\Iface.public function __construct(
private Aimeos\MShop\Product\Manager\Iface $productManager,
private Aimeos\MShop\Order\Manager\Iface $orderManager
) {}
aimeos.mshop.product.save.after).cache.manager.name: None in aimeos_shop.yaml).code and siteid columns are indexed for large catalogs./admin via Symfony’s access_control (as shown in the README).Route Conflicts
/shop by default. Conflicts may arise with custom routes._route in Twig links or adjust aimeos_shop.yaml:
route:
prefix: /my-custom-prefix
FOSUser Integration
FosUser entity extends Aimeos\ShopBundle\Entity\FosUser.Class not found → Verify composer.json includes aimeos/ai-fosuser.Database Schema Mismatch
composer update without --no-dev installs demo data, which may conflict with existing tables.--no-dev in production.Twig Template Overrides
AimeosShopBundle namespace in templates/.TemplateNotFoundException → Check template paths and permissions.Password Hashing
Bcrypt. Changing to Argon2 requires updating aimeos_shop.yaml:
mshop:
customer:
manager:
password:
name: Argon2
Log Configuration
config/packages/monolog.yaml:
handlers:
aimeos:
type: stream
path: "%kernel.logs_dir%/aimeos.log"
level: debug
Aimeos\MShop entries.SQL Queries
$this->container->get('profiler')->disable();
config/packages/dev/doctrine.yaml:
dbal:
profiling: true
Admin UI Issues
./bin/console cache:clear
jqadm assets are loaded (check browser console for 404s).Custom Product Attributes
product table via migrations:
// src/Migrations/VersionYYYYMMDDHHMMSS.php
public function up(Schema $schema): void {
$table = $schema->getTable('mshop_product');
$table->addColumn('custom_field', 'string', ['length' => 255, 'notnull' => false]);
}
Aimeos\Admin\Jqadm\Plugin\AbstractPlugin).Custom Payment Methods
Aimeos\MShop\Payment\Iface:
class CustomPaymentMethod extends \Aimeos\MShop\Payment\Standard\Standard implements Iface {
public function place(Aimeos\MShop\Order\Item\Iface $orderItem, array $context): void {
// Custom logic (e.g., call external API)
}
}
aimeos_shop.yaml:
mshop:
payment:
method:
- name: Custom
active: true
service: App\Service\CustomPaymentMethod
Headless API Extensions
Aimeos\Client\JsonApi\Resource classes.class CustomProductResource extends \Aimeos\Client\JsonApi
How can I help you explore Laravel packages today?