Author Topic: Latest products do not show correctly  (Read 4249 times)

Mole_LR

  • Beginner
  • *
  • Posts: 34
Latest products do not show correctly
« on: January 31, 2012, 14:59:52 pm »
Hello!

Environement: Joomla 2.5 (yesterday updated from 1.7. to 2.5., today just read, that VM 2 is not supported 2.5., but all is working OK without bugs...yet) + Virtuemart 2.0.0.
My Web page's Home page = VirtueMart Default Layout. I choosed to see Categories, Latest products and Top 10 products!

But Recent products do not function properly - it does not display really the latest products (it show some 5 products, but they are old, not Latest)..

Therefore my questions are:
1.)What could be the problem?
2.)Where (in which file) is defined:
2.1.)VirtueMart Default Layout template?
2.2.)Latest products algorythm?

Thank Your for help!

patrickit

  • Beginner
  • *
  • Posts: 13
    • Dubai web design
Re: Latest products do not show correctly
« Reply #1 on: February 01, 2012, 10:13:18 am »
I adore Joomla & Virtuemart!

Mole_LR

  • Beginner
  • *
  • Posts: 34
Re: Latest products do not show correctly
« Reply #2 on: February 01, 2012, 16:09:59 pm »
Thanks! It seems that works! ;-D

Mole_LR

  • Beginner
  • *
  • Posts: 34
Re: Latest products do not show correctly
« Reply #3 on: February 08, 2012, 23:40:24 pm »
But still not solved in VM 2.0.1e, had to make the hack adding "$orderBy = ' ORDER BY p.`modified_on`  ';" into /administrator/components/com_virtuemart/models/product.php after row 344...

I hope VM team will solve this in next pre/stable-realeses?

patrickit

  • Beginner
  • *
  • Posts: 13
    • Dubai web design
Re: Latest products do not show correctly
« Reply #4 on: February 09, 2012, 13:30:52 pm »
Thank you Mole_LR for updating us that VM 2.0.1e does not fix the latest products problem.
I adore Joomla & Virtuemart!

mchawi

  • Beginner
  • *
  • Posts: 10
Re: Latest products do not show correctly
« Reply #5 on: March 14, 2012, 14:28:50 pm »
i have tried the suggested hack with no success, i am using VM 2.0 with Joomla 1.7.5. Any quick fix?

patrickit

  • Beginner
  • *
  • Posts: 13
    • Dubai web design
Re: Latest products do not show correctly
« Reply #6 on: March 14, 2012, 14:43:03 pm »
@mchawi you get any errors? no change in result at all?
I adore Joomla & Virtuemart!

mchawi

  • Beginner
  • *
  • Posts: 10
Re: Latest products do not show correctly
« Reply #7 on: March 14, 2012, 15:17:50 pm »
No error, no changes, i am sure i am changing the right files cause i triend to change something else it throws 500 error,  i am using module override with multilingual feature, can that be source of problem?? For the multilingual part, i am using default Joomla 1.7+ Multilingual feature.

mchawi

  • Beginner
  • *
  • Posts: 10
Re: Latest products do not show correctly
« Reply #8 on: March 14, 2012, 15:31:02 pm »
Now i know, after putting this code, it fetch products depending on date, either Asc or Desc, it also ignore language setting, it display products from all languages, i have two languages, English and Chinese, is there a way i only fetch from specific category as i selected YES to Use category filter??

Code: [Select]
//Group case from the modules
if($group){

$groupBy = 'group by p.`virtuemart_product_id`';
switch ($group) {
case 'featured':
$where[] = 'p.`product_special`="1" ';
$orderBy = ' ORDER BY p.`modified_on`  ';   //PL temporary bug fix
                    $this->filter_order_Dir = 'ASC';   //PL temporary bug fix
break;
case 'latest':
$date = JFactory::getDate( time()-(60*60*24*7) ); //Set on a week, maybe make that configurable
$dateSql = $date->toMySQL();
$where[] = 'p.`modified_on` > "'.$dateSql.'" ';
$orderBy = ' ORDER BY p.`modified_on`  ';   //PL temporary bug fix
                    $this->filter_order_Dir = 'ASC';   //PL temporary bug fix
break;
case 'random':
$orderBy = ' ORDER BY p.`modified_on`  ';   //PL temporary bug fix
                    $this->filter_order_Dir = 'ASC';   //PL temporary bug fix
break;
case 'topten';
$orderBy = ' ORDER BY product_sales ';//LIMIT 0, '.(int)$nbrReturnProducts;  //TODO set limitLIMIT 0, '.(int)$nbrReturnProducts;
$this->filter_order_Dir = 'ASC';
}


patrickit

  • Beginner
  • *
  • Posts: 13
    • Dubai web design
Re: Latest products do not show correctly
« Reply #9 on: March 14, 2012, 18:46:57 pm »
@mchawi I think VM 2.0.2 solves the category filter problem, can you try upgrading your VM and check? It may still require the hack after upgrading.
I adore Joomla & Virtuemart!