News:

Looking for documentation? Take a look on our wiki

Main Menu

[mod_virtuemart_product] Latest products empty

Started by Twix, February 29, 2012, 13:59:46 PM

Previous topic - Next topic

Twix

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

#1
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


glasya

after the *7 add a *52 for the last year that should be enough right? :D

Twix

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.