Author Topic: [mod_virtuemart_product] Latest products empty  (Read 1834 times)

Twix

  • Beginner
  • *
  • Posts: 46
[mod_virtuemart_product] Latest products empty
« on: February 29, 2012, 13:59:46 pm »
Problem:
I have a latest product module with mod_virtuemart_product. This module is empty, since I haven't added products the latest week. However the module title is still shown. Resulting in a "Latets Products" title without latest products to show.

I'm using VM 2.0.2 stable. Joomla 2.5.1. Also updated the VM extensions.

Twix

  • Beginner
  • *
  • Posts: 46
Re: [mod_virtuemart_product] Latest products empty
« Reply #1 on: February 29, 2012, 21:03:08 pm »
Cause:
File:  administrator\components\com_virtuemart\models\product.php
Line: 343
$date = JFactory::getDate( time()-(60*60*24*7) ); //Set on a week, maybe make that configurable

So for the latest products only the products of the last week are shown. If you didn't added a product the last week, it results in my problem. An empty module which only shows the module title. I think this should be fixed, since only a headline of "Latest Products" without some latest products to shown is incorrectly.

Twix

  • Beginner
  • *
  • Posts: 46
Re: [mod_virtuemart_product] Latest products empty
« Reply #2 on: March 05, 2012, 21:05:53 pm »
Could you give it a look?

glasya

  • Beginner
  • *
  • Posts: 48
Re: [mod_virtuemart_product] Latest products empty
« Reply #3 on: March 06, 2012, 08:15:28 am »
after the *7 add a *52 for the last year that should be enough right? :D

Twix

  • Beginner
  • *
  • Posts: 46
Re: [mod_virtuemart_product] Latest products empty
« Reply #4 on: March 06, 2012, 11:17:35 am »
Yes that's true, but it's still a core hack. The VM team should implement a solution to the core. Else it get lost with updates. Also if you set it to 1 year, you'll get the same problem (in the unlikely event) when you didn't update your webshop in a year. This could happen with some users.