What's New
This topic contains 6 replies, has 4 voices, and was last updated by Hani Guellal Jul '20.
Viewing 7 posts - 1 through 7 (of 7 total)
Viewing 7 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic.
This topic contains 6 replies, has 4 voices, and was last updated by Hani Guellal Jul '20.
Hi Team,
### Informations ###
As you know,
1- The list_grid_switcher allows us to switch products view between Grid and List view, whether for the content of a category or the content of a search result.
2- catalog/_partials/miniatures/product.tpl file allows us to customize the way the products are shown in all views, Grid and List views.
### Requests ###
Is any way to customise only the List View through a TPL file without impacting on the default Grid view.
Thank you.
Thank you for your reply,
I need huge changes for the List view, this setting won’t help me.
I found a solution for my request but i don’t know if it is safe to do like this, can you validate my solution ?
Solution:
Duplicate content within the file catalog/_partials/miniatures/list-item.tpl in 2 parts:
Part 1 is the original code
List view: <Div class="products product_list clear_list_align_0 clear_list_proportion_0 list"
Grid view: <Div class="products product_list clear_list_align_0 clear_list_proportion_0 grid row"
These Divs include the file catalog/_partials/miniatures/product.tpl
Part 2 is the duplicate code with added class “ShowOnlyOnListView”
List view: <Div class=”products product_list clear_list_align_0 clear_list_proportion_0 list ShowOnlyOnListView”
Grid view: <Div class=”products product_list clear_list_align_0 clear_list_proportion_0 grid row ShowOnlyOnListView”
These Divs include the file catalog/_partials/miniatures/MyCustomeList.tpl
Actually, the 2 parts are shown
Last step is to use Global CSS to Hide the unwanted duplicate Divs, Hide the Original List view and keep Original Grid view, Hide the duplicate Grid view and keep the duplicate List view that includes MyCustomeList.tpl
Div.grid.row.products.product_list.clear_list_align_0.clear_list_proportion_0.list.ShowOnlyOnListView
Div.grid.row.products.product_list.clear_list_align_0.clear_list_proportion_0.list.grid.row.ShowOnlyOnListView
Hi,
Yes, the solution is okay. you can use a child theme to modify theme files: https://devdocs.prestashop.com/1.7/themes/reference/template-inheritance/parent-child-feature/
Best regards.
Thank you, you reassured me.
Ok for the Child theme, i will do.
I heard that Child theme decrease performances and needs good cache manager, In your opinion What is the best cache manager/Module working well with ST-THEMES technology ?
https://www.sunnytoo.com/product/advanced-page-cache-module-for-prestashop
This works very well i tested it on my prestashop and its loading pages in seconds.
You must be logged in to reply to this topic.