当前位置: 首页>>代码示例>>PHP>>正文


PHP _xls_get_conf函数代码示例

本文整理汇总了PHP中_xls_get_conf函数的典型用法代码示例。如果您正苦于以下问题:PHP _xls_get_conf函数的具体用法?PHP _xls_get_conf怎么用?PHP _xls_get_conf使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了_xls_get_conf函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: GetSize

 public static function GetSize($intImageTypeId)
 {
     list($intDefWidth, $intDefHeight) = ImagesType::$SizeArray[$intImageTypeId];
     $strCfg = ImagesType::GetConfigKey($intImageTypeId);
     $strCfgWidth = $strCfg . '_WIDTH';
     $strCfgHeight = $strCfg . '_HEIGHT';
     $intWidth = Yii::app()->theme->info->{$strCfgWidth};
     $intHeight = Yii::app()->theme->info->{$strCfgHeight};
     //If our theme doesn't have the config there, see if we have a 3.0 style config.xml
     if (empty($intWidth) || empty($intHeight)) {
         $fnOptions = YiiBase::getPathOfAlias('webroot') . "/themes/" . Yii::app()->theme->name . "/config.xml";
         if (file_exists($fnOptions)) {
             $strXml = file_get_contents($fnOptions);
             // Parse xml for response values
             $oXML = new SimpleXMLElement($strXml);
             if (isset($oXML->defaults->configuration)) {
                 foreach ($oXML->defaults->configuration as $item) {
                     if ((string) $item->key_name == $strCfgWidth) {
                         $intWidth = (string) $item->key_value;
                     }
                     if ((string) $item->key_name == $strCfgHeight) {
                         $intHeight = (string) $item->key_value;
                     }
                 }
             }
         }
     }
     //if all else STILL fails, go old school and get them from the config (And even more so, use defaults)
     if (empty($intWidth) || empty($intHeight)) {
         $intWidth = _xls_get_conf($strCfgWidth, $intDefWidth);
         $intHeight = _xls_get_conf($strCfgHeight, $intDefHeight);
     }
     return array($intWidth, $intHeight);
 }
开发者ID:uiDeveloper116,项目名称:webstore,代码行数:34,代码来源:ImagesType.php

示例2: beforeAction

 public function beforeAction($action)
 {
     $this->scanModules('payment');
     $arrModules = Modules::model()->findAllByAttributes(array('category' => 'payment'), array('order' => 'module'));
     $this->_allowAdvancedPayments = CPropertyValue::ensureBoolean(Yii::app()->params['ALLOW_ADVANCED_PAY_METHODS']);
     $menuSidebar = array();
     foreach ($arrModules as $module) {
         $currentModule = Yii::app()->getComponent($module->module);
         if (is_null($currentModule)) {
             continue;
         }
         if ($currentModule->cloudCompatible === false && _xls_get_conf('LIGHTSPEED_CLOUD') > 0) {
             continue;
         }
         if ($currentModule->isDisplayable() === false) {
             continue;
         }
         $menuSidebar[] = array('label' => $currentModule->AdminName, 'url' => array('payments/module', 'id' => $module->module), 'advancedPayment' => $currentModule->advancedMode);
     }
     $advancedPaymentMethods = where($menuSidebar, array('advancedPayment' => true));
     $simplePaymentMethods = where($menuSidebar, array('advancedPayment' => false));
     $this->menuItems = array_merge(array(array('label' => 'Simple Integration Modules', 'linkOptions' => array('class' => 'nav-header'))), $simplePaymentMethods, array(array('label' => 'Advanced Integration Modules', 'linkOptions' => array('class' => 'nav-header'), 'visible' => count($advancedPaymentMethods) > 0)), $advancedPaymentMethods, $this->getPaymentSetupLinks());
     $objModules = Modules::model()->findAllByAttributes(array('category' => 'payment', 'active' => 1));
     if (count($objModules) === 0 && $action->id == "index") {
         $this->noneActive = 1;
         Yii::app()->user->setFlash('error', Yii::t('admin', 'WARNING: You have no payment modules activated. No one can checkout.'));
     }
     return parent::beforeAction($action);
 }
