i try to using this ref. link :https://docs.shopware.com/en/shopware-platform-dev-en/how-to/custom-cms-element?category=shopware-platform-dev-en/how-to
and create custom element same as given example in ref. link
When i am trying to execute these query in mysql
SUM(order_line_item.quantity) AS totalQuantity
I got the following error
Error in query (1055): Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'shopware6_demo.order_line_item.label' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
Can you please help me?
Its just a simple query. why this happens
i can't get my head around head: If i want to add a manufacture (or many) to a category where the user is able to choose from manufacturers - same like with the existing product assignment or tags:
Would i need to create a pivot table like
category_manufactur which contains the
category_id, product_manufacturer_id - So same like with tags?
I don't think so, because a manufacture is part of the product and the product is already connected to the category in some way right?
Or with an Entity Extension and a relation something like
(new ManyToOneAssociationField('manufacturer', 'product_manufacturer_id', ProductManufacturerDefinition::class, 'id')) ->addFlags(new Inherited())
So same as within a ProductDefinition ? https://github.com/shopware/platform/blob/87fc9e8cf4cdab0650e0caaf9a8ba12bab2902c2/src/Core/Content/Product/ProductDefinition.php#L190
Resources/app/storefront/src/scss/base.scssThis should do the trick
Okay. And can you also tell me how i would connect my new table with the category - only with a new
Or do i also need to write some Definitions etc.?
Within Laravel i would just write a simple model and connect those via Eloquent, that's it.
But i am still not getting it within Shopware 6 with custom entities :D
There isn't a how-to isn't it?