how i am trying to include widgets.
[{if $oViewConf->isModuleActive (‘ekomiprc’,null,null)}]
[{oxid_include_widget cl=“ekomiPRCMiniStarsWidget” oxid=$oDetailsProduct->oxarticles__oxid->value}]
[{/if}]
This works fine in CE 4.10 But not in lesser versions.
This is my widget class:
class ekomiPRCMainWidget extends oxWidget {
/**
* Names of components (classes) that are initiated and executed
* before any other regular operation.
*
* @TODO: Enter components You need for the widget to be loaded. As example ... array('oxcmp_cur' => 1, ...);
*
* @var array
*/
protected $_aComponentNames = array('oxcmp_user' => 1);
/**
* Widget template name.
*
* @var string
*/
protected $_sThisTemplate = 'ekomiprcmainwidget.tpl';
protected $reviewsModel = null;
/**
* Reviews limit per request
*/
protected $_oArticle;
const REVIEWS_LIMIT = 5;
protected $reviewsCountPage;
/**
* Executes parent::render().
* Returns name of template file to render.
*
* @return string current template file name
*/
public function render() {
parent::render();
$this->reviewsCountPage = 0;
$oxid = $this->getViewParameter('oxid');
$oArticle = oxNew("oxarticle");
$oArticle->load($oxid);
$this->_oArticle = $oArticle;
$this->reviewsModel = new ekomiPRCReviewsModel($this->getArticleNumber());
/**
* Populate prcReviews
*/
$this->reviewsModel->populateReviewsData($range = '1w');
return $this->_sThisTemplate;
}
…
Where i have to extend the oxViewConfig class?