开发者ID:uiDeveloper116,项目名称:webstore,代码行数:29,代码来源:PaymentsController.php

示例3: getAdminForm

 public function getAdminForm()
 {
     if (empty($this->origincountry)) {
         $this->origincountry = (int) _xls_get_conf('DEFAULT_COUNTRY', 224);
     }
     return array('title' => 'Note: You can ' . CHtml::link('Set Product Restrictions', '#', array('class' => 'basic', 'id' => get_class($this))) . ' for this module.', 'elements' => array('label' => array('type' => 'text', 'maxlength' => 64), 'accnumber' => array('type' => 'text', 'maxlength' => 64), 'meternumber' => array('type' => 'text', 'maxlength' => 64), 'securitycode' => array('type' => 'text', 'maxlength' => 64), 'authkey' => array('type' => 'text', 'maxlength' => 64), 'originadde' => array('type' => 'text', 'maxlength' => 64), 'origincity' => array('type' => 'text', 'maxlength' => 64), 'originpostcode' => array('type' => 'text', 'maxlength' => 64), 'origincountry' => array('type' => 'dropdownlist', 'items' => CHtml::listData(Country::model()->findAllByAttributes(array('active' => 1), array('order' => 'sort_order,country')), 'id', 'country'), 'ajax' => array('type' => 'POST', 'url' => Yii::app()->controller->createUrl('ajax/getstates'), 'data' => 'js:{"' . 'country_id' . '": $("#' . CHtml::activeId($this, 'origincountry') . ' option:selected").val()}', 'update' => '#' . CHtml::activeId($this, 'originstate'))), 'originstate' => array('type' => 'dropdownlist', 'items' => CHtml::listData(State::model()->findAllByAttributes(array('country_id' => $this->origincountry, 'active' => 1), array('order' => 'sort_order,state')), 'id', 'code')), 'offerservices' => array('type' => 'checkboxlist', 'items' => fedex::$service_types, 'separator' => '', 'template' => '<div class="offerservices">{input} {label}</div>', 'label' => 'Offer these services<br><a onclick="selectall()">Select All</a><br><a onclick="selectnone()">Select None</a><br>'), 'packaging' => array('type' => 'dropdownlist', 'items' => array('YOUR_PACKAGING' => 'Your packaging', 'FEDEX_BOX' => 'FedEx Box', 'FEDEX_PAK' => 'FedEx Pak', 'FEDEX_TUBE' => 'FedEx Tube')), 'ratetype' => array('type' => 'dropdownlist', 'items' => array('RATED_LIST' => 'List Rates', 'RATED_ACCOUNT' => 'Negotiated rates')), 'customs' => array('type' => 'dropdownlist', 'items' => array('CLEARANCEFEE' => 'FedEx Handles Customs Clearance', 'NOCHARGE' => 'My store handles Customs Clearance')), 'restrictcountry' => array('type' => 'dropdownlist', 'items' => Country::getAdminRestrictionList(true)), 'markup' => array('type' => 'text', 'maxlength' => 4), 'product' => array('type' => 'text', 'maxlength' => 64)));
 }
开发者ID:uiDeveloper116,项目名称:webstore,代码行数:7,代码来源:fedexAdminForm.php

示例4: validateAttribute

 /**
  * Ensure that a password meets our requirements
  * Return an error message detailing the failure if applicable.
  *
  * @param CModel $model
  * @param string $attribute
  * @return string | false
  */
 public function validateAttribute($model, $attribute)
 {
     $minLength = _xls_get_conf('MIN_PASSWORD_LEN', 0);
     if (strlen($model->{$attribute}) < $minLength) {
         $this->addError($model, $attribute, Yii::t('customer', '{attribute} too short. Must be a minimum of {length} characters.', array('{attribute}' => $model->getAttributeLabel($attribute), '{length}' => $minLength)));
     }
 }
开发者ID:uiDeveloper116,项目名称:webstore,代码行数:15,代码来源:PasswordLengthValidator.php

