Author Topic: Recently Viewed Products Template problem (and fix)  (Read 2213 times)

doorknob

  • Jr. Member
  • **
  • Posts: 151
Recently Viewed Products Template problem (and fix)
« on: March 02, 2008, 15:29:44 pm »
The recently viewed products facility in VM 1.1 (Nightly 02/03/2008) uses a hard-coded template name.
This can be fixed by making the following change:
administrator\components\com_virtuemart\classes\ps_product.php
Change line 2510 from
Code: [Select]
return $tpl->fetch( 'common/recent.tpl.php' );
to
Code: [Select]
return $tpl->fetch( $this->tpl_name );
and insert the following after line 27
Code: [Select]
public $tpl_name = 'common/recent.tpl.php';
This will allow the name of the file to be changed after the object has been instantiated but before the code is executed.

Regards
Phil