- Posts: 45
- Thank you received: 1
Product Grid/List View Swticher
-- Joomla version -- : 3.8
-- PHP version -- : 7
-- Browser(s) name and version -- : chrome
-- Error-message(debug-mod must be tuned on) -- : n/a
Hi,
I wanted to know if there is a way to let users switch between list (div) and grid view without creating a new menu? It causes a number of issues like duplicate urls for products (but I know I can set the canonical) and I also need to duplicate other modules/menus (such as the side menu) to match the new style.
Is there a better way to do it? Like with a filter or something?
Regards,
Michael.
Please Log in or Create an account to join the conversation.
With a view override and a bit of javascript to update the CSS of the elements, you should be able to do that without the need of a separate menu.
That's something we want to add in the future.
Please Log in or Create an account to join the conversation.
ajax Grid/List View Swticher now work in hikashop? You say we want to add in the future.
Please Log in or Create an account to join the conversation.
Some templates have that for HikaShop. And it's possible with some view override. But there is no option by default to display that in HikaShop.
And yes, that's something we want to add in the future.
Please Log in or Create an account to join the conversation.
How can view override for ajax display? Which files override for ajax?
Please Log in or Create an account to join the conversation.
I'm sorry but I don't understand what you're talking about.
Please read carefully the Nicolas message :
Some templates have that for HikaShop. And it's possible with some view override. But there is no option by default to display that in HikaShop.
If you want to perform some overrides :
www.hikashop.com/support/documentation/1...ize-the-display.html
But please understand that the feature you're asking require development which is outside the limit of our support.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
How can do it?
and you say Some templates have that for HikaShop do you know which template has it?
Please Log in or Create an account to join the conversation.
If you want to request a page with AJAX, you can use the ajax functions of javascript:
www.sitepoint.com/guide-vanilla-ajax-without-jquery/
On Joomla, if you want to call a page without the modules and template around the main area, you can add the parameter &tmpl=component
For example:
demo.hikashop.com/index.php/en/hikashop/...sting/display-in-div
demo.hikashop.com/index.php/en/hikashop/...n-div?tmpl=component
So you can edit the HikaShop views as explained in the link Jerome gave you, and add there your button to switch the interface, along with the javascript it would trigger when the user click on the button to call the same page URL with the tmpl parameter and replace the main area content with what is sent back by the AJAX.
Then, in the view file, you can add custom PHP to display the listing differently based on that tmpl parameter value.
I hope it's clear. As Jerome explained, we can't provide a ready made solution as this requires proper development and is outside of the scope of this user forum.
Please Log in or Create an account to join the conversation.
nicolas wrote: And yes, that's something we want to add in the future.
are there any news when you came up with this feature?
Please Log in or Create an account to join the conversation.
No not yet. We worked on different things so far. It's still something we want to do.
Please Log in or Create an account to join the conversation.