本文整理汇总了PHP中oxUBase类的典型用法代码示例。如果您正苦于以下问题:PHP oxUBase类的具体用法?PHP oxUBase怎么用?PHP oxUBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了oxUBase类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
public function render()
{
/** @var $oRakuten rakuten_checkout */
$oRakuten = oxNew('rakuten_checkout');
// Check which method will be used: Standard or Inline
if ($this->getConfig()->getShopConfVar('sRakutenIntegrationMethod', -1) == 'STANDARD') {
// Redirect to Rakuten Checkout
if ($redirectUrl = $oRakuten->getRedirectUrl()) {
// Received redirect URL
oxUtils::getInstance()->redirect($redirectUrl, false, 302);
} else {
// Error returned, redirecting to the shopping cart
oxUtils::getInstance()->redirect($this->_getBasketUrl(), false, 302);
}
} elseif ($this->getConfig()->getShopConfVar('sRakutenIntegrationMethod', -1) == 'INLINE') {
// Inline integration (iFrame)
if ($inlineCode = $oRakuten->getRedirectUrl(true)) {
// Loading iFrame
$this->_aViewData['oxidBlock_content'][] = $inlineCode;
return parent::render();
} else {
// Error returned, redirecting to the shopping cart
oxUtils::getInstance()->redirect($this->_getBasketUrl(), false, 302);
}
} else {
// Unknown integration method
oxUtilsView::getInstance()->addErrorToDisplay('Unknown integration method.');
oxUtils::getInstance()->redirect($this->_getBasketUrl(), false, 302);
}
return false;
}
示例2: render
public function render()
{
parent::render();
$this->createJsonFile();
$this->getLocation();
return $this->_sThisTemplate;
}
示例3: render
/**
* If tags are ON - returns parent::render() value, else - displays 404
* page, as tags are off
*
* @return string
*/
public function render()
{
// if tags are off - showing 404 page
if (!$this->showTags()) {
error_404_handler();
}
return parent::render();
}
示例4: render
/**
* Ueberladen die Render
*
* @author Rafal Wesolowski
* @return string
*/
public function render()
{
parent::render();
$this->_aViewData["sOxid"] = $sOxid = oxConfig::getParameter("oxid");
$this->_getModulesAnalize();
$this->_aViewData["sView"] = __CLASS__;
return $this->_sThisTemplate;
}
示例5: render
/**
* Standard render function
*/
public function render()
{
parent::render();
$this->_debug = oxRegistry::getConfig()->getRequestParameter("debug");
$this->setArticlesHidden();
$this->setArticlesVisible();
// do not return template name, just die...
exit;
}
示例6: render
/**
* Executes parent method parent::render(), returns name of template file.
*
* @return string $sTplName template file name
*/
public function render()
{
parent::render();
// security fix so that you cant access files from outside template dir
$sTplName = basename((string) oxRegistry::getConfig()->getRequestParameter("tpl"));
if ($sTplName) {
$sTplName = 'custom/' . $sTplName;
}
return $sTplName;
}
示例7: render
/**
* Executes parent::render(), if invitation is disabled - redirects to main page
*
* @return string
*/
public function render()
{
$oConfig = $this->getConfig();
if (!$oConfig->getConfigParam("blInvitationsEnabled")) {
oxUtils::getInstance()->redirect($oConfig->getShopHomeURL());
return;
}
parent::render();
return $this->_sThisTemplate;
}
示例8: render
/**
* Renders error screen
*
* @return string
*/
public function render()
{
parent::render();
$errorNumber = oxRegistry::getConfig()->getRequestParameter('execerror');
$templates = $this->getErrorTemplates();
if (array_key_exists($errorNumber, $templates)) {
return $templates[$errorNumber];
} else {
return 'message/err_unknown.tpl';
}
}
示例9: render
/**
* Loads delivery, deliveryset list info and returns name of template file
* to render info::_sThisTemplate. If no template name specified - will
* load "impressum" content
*
* @return string $this->_sThisTemplate current template file name
*/
public function render()
{
parent::render();
if (!$this->getTemplateName()) {
// get default page
$oContent = $this->getContent();
$this->getViewConfig()->setViewConfigParam('tpl', $oContent->getId());
$this->_sThisTemplate = 'page/info/content.tpl';
} else {
$this->getViewConfig()->setViewConfigParam('tpl', $this->getTemplateName());
}
return $this->_sThisTemplate;
}
示例10: render
/**
* Renders error screen
*
* @return string
*/
public function render()
{
parent::render();
$sErrorNo = oxConfig::getParameter('execerror');
$sTemplate = '';
if ($sErrorNo == 'unknown') {
$sTemplate = 'message/err_unknown.tpl';
}
if ($sTemplate) {
return $sTemplate;
} else {
return 'start.tpl';
}
}
示例11: render
/**
* Renders error screen
*
* @return string
*/
public function render()
{
parent::render();
$sErrorNo = oxRegistry::getConfig()->getRequestParameter('execerror');
$sTemplate = '';
if ($sErrorNo == 'unknown') {
$sTemplate = 'message/err_unknown.tpl';
}
if ($sTemplate) {
return $sTemplate;
} else {
return 'message/err_unknown.tpl';
}
}
示例12: render
public function render()
{
parent::render();
if ($this->err == 'API KEY INVALID') {
oxRegistry::getUtils()->setHeader("HTTP/1.0 401 Unauthorized");
}
oxRegistry::getUtils()->setHeader("Content-Type: application/json; charset=" . oxRegistry::getLang()->translateString("charset"));
$oSmarty = oxRegistry::get("oxUtilsView")->getSmarty();
$this->_aViewData['errmsg'] = $this->err;
$this->_aViewData['haserror'] = $this->err !== false;
$this->_aViewData['data'] = $this->data;
foreach (array_keys($this->_aViewData) as $sViewName) {
$oSmarty->assign_by_ref($sViewName, $this->_aViewData[$sViewName]);
}
oxRegistry::getUtils()->showMessageAndExit($oSmarty->fetch($this->_sThisTemplate, $this->getViewId()));
}
示例13: render
/**
* Renders requested RSS feed
*
* Template variables:
* <b>rss</b>
*/
public function render()
{
parent::render();
$oSmarty = oxRegistry::get("oxUtilsView")->getSmarty();
// #2873: In demoshop for RSS we set php_handling to SMARTY_PHP_PASSTHRU
// as SMARTY_PHP_REMOVE removes not only php tags, but also xml
if ($this->getConfig()->isDemoShop()) {
$oSmarty->php_handling = SMARTY_PHP_PASSTHRU;
}
foreach (array_keys($this->_aViewData) as $sViewName) {
$oSmarty->assign_by_ref($sViewName, $this->_aViewData[$sViewName]);
}
// return rss xml, no further processing
$sCharset = oxRegistry::getLang()->translateString("charset");
oxRegistry::getUtils()->setHeader("Content-Type: text/xml; charset=" . $sCharset);
oxRegistry::getUtils()->showMessageAndExit($this->_processOutput($oSmarty->fetch($this->_sThisTemplate, $this->getViewId())));
}
示例14: render
/**
* Renders requested RSS feed
*
* Template variables:
* <b>rss</b>
*
* @return string $this->_sThisTemplate current template file name
*/
public function render()
{
parent::render();
$oSmarty = oxUtilsView::getInstance()->getSmarty();
// #2873: In demoshop for RSS we set php_handling to SMARTY_PHP_PASSTHRU
// as SMARTY_PHP_REMOVE removes not only php tags, but also xml
if ($this->getConfig()->isDemoShop()) {
$oSmarty->php_handling = SMARTY_PHP_PASSTHRU;
}
foreach (array_keys($this->_aViewData) as $sViewName) {
$oSmarty->assign_by_ref($sViewName, $this->_aViewData[$sViewName]);
}
// variables are set as deprecated, use getters
// $oSmarty->assign('xmldef', $this->getXmlDef());
// return rss xml, no further processing
oxUtils::getInstance()->setHeader("Content-Type: text/xml; charset=" . oxLang::getInstance()->translateString("charset"));
oxUtils::getInstance()->showMessageAndExit($this->_processOutput($oSmarty->fetch($this->_sThisTemplate, $this->getViewId())));
}
示例15: init
/**
* Sets self::$_aCollectedComponentNames to null, as views and widgets
* controllers loads different components and calls parent::init()
*/
public function init()
{
self::$_aCollectedComponentNames = null;
if (!empty($this->_aComponentNames)) {
foreach ($this->_aComponentNames as $sComponentName => $sCompCache) {
$oActTopView = $this->getConfig()->getTopActiveView();
if ($oActTopView) {
$this->_oaComponents[$sComponentName] = $oActTopView->getComponent($sComponentName);
if (!isset($this->_oaComponents[$sComponentName])) {
$this->_blLoadComponents = true;
break;
} else {
$this->_oaComponents[$sComponentName]->setParent($this);
}
}
}
}
parent::init();
}