Author Topic: Permanent Category Filter  (Read 605 times)

reggaebkk

  • Beginner
  • *
  • Posts: 19
  • Website Designer in Cambodia
    • Khmer-Dev, Web Design in Cambodia
  • VirtueMart Version: V3
Permanent Category Filter
« on: December 29, 2018, 09:53:43 am »
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

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3673
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Permanent Category Filter
« Reply #1 on: December 29, 2018, 12:47:02 pm »
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

  • Beginner
  • *
  • Posts: 19
  • Website Designer in Cambodia
    • Khmer-Dev, Web Design in Cambodia
  • VirtueMart Version: V3
Re: Permanent Category Filter
« Reply #2 on: December 29, 2018, 14:11:15 pm »
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

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3673
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Permanent Category Filter
« Reply #3 on: December 29, 2018, 23:51:30 pm »
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

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 1356
Re: Permanent Category Filter
« Reply #4 on: December 31, 2018, 15:04:15 pm »
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

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3673
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Permanent Category Filter
« Reply #5 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.

balai

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 1356
Re: Permanent Category Filter
« Reply #6 on: January 02, 2019, 13:37:11 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.