News:

Looking for documentation? Take a look on our wiki

Main Menu

Permanent Category Filter

Started by reggaebkk, December 29, 2018, 09:53:43 AM

Previous topic - Next topic

reggaebkk

Hi,
I'm making a test website for a friend who wants to deliver beverages in Phnom Penh Cambodia.

He has 4 different delivery zones, not all products are available in each zone, which requires a filtering by zone for visitors, this is easy.

But there are other categories, categories related to types of beverages.

But once a visitor has selected his zone, how to do to make sure that when he continues to browse the website, he still only sees products available in his zone while categories of drinks are actually common to all zones?

Do I have to recreate all drinks categories for each zone (that's a lot of categories then), or is there a way to keep the same drinks categories  for all zones but keep the zone filtering permanent so it hides whatever doesn't belong to his zone category?

Joomla 3.9.1
VM 3.4.2

Studio 42

perhaps the solution is to use manufacturer as zone ?
VM can have multiple manufacturer, so this can be the Zone filter.
If you only need to display manufacturer, you can use a new product customfield for eg.

reggaebkk

Thanks, I guess it could be an option but still the problem remains that the categories module doesn't have a manufacturer filter either. Do you know if there is a more advanced category module on the market somewhere? I couldn't find anything so far.
Or any other idea?

Studio 42

You can add a filter per manufacturer in the Joomla menu > virtuemart category link.
Add a Joomla menu link per manufacturer. This are then the your zones.
I'm not sure that the manufacturer is set in the session, so you have perhaps to set it using a plugin on each page from session, if it not work.
The big advantage is that this value never change, if you dont display and reset the session value and it's possible(with a system plugin for eg.) to set/get this value when user connect.

balai

Also consider using a filtering solution for that.
https://breakdesigns.net/extensions/joomla/custom-filters

Filtering solutions are exactly for that. It will only show you the available filters based on your selections.

Studio 42

I think that any filter reset on product details. It's why i said to use manufacturer as main filter and a plugin to save the manufacturer in the session.

balai

Quote from: Studio 42 on December 31, 2018, 22:33:56 PM
I think that any filter reset on product details. It's why i said to use manufacturer as main filter and a plugin to save the manufacturer in the session.

The saving of a variable to the session, still needs a filtering solution.
Btw. I don't think that using categories and manufacturers for everything is a good approach. Fortunately the VM custom fields are quite powerful and can be used for further classifications.