Best Answer Cheren-dow , 06 May 2014 - 14:19
Подскажите пожалуйста, как это можно реализовать?
Могут возникнуть подводные камни - какие не знаю не тыкался.
Откройте файл
сайт\media\zoo\applications\jbuniversal\elements\jbimage\jbimage.php
В ниже приведенном методе
public function _render($params = array()){
...
}
Найдите строки
// init vars
$title = $this->get('title');
$width = (int)$params->get('width', 0);
$height = (int)$params->get('height', 0);
$alt = $title = empty($title) ? $this->getItem()->name : $title;
$url = $imagePopup = $appendClass = $target = $rel = '';
После них добавьте
$item = $this->getItem();
if ($item->type == 'product') { // Для какого типа материала будем заменять название на цену
$itemPriceData = $item->getElement('<ВАШ_ID_ЭЛЕМЕНТА_ЦЕНЫ>')->getElementData()->get('basic');
$priceCurrency = $this->app->jbmoney->toFormat($itemPriceData['value'], $itemPriceData['currency']);
$title = $priceCurrency;
}
После должна выводится цена
Go to the full post


This topic is locked