示例5: run

 /**
  * The run() function is called from Web Store to run the process.
  * @return array
  */
 public function run()
 {
     $ewayCvnAusValues = array("ewayCardNumber" => _xls_number_only($this->CheckoutForm->cardNumber), "ewayCardHoldersName" => $this->CheckoutForm->cardNameOnCard, "ewayCardExpiryMonth" => $this->CheckoutForm->cardExpiryMonth, "ewayCardExpiryYear" => $this->CheckoutForm->cardExpiryYear, "ewayCVN" => $this->CheckoutForm->cardCVV, "ewayCustomerInvoiceRef" => $this->objCart->id_str, "ewayTotalAmount" => round($this->objCart->total * 100), "ewayCustomerFirstName" => $this->CheckoutForm->contactFirstName, "ewayCustomerLastName" => $this->CheckoutForm->contactLastName, "ewayCustomerAddress" => ($this->CheckoutForm->billingAddress2 != '' ? $this->CheckoutForm->billingAddress1 . " " . $this->CheckoutForm->billingAddress2 : $this->CheckoutForm->billingAddress1) . ", " . $this->CheckoutForm->billingCity . " " . $this->CheckoutForm->billingStateCode, "ewayCustomerPostcode" => $this->CheckoutForm->billingPostal, "ewayCustomerEmail" => $this->CheckoutForm->contactEmail, "ewayCustomerInvoiceDescription" => _xls_get_conf('STORE_NAME', "Online") . " Order", "ewayTrxnNumber" => '', "ewayOption1" => '', "ewayOption2" => '', "ewayOption3" => '');
     $xmlRequest = "<ewaygateway><ewayCustomerID>" . $this->config['login'] . "</ewayCustomerID>";
     foreach ($ewayCvnAusValues as $key => $value) {
         $xmlRequest .= "<{$key}>{$value}</{$key}>";
     }
     $xmlRequest .= "</ewaygateway>";
     Yii::log(sprintf("%s sending %s for amt %s\nRequest: %s", __CLASS__, $this->objCart->id_str, $this->objCart->total, print_r($this->obfuscateRequestArray($ewayCvnAusValues), true)), $this->logLevel, 'application.' . __CLASS__ . '.' . __FUNCTION__);
     $xmlResponse = $this->sendTransactionToEway($xmlRequest);
     if ($xmlResponse !== '') {
         $oXML = new SimpleXMLElement($xmlResponse);
         if ((string) $oXML->ewayTrxnStatus != "True") {
             // unsuccessful
             $arrReturn['success'] = false;
             $arrReturn['amount_paid'] = 0;
             $arrReturn['result'] = Yii::t('global', (string) $oXML->ewayTrxnError);
             Yii::log("Declined: " . (string) $oXML->ewayTrxnError, 'error', 'application.' . __CLASS__ . "." . __FUNCTION__);
         } else {
             //We have success
             $arrReturn['success'] = true;
             $arrReturn['amount_paid'] = stripos((string) $oXML->ewayTrxnError, "Tests CVN Gateway") > 0 ? 0.0 : (string) $oXML->ewayReturnAmount / 100;
             $arrReturn['result'] = (string) $oXML->ewayAuthCode;
         }
     } else {
         // Curl call failed.
         $arrReturn['success'] = false;
         $arrReturn['amount_paid'] = 0;
         $arrReturn['result'] = Yii::t('global', "There was an error processing your payment, please try again later.");
         Yii::log("Curl Error: curl call failed.", 'error', 'application.' . __CLASS__ . "." . __FUNCTION__);
     }
     return $arrReturn;
 }
开发者ID:uiDeveloper116,项目名称:webstore,代码行数:37,代码来源:ewayaim.php

