>>>>>>>>>>>> english below <<<<<<<<<<<<
Bonjour.
Merci beaucoup pour ce composant tellement pratique et fourmillant de possibilité (à s'y perdre parfois...).
Un client aimerait avoir un affichage différent pour une catégorie, comment faire cela ?
Je m'explique : la plupart des produits ont l'affichage "grid". Une catégorie de produits n'aura aucune photo et nous souhaitons un affichage en liste. Est-ce possible de faire cela ? Comment ?
>>>>>>>>>>>> english version <<<<<<<<<<<<
Hello.
Thank you very much for this component so practical and teeming with possibility (to be lost sometimes...).
A customer would like to have a different view for a category, how to do that?
Let me explain: most products have the "grid" display. A product category will not have a photo and we want a list display. Is it possible to do this? How?
Best regards,
AlainR
Different display for a category
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Different display for a category
Hi, the category view has for now three types of views:
- grid
- list
- gridlist
and you can switch between them.
See e.g. here:
https://www.phoca.cz/jtd/
You can override it with your template. The layouts for these outpus you can find here:
components\com_phocacart\layouts\items_grid.php
components\com_phocacart\layouts\items_gridlist.php
components\com_phocacart\layouts\items_list.php
Such outputs can be set in your template so your customized output will be not overwritten when updating Phoca Cart.
Jan
- grid
- list
- gridlist
and you can switch between them.
See e.g. here:
https://www.phoca.cz/jtd/
You can override it with your template. The layouts for these outpus you can find here:
components\com_phocacart\layouts\items_grid.php
components\com_phocacart\layouts\items_gridlist.php
components\com_phocacart\layouts\items_list.php
Such outputs can be set in your template so your customized output will be not overwritten when updating Phoca Cart.
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Enthusiast
- Posts: 53
- Joined: 24 Jul 2018, 16:33
Re: Different display for a category
Thank you very much.
I know this possibility.
What we need :
- for all Phoca Cart products pages : grid (this is defined by general Phoca Cart config and it's OK)
- for one category : list
Could we imagine an option in the menu link?
I know this possibility.
What we need :
- for all Phoca Cart products pages : grid (this is defined by general Phoca Cart config and it's OK)
- for one category : list
Could we imagine an option in the menu link?
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Different display for a category
Hi, there is a possibility in Joomla! to copy parameters from Options (components parameters) to menu link parameters. So the parameter for setting the default view:
can be copied and set for different menu links.
But menu links can access different categories, so maybe better solution is to make some hack in core view and set the view by category ID
Something like ... if category ID = XX then set the parameter to list view ... etc.
Jan
can be copied and set for different menu links.
But menu links can access different categories, so maybe better solution is to make some hack in core view and set the view by category ID
Something like ... if category ID = XX then set the parameter to list view ... etc.
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Enthusiast
- Posts: 53
- Joined: 24 Jul 2018, 16:33
Re: Different display for a category
Thank you very much for your answer.
I don't understand how to copy from Options to menu link...
I create a menu link Category View (list Products) but I only have to parameters : Display Pagination et Display Pagination (on top).
Do I have to choose another menu link type ?
I don't understand how to copy from Options to menu link...
I create a menu link Category View (list Products) but I only have to parameters : Display Pagination et Display Pagination (on top).
Do I have to choose another menu link type ?
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Different display for a category
Hi, copying options is about copy the XML parameters from global options XML file to menu link XML file. See this guide (it is guide for Joomla! 2.5 but should be valid for Joomla! 3):
https://www.phoca.cz/documents/16-jooml ... a-25-17-16
Jan
https://www.phoca.cz/documents/16-jooml ... a-25-17-16
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Enthusiast
- Posts: 53
- Joined: 24 Jul 2018, 16:33
Re: Different display for a category
Fantastic! Thank you very much.
I try to copy default.xml in templates/my_template/html/com_phocacart/category/default.xml but it doesn't work to display option in menu link.
So I did it in components/com_phocacart/views/category/tmpl/default.xml. I think it will be lost in the next update of you component.
I try to copy default.xml in templates/my_template/html/com_phocacart/category/default.xml but it doesn't work to display option in menu link.
So I did it in components/com_phocacart/views/category/tmpl/default.xml. I think it will be lost in the next update of you component.
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Different display for a category
Hi, yes, unfortunately, XML cannot be set as override, so it will be lost when updating - so backup is needed and after update just overwrite the default XML
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Enthusiast
- Posts: 53
- Joined: 24 Jul 2018, 16:33
Re: Different display for a category
Perhaps could you add to the ToDoList adding more options in category settings and/or menu link settings to resume or override general settings...
Thank you very very much for your help and your work.
Is there a easiest possibility to translate all your work ? I do this work for some of your component but I don't know where to drop the french files...
Thank you very very much for your help and your work.
Is there a easiest possibility to translate all your work ? I do this work for some of your component but I don't know where to drop the french files...
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Different display for a category
Hi, just let me know your ideas about the parameters, so I can write them to feature request list.
What do you mean with "drop the french files"?
See here:
https://www.phoca.cz/download/category/ ... -component
there is french translation made partialy by user and partialy by machine translation. So such file can be downloaded and improved.
Jan
What do you mean with "drop the french files"?
See here:
https://www.phoca.cz/download/category/ ... -component
there is french translation made partialy by user and partialy by machine translation. So such file can be downloaded and improved.
Jan
If you find Phoca extensions useful, please support the project