Questions around the TYPO3 integration and plugins as well as Flow and NeosCMS
Forum rules: Always add your TYPO3/Flow, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
#2995 by earosb
13 Jul 2016, 16:00
Hey there,

We are using typo3 7.6.9 and aimeos 16.4.3. We have to add/create the product creation form in the fontend. is there a way to enable the basic mode in the frontend? somehow?

Thanks in advance!
#2998 by aimeos
13 Jul 2016, 20:44
No, the admin interface is a backend module.

You should create a TYPO3 Extbase frontend plugin with a form for the product details you need, extend your Extbase controller from the Aimeos AbstractController and use the Aimeos product manager to create/update your products.

For the start in your controller action:
Code: Select all$manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'product' );
#2999 by earosb
14 Jul 2016, 01:49
aimeos wrote:You should create a TYPO3 Extbase frontend plugin with a form for the product details you need, extend your Extbase controller from the Aimeos AbstractController and use the Aimeos product manager to create/update your products.

I did exactly that (i tried), I created some managers for product, price, catalog, etc. but i don't understand how to attach a product with a price for example or how to create a product and see it in the catalog or the index staff.
#3002 by aimeos
14 Jul 2016, 21:31
It's all about the lists, i.e. the list tables like mshop_product_list.

Use the product lists manager to create entries in the mshop_product_list table, use the product ID as parentid and the ID of the text/price/media as refid. The domain is text/price/media depending on the referenced item and the typeid is almost always the "default" code for the domain in the mshop_product_list_type table.

You can get the typeid via
Code: Select all$listTypeManager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'product/lists/type' );
$textTypeId = $listTypeManager->findItem( 'default', array(), 'text' )->getId();


A product must be in a category to be visible, so add a list item to the category (catalog domain) using the product ID as refid. After everything is complete, the product must be added to the index with
Code: Select all\Aimeos\MShop\Factory::createManager( $this->getContext(), 'index' )->saveItem( $product );
#3023 by earosb
18 Jul 2016, 20:12
aimeos wrote:A product must be in a category to be visible, so add a list item to the category (catalog domain) using the product ID as refid.

I almost got it, just one last question, how i add a list item to the category? i tried this
Code: Select all$catalogListManager = \Aimeos\MShop\Factory::createManager( $context, 'catalog/lists' );

But the class Aimeos\MShop\Catalog\Manager\Lists\Standard it doesn't have a create or sets method
I'm still kinda confused with mshoplib, sorry