示例6: run

 /**
  * Run the payment process
  * @return mixed
  */
 public function run()
 {
     if ($this->config['live'] == 'live') {
         $worldpay_url = "https://secure.wp3.rbsworldpay.com/wcc/purchase";
     } else {
         $worldpay_url = "https://select-test.wp3.rbsworldpay.com/wcc/purchase";
     }
     $str = sprintf('<FORM name="worldpayform" action="%s" method="POST">', $worldpay_url);
     if ($this->config['live'] == 'test') {
         $str .= _xls_make_hidden('testMode', '100');
     }
     $str .= _xls_make_hidden('address1', $this->CheckoutForm->billingAddress1);
     $str .= _xls_make_hidden('address2', $this->CheckoutForm->billingAddress2);
     $str .= _xls_make_hidden('town', $this->CheckoutForm->billingCity);
     $str .= _xls_make_hidden('region', $this->CheckoutForm->billingStateCode);
     $str .= _xls_make_hidden('postcode', $this->CheckoutForm->billingPostal);
     $str .= _xls_make_hidden('country', $this->CheckoutForm->billingCountryCode);
     $str .= _xls_make_hidden('email', $this->CheckoutForm->contactEmail);
     $str .= _xls_make_hidden('name', $this->CheckoutForm->contactFirstName . " " . $this->CheckoutForm->contactLastName);
     $str .= _xls_make_hidden('tel', $this->CheckoutForm->contactPhone);
     $str .= _xls_make_hidden('instId', $this->config['login']);
     $str .= _xls_make_hidden('currency', _xls_get_conf('CURRENCY_DEFAULT', 'USD'));
     $str .= _xls_make_hidden('cartId', $this->objCart->id_str);
     $str .= _xls_make_hidden('desc', _xls_get_conf('STORE_NAME', "Online") . " Order");
     $str .= _xls_make_hidden('M_cartlink', Yii::app()->controller->createAbsoluteUrl('cart/restore', array('getuid' => $this->objCart->linkid)));
     $str .= _xls_make_hidden('MC_callback', Yii::app()->controller->createAbsoluteUrl('cart/payment', array('id' => $this->modulename)));
     $str .= _xls_make_hidden('amount', round($this->objCart->total, 2));
     $str .= '</FORM>';
     Yii::log(sprintf("%s sending %s\nRequest %s", __CLASS__, $this->objCart->id_str, $str), $this->logLevel, 'application.' . __CLASS__ . '.' . __FUNCTION__);
     $arrReturn['api'] = $this->apiVersion;
     $arrReturn['jump_form'] = $str;
     return $arrReturn;
 }
开发者ID:uiDeveloper116,项目名称:webstore,代码行数:37,代码来源:worldpaysim.php

示例7: getAdminForm

 public function getAdminForm()
 {
     if (empty($this->origincountry)) {
         $this->origincountry = (int) _xls_get_conf('DEFAULT_COUNTRY', 224);
     }
     return array('title' => 'Note: You can ' . CHtml::link('Set Product Restrictions', '#', array('class' => 'basic', 'id' => get_class($this))) . ' for this module.', 'elements' => array('label' => array('type' => 'text', 'maxlength' => 64), 'mode' => array('type' => 'dropdownlist', 'items' => array('UPS' => 'Domestic US UPS Mode', 'IUPS' => 'IUPS International UPS Mode')), 'username' => array('type' => 'text', 'maxlength' => 64), 'password' => array('type' => 'text', 'maxlength' => 64), 'accesskey' => array('type' => 'text', 'maxlength' => 64), 'originpostcode' => array('type' => 'text', 'maxlength' => 64), 'origincountry' => array('type' => 'dropdownlist', 'items' => CHtml::listData(Country::model()->findAllByAttributes(array('active' => 1), array('order' => 'sort_order,country')), 'id', 'country'), 'ajax' => array('type' => 'POST', 'url' => Yii::app()->controller->createUrl('ajax/getstates'), 'data' => 'js:{"' . 'country_id' . '": $("#' . CHtml::activeId($this, 'origincountry') . ' option:selected").val()}', 'update' => '#' . CHtml::activeId($this, 'originstate'))), 'originstate' => array('type' => 'dropdownlist', 'items' => CHtml::listData(State::model()->findAllByAttributes(array('country_id' => $this->origincountry, 'active' => 1), array('order' => 'sort_order,state')), 'id', 'code')), 'offerservices' => array('type' => 'checkboxlist', 'items' => ups::$service_types, 'separator' => '', 'template' => '<div class="offerservices">{input} {label}</div>', 'label' => 'Offer these services<br><a onclick="selectall()">Select All</a><br><a onclick="selectnone()">Select None</a><br>'), 'package' => array('type' => 'dropdownlist', 'items' => ups::$package_types), 'ratecode' => array('type' => 'dropdownlist', 'items' => ups::$rate_types), 'customerclassification' => array('type' => 'dropdownlist', 'items' => array('04' => 'Retail', '03' => 'Occasional', '01' => 'Wholesale')), 'restrictcountry' => array('type' => 'dropdownlist', 'items' => Country::getAdminRestrictionList(true)), 'markup' => array('type' => 'text', 'maxlength' => 4), 'product' => array('type' => 'text', 'maxlength' => 64)));
 }
