Add new fields to products and other stuff

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
mantik
Posts: 89
Joined: 23 Oct 2017, 05:56

Add new fields to products and other stuff

Post by mantik » 09 Nov 2017, 17:38

I would add a new property to the Product.
How can i do that. In Extbase i do that in the Domain/Model/Object.php...

User avatar
aimeos
Administrator
Posts: 7873
Joined: 01 Jan 1970, 00:00

Re: Add new fields to products and other stuff

Post by aimeos » 09 Nov 2017, 20:54

In Aimeos you don't need to extend existing tables to store new properties. Instead, the mshop_product_property table can store any product data you have for your products. Use the product property manager to save that information, you can retrieve it together with the basic product data if you add 'product/property' to the domain parameter:

Code: Select all

$products = $productManager->searchItems( $filter, ['product/property'] );
If you have data that is shared by several products, store them in attributes. This will automatically generate a faceted search filter in the frontend if you add the attribute type to the list of allowed attribute types for the faceted search.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

mantik
Posts: 89
Joined: 23 Oct 2017, 05:56

Re: Add new fields to products and other stuff

Post by mantik » 10 Nov 2017, 12:55

What i want do is works with the FE-Usergroups.
I know there is an additional Extension but i need it just for the products and would have a own field where i fetch all the USergroups.

i allready got it in the view. All what i must do is just to save it in the backend and get this field in the template.

User avatar
aimeos
Administrator
Posts: 7873
Joined: 01 Jan 1970, 00:00

Re: Add new fields to products and other stuff

Post by aimeos » 10 Nov 2017, 20:09

Using the ai-customergroups extension would be much simpler. If you want to do this yourself, you need to extend the item, manager, JQAdm class and template as well as the frontend template. For the JQAdm interface there's no documentation yet.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply