Page 1 of 1

Show Categories in catalog/lists/body-default.php

Posted: 23 Oct 2017, 12:10
by mantik
i have a Template where i need a sidebar on each view on the left side.

In the Listview i need left the categoryview, Searchview and the mini basket in the detail view too so how can i do that?

Re: Show Categories in catalog/lists/body-default.php

Posted: 23 Oct 2017, 14:44
by mantik
I also dont understand how i can just add under the search input field an simple basket-button with the target configured in the minicart.

its all a little bit confusing and its not really a typo3-extension. was aimeos not early coded in extbase?

by the way: how can i use partials? where i find the params i can give here:

Code: Select all

	$pagination = $this->partial(
		$this->config( 'client/html/catalog/lists/partials/pagination', 'catalog/lists/pagination-default.php' ),
		array(
			'params' => $params,
			'size' => $this->get( 'listPageSize', 48 ),
			'total' => $this->get( 'listProductTotal', 0 ),
			'current' => $this->get( 'listPageCurr', 0 ),
			'prev' => $this->get( 'listPagePrev', 0 ),
			'next' => $this->get( 'listPageNext', 0 ),
			'last' => $this->get( 'listPageLast', 0 ),
		) <!-- where is this array documented????? ############################################
	);
i try to add the category with partials but the list was empty.....

Re: Show Categories in catalog/lists/body-default.php

Posted: 23 Oct 2017, 21:16
by aimeos
mantik wrote:I also dont understand how i can just add under the search input field an simple basket-button with the target configured in the minicart.
Do you want to display the mini basket itself under the search field or a (list of) product(s)?
mantik wrote:its all a little bit confusing and its not really a typo3-extension. was aimeos not early coded in extbase?
Aimeos is still based on extbase but uses only the MVC part. This is because Aimeos is in fact a PHP library whose object methods are called in the actions.
mantik wrote:by the way: how can i use partials? where i find the params i can give here:
For the common partials, they are documented in the partials itself like here:
https://github.com/aimeos/ai-client-htm ... n/partials

For the catalog list pagination partial, this isn't the case. You have to look into the partial what is used by $this->get()

Re: Show Categories in catalog/lists/body-default.php

Posted: 24 Oct 2017, 03:39
by mantik
But the example used for pagination is no where documented... Can i just use this common partials or how you know how to set up this pagination from catalog/lists/body-default.php

Whats the logic?

Here a specific question:
What must i do if i want display the categories tree (or the whole filter module) in the template of product list (catalog/lists/body-default.php)?

In typo3 there are several aimeos-content-elements. So all i want is to say: show the aimeos category and the minibasket in the aimeos product list.

Re: Show Categories in catalog/lists/body-default.php

Posted: 25 Oct 2017, 08:51
by aimeos
mantik wrote:But the example used for pagination is no where documented... Can i just use this common partials or how you know how to set up this pagination from catalog/lists/body-default.php

Code: Select all

         'params' => $params,  // Associative list of additional parameters for the URL, e.g. "[f_catid => 1]"
         'size' => $this->get( 'listPageSize', 48 ), // products per page
         'total' => $this->get( 'listProductTotal', 0 ), // total number of products
         'current' => $this->get( 'listPageCurr', 0 ), // current page number starting from "1"
         'prev' => $this->get( 'listPagePrev', 0 ), // previous page number
         'next' => $this->get( 'listPageNext', 0 ), // next page number
         'last' => $this->get( 'listPageLast', 0 ), // last page number
mantik wrote:What must i do if i want display the categories tree (or the whole filter module) in the template of product list (catalog/lists/body-default.php)?

In typo3 there are several aimeos-content-elements. So all i want is to say: show the aimeos category and the minibasket in the aimeos product list.
You can't merge the category tree into the list template easily. But you can place the catalog filter plugin above the catalog list plugin on your page by moving the content element in the TYPO3 backend.

Re: Show Categories in catalog/lists/body-default.php

Posted: 25 Oct 2017, 09:14
by mantik
The Pagination snippet was just a example. I ask where i find this in the documentation. in the hope to find the rest of posibilities there...
You can't merge the category tree into the list template easily. But you can place the catalog filter plugin above the catalog list plugin on your page by moving the content element in the TYPO3 backend.
I know that but thats no what i want... i wouldn't ask if i need this kind of solution.
somethin like $categories = getCatalogTree($basketPid, $etc) or instance an Object etc...

not posible? also not over partials?
of cors must not be in the backend. i will just active the list and disable the other both and just output a minibasket, a category tree and a product list.

a pity... i've really hope typo3 has now a good shopsolution too... but if you can't call a modul as sub its not really flexible.
and some things works in laravel, some in symfony but in typo3 not etc...

very confusing

Re: Show Categories in catalog/lists/body-default.php

Posted: 25 Oct 2017, 10:18
by aimeos
mantik wrote:The Pagination snippet was just a example. I ask where i find this in the documentation. in the hope to find the rest of posibilities there...
The parameters for partials that are meant for being used by several templates are documented in the head of the partial files: https://github.com/aimeos/ai-client-htm ... n/partials
mantik wrote:I know that but thats no what i want... i wouldn't ask if i need this kind of solution.
somethin like $categories = getCatalogTree($basketPid, $etc) or instance an Object etc...
not posible? also not over partials?
OK, in case you want to write some code, you have all possibilities you need :-)
- Create a new decorator class: https://aimeos.org/docs/Developers/Html ... components
- Implement the setViewParams() method and add your code to retrieve the categories and add them the tree to the view there
- You can have a look into the catalog filter tree client for a working code example: https://github.com/aimeos/ai-client-htm ... d.php#L216
- Basically, you only need this method: https://github.com/aimeos/ai-controller ... rd.php#L75
- Configure your decorator to be wrapped around the catalog/lists component
- Now you have the data you've added to the view available in the lists template

In general, you should have a deep look into the documentation how to adapt the frontend. That will give you some good hints how to change things: https://aimeos.org/docs/Developers#Frontend
mantik wrote:a pity... i've really hope typo3 has now a good shopsolution too... but if you can't call a modul as sub its not really flexible. and some things works in laravel, some in symfony but in typo3 not etc...
Sorry, wasn't sure at first if you were able to dig deeper into Aimeos to extend the code base ;-)
You can adapt Aimeos to every requirement you need because its build from the ground up for that. There are some minor differences between the integrations as you state because not all frameworks supports everything. Like you said, it's possible to call a controller in a Symfony template but that's not supported in TYPO3 as far as I know.