开发者ID:uiDeveloper116,项目名称:webstore,代码行数:7,代码来源:upsAdminForm.php

示例8: run

 /**
  * The run() function is called from Web Store to actually do the calculation. It returns an array of the service
  * levels and prices available to the customer (as keys and values in the array, respectively).
  * @return array
  */
 public function run()
 {
     if (!isset($this->config['offerservices'])) {
         return false;
     }
     $weight = $this->objCart->Weight;
     if (_xls_get_conf('WEIGHT_UNIT', 'lb') != 'lb') {
         // one KG is 2.2 pounds
         $weight = $weight * 2.2;
     }
     //USPS wants a full country name
     $objCountry = Country::Load($this->CheckoutForm->shippingCountry);
     if ($objCountry instanceof Country) {
         $country = $objCountry->country;
     } else {
         $country = "US";
     }
     if (empty($this->config['username']) || empty($this->config['originpostcode'])) {
         return false;
     }
     $this->init_vars($this->config['username'], $this->config['originpostcode'], $this->CheckoutForm->shippingPostal, $country, $this->config['markup']);
     $this->addItem(intval($weight), round(($weight - intval($weight)) * 16, 0), $this->objCart->total);
     $rates = $this->getRate();
     if ($rates === FALSE || count($rates) == 0) {
         Yii::log("USPS: Could not get rates. " . print_r($this, true), 'error', 'application.' . __CLASS__ . "." . __FUNCTION__);
         return false;
     }
     return $this->convertRetToDisplay($rates);
 }
开发者ID:uiDeveloper116,项目名称:webstore,代码行数:34,代码来源:usps.php

示例9: run

 /**
  * Run the payment process
  * @return mixed
  */
 public function run()
 {
     $auth_net_login_id = $this->config['login'];
     $auth_net_tran_key = $this->config['trans_key'];
     /**
      * This option, and the commented $ret['live']->AddItem('dev' , 'dev') above, are only for API development work.
      * Regular Authorize.net customers will only use "live" and "test" modes through their account, which can be
      * chosen through the Web Admin panel.
      *
      */
     if ($this->config['live'] == 'test') {
         $auth_net_url = "https://test.authorize.net/gateway/transact.dll";
     } else {
         $auth_net_url = "https://secure.authorize.net/gateway/transact.dll";
     }
     $str = "";
     $str .= sprintf('<FORM action="%s" method="POST">', $auth_net_url);
     $str .= $this->InsertFP($auth_net_login_id, $auth_net_tran_key, round($this->objCart->Total, 2), $this->objCart->currency);
     $str .= _xls_make_hidden('x_invoice_num', $this->objCart->id_str);
     $str .= _xls_make_hidden('x_first_name', $this->CheckoutForm->contactFirstName);
     $str .= _xls_make_hidden('x_last_name', $this->CheckoutForm->contactLastName);
     $str .= _xls_make_hidden('x_company', $this->CheckoutForm->contactCompany);
     $str .= _xls_make_hidden('x_address', $this->CheckoutForm->billingAddress1 . " " . $this->CheckoutForm->billingAddress2);
     $str .= _xls_make_hidden('x_city', $this->CheckoutForm->billingCity);
     $str .= _xls_make_hidden('x_state', $this->CheckoutForm->billingStateCode);
     $str .= _xls_make_hidden('x_zip', $this->CheckoutForm->billingPostal);
     $str .= _xls_make_hidden('x_country', $this->CheckoutForm->billingCountryCode);
     $str .= _xls_make_hidden('x_phone', _xls_number_only($this->CheckoutForm->contactPhone));
     $str .= _xls_make_hidden('x_email', $this->CheckoutForm->contactEmail);
     $str .= _xls_make_hidden('x_cust_id', "WC-" . $this->objCart->customer_id);
     $str .= _xls_make_hidden('x_ship_to_first_name', $this->CheckoutForm->shippingFirstName);
     $str .= _xls_make_hidden('x_ship_to_last_name', $this->CheckoutForm->shippingLastName);
     $str .= _xls_make_hidden('x_ship_to_company', $this->CheckoutForm->shippingCompany);
     $str .= _xls_make_hidden('x_ship_to_address', $this->CheckoutForm->shippingAddress1 . " " . $this->CheckoutForm->shippingAddress2);
     $str .= _xls_make_hidden('x_ship_to_city', $this->CheckoutForm->shippingCity);
     $str .= _xls_make_hidden('x_ship_to_state', $this->CheckoutForm->shippingStateCode);
     $str .= _xls_make_hidden('x_ship_to_zip', $this->CheckoutForm->shippingPostal);
     $str .= _xls_make_hidden('x_ship_to_country', $this->CheckoutForm->shippingCountryCode);
     $str .= _xls_make_hidden('x_description', _xls_get_conf('STORE_NAME', "Online") . " Order");
     $str .= _xls_make_hidden('x_login', $auth_net_login_id);
     $str .= _xls_make_hidden('x_solution_id', 'A1000010');
     $str .= _xls_make_hidden('x_type', 'AUTH_CAPTURE');
     $str .= _xls_make_hidden('x_currency_code', $this->objCart->currency);
     //trying to get currency code to submit
     $str .= _xls_make_hidden('x_amount', round($this->objCart->Total, 2));
     $str .= _xls_make_hidden('x_show_form', 'PAYMENT_FORM');
     $str .= _xls_make_hidden('x_relay_response', 'TRUE');
     $str .= _xls_make_hidden('x_relay_url', Yii::app()->controller->createAbsoluteUrl('cart/payment', array(), 'http') . '/' . $this->modulename);
     $str .= _xls_make_hidden('x_cancel_url', Yii::app()->controller->createAbsoluteUrl('cart/restore', array('getuid' => $this->objCart->linkid), 'http'));
     if (Yii::app()->params['LIGHTSPEED_MT'] > 0) {
         $str .= _xls_make_hidden('x_header_html_payment_form', str_replace("\"", "'", CHtml::image("https:" . Yii::app()->params['HEADER_IMAGE'], Yii::app()->params['STORE_NAME'], array('style' => 'max-width:580px'))));
     } else {
         $str .= _xls_make_hidden('x_header_html_payment_form', str_replace("\"", "'", CHtml::image(Yii::app()->controller->createAbsoluteUrl(Yii::app()->params['HEADER_IMAGE'], array(), 'https'), Yii::app()->params['STORE_NAME'], array('style' => 'max-width:580px'))));
     }
     $str .= '</FORM>';
     Yii::log(sprintf("%s sending %s in %s mode\nRequest %s", __CLASS__, $this->objCart->id_str, $this->objCart->id_str, $str), $this->logLevel, 'application.' . __CLASS__ . '.' . __FUNCTION__);
     $arrReturn['api'] = $this->apiVersion;
     $arrReturn['jump_form'] = $str;
     return $arrReturn;
 }
开发者ID:uiDeveloper116,项目名称:webstore,代码行数:64,代码来源:authorizedotnetsim.php

