本文整理汇总了PHP中oxUBase::getActVendor方法的典型用法代码示例。如果您正苦于以下问题:PHP oxUBase::getActVendor方法的具体用法?PHP oxUBase::getActVendor怎么用?PHP oxUBase::getActVendor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类oxUBase
的用法示例。
在下文中一共展示了oxUBase::getActVendor方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _setVendorLocatorData
/**
* Sets details locator data for articles that came from vendor list.
*
* @param oxUBase $oLocatorTarget oxUBase object
* @param oxArticle $oCurrArticle current article
*/
protected function _setVendorLocatorData($oLocatorTarget, $oCurrArticle)
{
if ($oVendor = $oLocatorTarget->getActVendor()) {
$sVendorId = $oVendor->getId();
$myUtils = oxRegistry::getUtils();
$blSeo = $myUtils->seoIsActive();
// loading data for article navigation
$oIdList = oxNew("oxArticleList");
if ($oLocatorTarget->showSorting()) {
$oIdList->setCustomSorting($oLocatorTarget->getSortingSql($oLocatorTarget->getSortIdent()));
}
$oIdList->loadVendorIds($sVendorId);
//page number
$iPage = $this->_findActPageNumber($oLocatorTarget->getActPage(), $oIdList, $oCurrArticle);
$sAdd = null;
if (!$blSeo) {
$sAdd = 'listtype=vendor&cnid=v_' . $sVendorId;
}
// setting product position in list, amount of articles etc
$oVendor->iCntOfProd = $oIdList->count();
$oVendor->iProductPos = $this->_getProductPos($oCurrArticle, $oIdList, $oLocatorTarget);
if ($blSeo && $iPage) {
$oVendor->toListLink = oxRegistry::get("oxSeoEncoderVendor")->getVendorPageUrl($oVendor, $iPage);
} else {
$oVendor->toListLink = $this->_makeLink($oVendor->getLink(), $this->_getPageNumber($iPage));
}
$oNextProduct = $this->_oNextProduct;
$oBackProduct = $this->_oBackProduct;
$oVendor->nextProductLink = $oNextProduct ? $this->_makeLink($oNextProduct->getLink(), $sAdd) : null;
$oVendor->prevProductLink = $oBackProduct ? $this->_makeLink($oBackProduct->getLink(), $sAdd) : null;
}
}