Author Topic: VirtueMart Products Module not filtering.  (Read 4943 times)

snewpers

  • Beginner
  • *
  • Posts: 20
VirtueMart Products Module not filtering.
« on: December 28, 2011, 14:02:25 pm »
Heya

the 'VirtueMart Products' module does not filter correctly. I have multiple categories, and when I have more than one 'VirtueMart Products' module enabled it does not filter anything but the first active module eg:  On page 1 it should filter products of category 1, On page 2 (duplicate module) it should filter products from category 2, etc.

I have assigned the modules to the correct menus, but only the contents of 'page 1/category1' is displayed in all modules. So it seems that the modules load just fine (module header updates the name) but the products stay the same.

Any hints anyone?

--- ETA---
Seems that the module ignores category filtering. It also does not work correctly when 'latest products' is selected: it'll show the first 2 products.
When for instance 'Random' is selected, it'll show random images from the whole productrange, again ignoring any filtering.

Too bad.

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10337
  • VirtueMart Version: 3+
Re: VirtueMart Products not filtering.
« Reply #1 on: December 28, 2011, 14:57:14 pm »


I have reported this bug
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

snewpers

  • Beginner
  • *
  • Posts: 20
Re: VirtueMart Products not filtering.
« Reply #2 on: December 28, 2011, 15:04:25 pm »
Cool, thank you for letting me know.
You have a link for your post so I can keep track of it?

Snewp.

ETA:

@BanquetTables.pro
You mentioned it's a category ID problem. Is that also the reason why 'top ten' and 'latest items' are showing the products with the lowest (oldest) ID, instead of the ones it *should* show?
If so, I can stop looking for the error I might have made ;)

patrickit

  • Beginner
  • *
  • Posts: 13
    • Dubai web design
Re: VirtueMart Products Module not filtering.
« Reply #3 on: February 01, 2012, 10:07:43 am »
For those of you still having this problem and cannot wait for the bug fix, I have solved it by doing the below:
In administrator/components/com_virtuemart/models/product.php
Look for around line 334
$where[] = 'p.`modified_on` > "'.$dateSql.'" ';

add after it
$orderBy = ' ORDER BY p.`modified_on`  ';   //PL temporary bug fix
$this->filter_order_Dir = 'DESC';   //PL temporary bug fix

See sample here: http://x-doria.ae/

I am using Joomla 1.7.3 virtuemart 2.0
That fixed my problem. I don't know how good the code is, or if it breaks anything else, it's working fine for me.
I adore Joomla & Virtuemart!

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9853
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: VirtueMart Products Module not filtering.
« Reply #4 on: February 01, 2012, 22:34:24 pm »
Do you have the same probelm with 2.0.1?
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

patrickit

  • Beginner
  • *
  • Posts: 13
    • Dubai web design
Re: VirtueMart Products Module not filtering.
« Reply #5 on: February 02, 2012, 08:19:03 am »
Hello Milbo,

Haven't tried 2.0.1, I have 2.0.0 according to my VM control panel.
So far it is working great so I won't upgrade now.

Amazing product.

Thanks!!
I adore Joomla & Virtuemart!

brentonking

  • Jr. Member
  • **
  • Posts: 74
    • Brenton King Graphic Design, Web Design and Joomla! Site Development
Re: VirtueMart Products Module not filtering.
« Reply #6 on: February 03, 2012, 06:31:51 am »
I grabbed the .php files from the 2.0.1 pre-release (mod_virtuemart_product) but didn't make any difference, the categories still don't filter proper. Is there another file(s) I need to change instead?

patrickit

  • Beginner
  • *
  • Posts: 13
    • Dubai web design
Re: VirtueMart Products Module not filtering.
« Reply #7 on: February 03, 2012, 13:37:11 pm »
Brentonking,

My solution just solves the latest products problem, it does not solve the category filter one. I haven't tried fixing the category filter as I hadn't needed this feature.
If you want the best sellers to work then I have a workaround too.
I adore Joomla & Virtuemart!

brentonking

  • Jr. Member
  • **
  • Posts: 74
    • Brenton King Graphic Design, Web Design and Joomla! Site Development
Re: VirtueMart Products Module not filtering.
« Reply #8 on: February 04, 2012, 02:34:12 am »
partickit,

Yep, I did realise that. I just noticed the original post had also mentioned the category filter issue. And I was just following up on that. Wasn't expecting your fix to work for it, was more trying to give a secondary answer to Milbo's question regarding 2.0.1.

brentonking

  • Jr. Member
  • **
  • Posts: 74
    • Brenton King Graphic Design, Web Design and Joomla! Site Development
Re: VirtueMart Products Module not filtering.
« Reply #9 on: February 04, 2012, 05:39:48 am »
Update: 2.0.1 D fixes the category filtering issue! Nice work VM team!

patrickit

  • Beginner
  • *
  • Posts: 13
    • Dubai web design
Re: VirtueMart Products Module not filtering.
« Reply #10 on: February 09, 2012, 13:36:22 pm »
Mole_LR updates us that VM 2.0.1e does not fix the latest products, best seller problem in the product module http://forum.virtuemart.net/index.php?topic=97284.msg322174#msg322174
I adore Joomla & Virtuemart!