示例10: CreateEvent

 public static function CreateEvent($strModule, $strController, $strAction, $data_id = null, $product_id = null)
 {
     if ($strController == "amazon") {
         $MerchantID = _xls_get_conf('AMAZON_MERCHANT_ID');
         $MarketplaceID = _xls_get_conf('AMAZON_MARKETPLACE_ID');
         $MWS_ACCESS_KEY_ID = _xls_get_conf('AMAZON_MWS_ACCESS_KEY_ID');
         $MWS_SECRET_ACCESS_KEY = _xls_get_conf('AMAZON_MWS_SECRET_ACCESS_KEY');
         if (empty($MerchantID) || empty($MarketplaceID) || empty($MWS_ACCESS_KEY_ID) || empty($MWS_SECRET_ACCESS_KEY)) {
             return false;
         }
     }
     //Check to make sure it's not duplicate
     $objTask = TaskQueue::model()->findByAttributes(array('module' => $strModule, 'controller' => $strController, 'action' => $strAction, 'data_id' => $data_id, 'product_id' => $product_id));
     if ($objTask instanceof TaskQueue) {
         return;
     }
     $objTask = new TaskQueue();
     $objTask->module = $strModule;
     $objTask->controller = $strController;
     $objTask->action = $strAction;
     $objTask->data_id = $data_id;
     $objTask->product_id = $product_id;
     if (!$objTask->save()) {
         Yii::log("Error creating Task {$strModule}, {$strController}, {$strAction} " . print_r($objTask->getErrors(), true), 'error', 'application.' . __CLASS__ . "." . __FUNCTION__);
     }
 }
开发者ID:uiDeveloper116,项目名称:webstore,代码行数:26,代码来源:TaskQueue.php

示例11: beforeAction

 /**
  * We want to ensure Wish lists are enabled before a user can view,
  * search and-or create lists. So, we display an exception to prevent
  *  running any of these processes.
  *
  * @param CAction $action
  * @return bool
  * @throws CHttpException
  */
 public function beforeAction($action)
 {
     if (_xls_get_conf('ENABLE_WISH_LIST', 0) == 0) {
         _xls_404('Wish lists are not enabled on this store.');
         return false;
     }
     return parent::beforeAction($action);
 }
开发者ID:uiDeveloper116,项目名称:webstore,代码行数:17,代码来源:WishlistController.php

示例12: init

 public function init()
 {
     parent::init();
     // US spelling for US stores
     if (_xls_get_conf('DEFAULT_COUNTRY') == '224') {
         $this->defaultName = "Check";
     }
 }
开发者ID:uiDeveloper116,项目名称:webstore,代码行数:8,代码来源:cheque.php

示例13: garbageCollect

 public static function garbageCollect()
 {
     $intLogRotateDays = _xls_get_conf('LOG_ROTATE_DAYS', 0);
     if ($intLogRotateDays > 0) {
         $lastDate = date('YmdHis', strtotime("-" . $intLogRotateDays . " days"));
         $sql = "DELETE from xlsws_log where DATE_FORMAT(`created`, '%Y%m%d%H%i%s')<'" . $lastDate . "'";
         Yii::app()->db->createCommand($sql)->execute();
     }
 }
开发者ID:uiDeveloper116,项目名称:webstore,代码行数:9,代码来源:Log.php

示例14: LoadByCode

 /**
  * @param $strCode
  * @param null $intCountryId
  * @return CActiveRecord
  */
 public static function LoadByCode($strCode, $intCountryId = null)
 {
     if (is_null($intCountryId)) {
         $intCountryId = _xls_get_conf('DEFAULT_COUNTRY', 224);
     }
     if (!is_numeric($intCountryId)) {
         $intCountryId = Country::IdByCode($intCountryId);
     }
     return State::model()->find('code=:code_id AND country_id=:c_id', array(':code_id' => $strCode, ':c_id' => $intCountryId));
 }
开发者ID:uiDeveloper116,项目名称:webstore,代码行数:15,代码来源:State.php

示例15: GetPrice

 public function GetPrice($objTaxCode, $intTaxStatus, $taxExclusive = false)
 {
     if ($taxExclusive) {
         return $this->price;
     } elseif (_xls_get_conf('TAX_INCLUSIVE_PRICING', '') == '1') {
         $arrPrice = Tax::calculatePricesWithTax($this->price, $objTaxCode->id, $intTaxStatus);
         return $arrPrice['fltSellTotalWithTax'];
     } else {
         return $this->price;
     }
 }
开发者ID:uiDeveloper116,项目名称:webstore,代码行数:11,代码来源:ProductQtyPricing.php


注:本文中的_xls_get_conf函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。