вторник, 21 июня 2011 г.

Убираем «Недавно просмотренные товары» в VirtueMart

Продолжаем серию статей по заточке VirtueMart к нормальному виду и сегодня я опишу как убрать Недавно просмотренные товары в VirtueMart Для этогоделаем следующие:

  1. открываем для редактирования файл  components\com_virtuemart\themes\твой_шаблон\templates\common\recent.tpl.php

  2. заменяем в файле все на след код

<?php if( !defined( ‘_VALID_MOS’ ) && !defined( ‘_JEXEC’ ) ) die( ‘Direct Access to ‘.basename(__FILE__).’ is not allowed.’ ); ?>
<?php if( empty($recent_products)) return;
?>
<!– List of recent products –>
<!–//<h3><?php echo $VM_LANG->_(‘VM_RECENT_PRODUCTS’) ?></h3>
<ul>
<?php
foreach( $recent_products as $recent ) { // Loop through all recent products
foreach( $recent as $attr => $val ) {
//echo $attr.» – «.$val.»<br />»;
$this->set( $attr, $val );
}
/**
* Available indexes:
*
* $recent["product_name"] => The user ID of the comment author
* $recent["category_name"] => The username of the comment author
* $recent["product_thumb_image"] => The name of the comment author
* $recent["product_url"] => The UNIX timestamp of the comment («when» it was posted)
* $recent["category_url"] => The rating; an integer from 1 – 5
* $recent["product_s_desc"] => The comment text
*
*/
?>
<li>
<a href=»/blog/<?php echo $recent["product_url"]; ?>» >
<?php echo $recent["product_name"]; ?></a> (<?php echo $VM_LANG->_(‘PHPSHOP_CATEGORY’) ?>:
<a href=»/blog/<?php echo $recent["category_url"]; ?>» ><?php echo $recent["category_name"]; ?></a>)
</li>
<?php
}
?>
</ul>//–>

Здесь можно оставить свои комментарии. Выпуск подготовленплагином wordpress для subscribe.ru