本文整理汇总了PHP中oxAdminDetails类的典型用法代码示例。如果您正苦于以下问题:PHP oxAdminDetails类的具体用法?PHP oxAdminDetails怎么用?PHP oxAdminDetails使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了oxAdminDetails类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
/**
* Executes parent method parent::render(), creates discount category tree,
* passes data to Smarty engine and returns name of template file "discount_main.tpl".
*
* @return string
*/
public function render()
{
parent::render();
$soxId = $this->getEditObjectId();
if ($soxId != '-1' && isset($soxId)) {
// load object
$oDiscount = oxNew('oxdiscount');
$oDiscount->load($soxId);
$this->_aViewData['edit'] = $oDiscount;
//disabling derived items
if ($oDiscount->isDerived()) {
$this->_aViewData['readonly'] = true;
}
// generating category tree for artikel choose select list
$this->_getCategoryTree("artcattree", null);
}
$aColumns = array();
$iAoc = oxConfig::getParameter("aoc");
if ($iAoc == 1) {
include_once 'inc/discount_articles.inc.php';
$this->_aViewData['oxajax'] = $aColumns;
return "popups/discount_articles.tpl";
} elseif ($iAoc == 2) {
include_once 'inc/discount_categories.inc.php';
$this->_aViewData['oxajax'] = $aColumns;
return "popups/discount_categories.tpl";
}
return 'discount_articles.tpl';
}
示例2: save
/**
* Saves main wrapping parameters.
*
* @return null
*/
public function save()
{
parent::save();
$soxId = $this->getEditObjectId();
$aParams = oxRegistry::getConfig()->getRequestParameter("editval");
// checkbox handling
if (!isset($aParams['oxwrapping__oxactive'])) {
$aParams['oxwrapping__oxactive'] = 0;
}
// shopid
$aParams['oxwrapping__oxshopid'] = oxRegistry::getSession()->getVariable("actshop");
$oWrapping = oxNew("oxwrapping");
if ($soxId != "-1") {
$oWrapping->loadInLang($this->_iEditLang, $soxId);
// #1173M - not all pic are deleted, after article is removed
oxRegistry::get("oxUtilsPic")->overwritePic($oWrapping, 'oxwrapping', 'oxpic', 'WP', '0', $aParams, $this->getConfig()->getPictureDir(false));
} else {
$aParams['oxwrapping__oxid'] = null;
//$aParams = $oWrapping->ConvertNameArray2Idx( $aParams);
}
$oWrapping->setLanguage(0);
$oWrapping->assign($aParams);
$oWrapping->setLanguage($this->_iEditLang);
$oWrapping = oxRegistry::get("oxUtilsFile")->processFiles($oWrapping);
$oWrapping->save();
// set oxid if inserted
$this->setEditObjectId($oWrapping->getId());
}
示例3: save
/**
* Saves deliveryset information changes.
*
* @return mixed
*/
public function save()
{
parent::save();
$soxId = $this->getEditObjectId();
$aParams = oxConfig::getParameter("editval");
// shopid
$sShopID = oxSession::getVar("actshop");
$aParams['oxdeliveryset__oxshopid'] = $sShopID;
$oDelSet = oxNew("oxdeliveryset");
if ($soxId != "-1") {
$oDelSet->loadInLang($this->_iEditLang, $soxId);
} else {
$aParams['oxdeliveryset__oxid'] = null;
}
// checkbox handling
if (!isset($aParams['oxdeliveryset__oxactive'])) {
$aParams['oxdeliveryset__oxactive'] = 0;
}
//$aParams = $oDelSet->ConvertNameArray2Idx( $aParams);
$oDelSet->setLanguage(0);
$oDelSet->assign($aParams);
$oDelSet->setLanguage($this->_iEditLang);
$oDelSet = oxUtilsFile::getInstance()->processFiles($oDelSet);
$oDelSet->save();
// set oxid if inserted
$this->setEditObjectId($oDelSet->getId());
}
示例4: save
/**
* Saves main orders configuration parameters.
*
* @return string
*/
public function save()
{
parent::save();
$soxId = $this->getEditObjectId();
$aParams = oxConfig::getParameter("editval");
// shopid
$sShopID = oxSession::getVar("actshop");
$aParams['oxorder__oxshopid'] = $sShopID;
$oOrder = oxNew("oxorder");
if ($soxId != "-1") {
$oOrder->load($soxId);
} else {
$aParams['oxorder__oxid'] = null;
}
$oOrder->assign($aParams);
$aDynvalues = oxConfig::getParameter("dynvalue");
if (isset($aDynvalues)) {
// #411 Dodger
$oPayment = oxNew("oxuserpayment");
$oPayment->load($oOrder->oxorder__oxpaymentid->value);
$oPayment->oxuserpayments__oxvalue->setValue(oxUtils::getInstance()->assignValuesToText($aDynvalues));
$oPayment->save();
}
// keeps old delivery cost
$oOrder->reloadDelivery(false);
// keeps old discount
$oOrder->reloadDiscount(false);
$oOrder->recalculateOrder();
// set oxid if inserted
$this->setEditObjectId($oOrder->getId());
}
示例5: render
/**
* Executes parent method parent::render(), creates delivery category tree,
* passes data to Smarty engine and returns name of template file "delivery_main.tpl".
*
* @return string
*/
public function render()
{
parent::render();
$soxId = $this->getEditObjectId();
$sChosenArtCat2 = oxConfig::getParameter("artcat2");
if ($soxId != "-1" && isset($soxId)) {
$sChosenArtCat2 = $this->_getCategoryTree("artcattree", $sChosenArtCat2);
// load object
$oDelivery = oxNew("oxdelivery");
$oDelivery->load($soxId);
$this->_aViewData["edit"] = $oDelivery;
//Disable editing for derived articles
if ($oDelivery->isDerived()) {
$this->_aViewData['readonly'] = true;
}
}
$aColumns = array();
$iAoc = oxConfig::getParameter("aoc");
if ($iAoc == 1) {
include_once 'inc/delivery_articles.inc.php';
$this->_aViewData['oxajax'] = $aColumns;
return "popups/delivery_articles.tpl";
} elseif ($iAoc == 2) {
include_once 'inc/delivery_categories.inc.php';
$this->_aViewData['oxajax'] = $aColumns;
return "popups/delivery_categories.tpl";
}
return "delivery_articles.tpl";
}
示例6: render
/**
* Executes parent method parent::render(), creates discount category tree,
* passes data to Smarty engine and returns name of template file "discount_main.tpl".
*
* @return string
*/
public function render()
{
parent::render();
$soxId = $this->getEditObjectId();
if (isset($soxId) && $soxId != '-1') {
// load object
$oDiscount = oxNew('oxdiscount');
$oDiscount->load($soxId);
$this->_aViewData['edit'] = $oDiscount;
//disabling derived items
if ($oDiscount->isDerived()) {
$this->_aViewData['readonly'] = true;
}
// generating category tree for artikel choose select list
$this->_createCategoryTree("artcattree");
}
$iAoc = oxRegistry::getConfig()->getRequestParameter("aoc");
if ($iAoc == 1) {
$oDiscountArticlesAjax = oxNew('discount_articles_ajax');
$this->_aViewData['oxajax'] = $oDiscountArticlesAjax->getColumns();
return "popups/discount_articles.tpl";
} elseif ($iAoc == 2) {
$oDiscountCategoriesAjax = oxNew('discount_categories_ajax');
$this->_aViewData['oxajax'] = $oDiscountCategoriesAjax->getColumns();
return "popups/discount_categories.tpl";
}
return 'discount_articles.tpl';
}
示例7: save
/**
* Saves user extended information.
*
* @return mixed
*/
public function save()
{
parent::save();
$soxId = $this->getEditObjectId();
if (!$this->_allowAdminEdit($soxId)) {
return false;
}
$aParams = oxRegistry::getConfig()->getRequestParameter("editval");
$oUser = oxNew("oxuser");
if ($soxId != "-1") {
$oUser->load($soxId);
} else {
$aParams['oxuser__oxid'] = null;
}
// checkbox handling
$aParams['oxuser__oxactive'] = $oUser->oxuser__oxactive->value;
$blNewsParams = oxRegistry::getConfig()->getRequestParameter("editnews");
if (isset($blNewsParams)) {
$oNewsSubscription = $oUser->getNewsSubscription();
$oNewsSubscription->setOptInStatus((int) $blNewsParams);
$oNewsSubscription->setOptInEmailStatus((int) oxRegistry::getConfig()->getRequestParameter("emailfailed"));
}
$oUser->assign($aParams);
$oUser->save();
// set oxid if inserted
$this->setEditObjectId($oUser->getId());
}
示例8: save
/**
* Saves news text.
*
* @return mixed
*/
public function save()
{
parent::save();
$soxId = $this->getEditObjectId();
$aParams = oxRegistry::getConfig()->getRequestParameter("editval");
$oNews = oxNew("oxnews");
$iNewsLang = oxRegistry::getConfig()->getRequestParameter("newslang");
if (!isset($iNewsLang)) {
$iNewsLang = $this->_iEditLang;
}
if ($soxId != "-1") {
$oNews->loadInLang($iNewsLang, $soxId);
} else {
$aParams['oxnews__oxid'] = null;
}
// Disable editing for derived items.
if ($oNews->isDerived()) {
return;
}
$oNews->setLanguage(0);
$oNews->assign($aParams);
$oNews->setLanguage($iNewsLang);
$oNews->save();
// set oxid if inserted
$this->setEditObjectId($oNews->getId());
}
示例9: save
/**
* Speichert den Standort mit den jeweiligen Parameter
* Saves selection list parameters changes.
*
* @return mixed
*/
public function save()
{
parent::save();
$this->resetContentCache();
$soxId = $this->getEditObjectId();
$aParams = oxConfig::getParameter("editval");
if (!isset($aParams['stores__store_active'])) {
$aParams['stores__store_active'] = 0;
}
$oShoplocator = oxNew("shoplocator");
if (isset($aParams['stores__store_address'])) {
$address = str_replace(' ', '', $aParams['stores__store_address']) . "+" . $aParams['stores__store_city'] . "+" . $aParams['stores__store_zip'];
$pc = file_get_contents('http://maps.googleapis.com/maps/api/geocode/json?address=' . $address . '&sensor=false');
$output = json_decode($pc);
$aParams['stores__store_latitude'] = $output->results[0]->geometry->location->lat;
$aParams['stores__store_logitude'] = $output->results[0]->geometry->location->lng;
}
if ($soxId != "-1") {
$oShoplocator->load($soxId);
} else {
$aParams['stores__oxid'] = null;
}
//Disable editing for derived articles
if ($oShoplocator->isDerived()) {
return;
}
$oShoplocator->assign($aParams);
$oShoplocator->save();
// set oxid if inserted
$this->setEditObjectId($oShoplocator->getId());
}
示例10: render
/**
* Executes parent method parent::render() and returns name of template
* file "statistic_service.tpl".
*
* @return string
*/
public function render()
{
parent::render();
$sSql = "select count(*) from oxlogs where oxshopid = '" . $this->getConfig()->getShopId() . "'";
$this->_aViewData['iLogCount'] = oxDb::getDb()->getOne($sSql, false, false);
return "statistic_service.tpl";
}
示例11: render
/**
* Executes parent method parent::render(), creates oxOrder, passes
* it's data to Smarty engine and returns name of template file
* "order_overview.tpl".
*
* @return string
*/
public function render()
{
$myConfig = $this->getConfig();
parent::render();
$oOrder = oxNew("oxOrder");
$oCur = $myConfig->getActShopCurrencyObject();
$oLang = oxRegistry::getLang();
$soxId = $this->getEditObjectId();
if ($soxId != "-1" && isset($soxId)) {
// load object
$oOrder->load($soxId);
$this->_aViewData["edit"] = $oOrder;
$this->_aViewData["aProductVats"] = $oOrder->getProductVats();
$this->_aViewData["orderArticles"] = $oOrder->getOrderArticles();
$this->_aViewData["giftCard"] = $oOrder->getGiftCard();
$this->_aViewData["paymentType"] = $this->_getPaymentType($oOrder);
$this->_aViewData["deliveryType"] = $oOrder->getDelSet();
$sTsProtectsField = 'oxorder__oxtsprotectcosts';
if ($oOrder->{$sTsProtectsField}->value) {
$this->_aViewData["tsprotectcosts"] = $oLang->formatCurrency($oOrder->{$sTsProtectsField}->value, $oCur);
}
}
// orders today
$dSum = $oOrder->getOrderSum(true);
$this->_aViewData["ordersum"] = $oLang->formatCurrency($dSum, $oCur);
$this->_aViewData["ordercnt"] = $oOrder->getOrderCnt(true);
// ALL orders
$dSum = $oOrder->getOrderSum();
$this->_aViewData["ordertotalsum"] = $oLang->formatCurrency($dSum, $oCur);
$this->_aViewData["ordertotalcnt"] = $oOrder->getOrderCnt();
$this->_aViewData["afolder"] = $myConfig->getConfigParam('aOrderfolder');
$this->_aViewData["alangs"] = $oLang->getLanguageNames();
$this->_aViewData["currency"] = $oCur;
return "order_overview.tpl";
}
示例12: save
/**
* Saves selection list parameters changes.
*
* @return mixed
*/
public function save()
{
parent::save();
$soxId = $this->getEditObjectId();
$aParams = oxRegistry::getConfig()->getRequestParameter("editval");
if (!isset($aParams['oxmanufacturers__oxactive'])) {
$aParams['oxmanufacturers__oxactive'] = 0;
}
// shopid
$sShopID = oxRegistry::getSession()->getVariable("actshop");
$aParams['oxmanufacturers__oxshopid'] = $sShopID;
$oManufacturer = oxNew("oxmanufacturer");
if ($soxId != "-1") {
$oManufacturer->loadInLang($this->_iEditLang, $soxId);
} else {
$aParams['oxmanufacturers__oxid'] = null;
}
//$aParams = $oManufacturer->ConvertNameArray2Idx( $aParams);
$oManufacturer->setLanguage(0);
$oManufacturer->assign($aParams);
$oManufacturer->setLanguage($this->_iEditLang);
$oManufacturer = oxRegistry::get("oxUtilsFile")->processFiles($oManufacturer);
$oManufacturer->save();
// set oxid if inserted
$this->setEditObjectId($oManufacturer->getId());
}
示例13: render
/**
* Collects article crosselling and attributes information, passes
* them to Smarty engine and returns name or template file
* "article_crossselling.tpl".
*
* @return string
*/
public function render()
{
parent::render();
$this->_aViewData['edit'] = $oArticle = oxNew('oxarticle');
// crossselling
$this->_createCategoryTree("artcattree");
// accessoires
$this->_createCategoryTree("artcattree2");
$soxId = $this->getEditObjectId();
if ($soxId != "-1" && isset($soxId)) {
// load object
$oArticle->load($soxId);
if ($oArticle->isDerived()) {
$this->_aViewData['readonly'] = true;
}
}
$iAoc = oxRegistry::getConfig()->getRequestParameter("aoc");
if ($iAoc == 1) {
$oArticleCrossellingAjax = oxNew('article_crossselling_ajax');
$this->_aViewData['oxajax'] = $oArticleCrossellingAjax->getColumns();
return "popups/article_crossselling.tpl";
} elseif ($iAoc == 2) {
$oArticleAccessoriesAjax = oxNew('article_accessories_ajax');
$this->_aViewData['oxajax'] = $oArticleAccessoriesAjax->getColumns();
return "popups/article_accessories.tpl";
}
return "article_crossselling.tpl";
}
示例14: render
/**
* Executes parent method parent::render(), creates oxpricealarm object
* and passes it's data to Smarty engine. Returns name of template file
* "pricealarm_main.tpl".
*
* @return string
*/
public function render()
{
$config = $this->getConfig();
parent::render();
$shopId = $config->getShopId();
//articles price in subshop and baseshop can be different
$this->_aViewData['iAllCnt'] = 0;
$query = "\n SELECT oxprice, oxartid\n FROM oxpricealarm\n WHERE oxsended = '000-00-00 00:00:00' AND oxshopid = '{$shopId}' ";
$result = oxDb::getDb()->select($query);
if ($result != false && $result->count() > 0) {
$simpleCache = array();
while (!$result->EOF) {
$price = $result->fields[0];
$articleId = $result->fields[1];
if (isset($simpleCache[$articleId])) {
if ($simpleCache[$articleId] <= $price) {
$this->_aViewData['iAllCnt'] += 1;
}
} else {
$article = oxNew("oxArticle");
if ($article->load($articleId)) {
$articlePrice = $simpleCache[$articleId] = $article->getPrice()->getBruttoPrice();
if ($articlePrice <= $price) {
$this->_aViewData['iAllCnt'] += 1;
}
}
}
$result->fetchRow();
}
}
return "pricealarm_mail.tpl";
}
示例15: render
/**
* Collects article attributes and selection lists, passes them to Smarty engine,
* returns name of template file "article_attribute.tpl".
*
* @return string
*/
public function render()
{
parent::render();
$this->_aViewData['edit'] = $oArticle = oxNew('oxarticle');
$soxId = $this->getEditObjectId();
if ($soxId != "-1" && isset($soxId)) {
// load object
$oArticle->load($soxId);
if ($oArticle->isDerived()) {
$this->_aViewData["readonly"] = true;
}
}
$aColumns = array();
$iAoc = oxConfig::getParameter("aoc");
if ($iAoc == 1) {
include_once 'inc/article_attribute.inc.php';
$this->_aViewData['oxajax'] = $aColumns;
return "popups/article_attribute.tpl";
} elseif ($iAoc == 2) {
include_once 'inc/article_selection.inc.php';
$this->_aViewData['oxajax'] = $aColumns;
return "popups/article_selection.tpl";
}
return "article_attribute.tpl";
}