本文整理汇总了PHP中Checkout::initAdditionalPrerequisitesValidationResults方法的典型用法代码示例。如果您正苦于以下问题:PHP Checkout::initAdditionalPrerequisitesValidationResults方法的具体用法?PHP Checkout::initAdditionalPrerequisitesValidationResults怎么用?PHP Checkout::initAdditionalPrerequisitesValidationResults使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Checkout
的用法示例。
在下文中一共展示了Checkout::initAdditionalPrerequisitesValidationResults方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: loadState
/**
* Restores the module state.
* IMPORTANT: LoadState - ,
* SaveState - .
*/
function loadState()
{
global $application;
if (modApiFunc('Session', 'is_Set', 'currentStepID')) {
$this->setCurrentStepID(modApiFunc('Session', 'get', 'currentStepID'));
} else {
//. Is it at all correct to SET currentStepID, if its value is not even defined?
$this->currentStepID = 1;
}
if (modApiFunc('Session', 'is_Set', 'currentOrderID')) {
$this->currentOrderID = modApiFunc('Session', 'get', 'currentOrderID');
}
if (modApiFunc('Session', 'is_Set', 'currentOrderCurrencyID')) {
$this->currentOrderCurrencyID = modApiFunc('Session', 'get', 'currentOrderCurrencyID');
} else {
$this->currentOrderCurrencyID = NULL;
}
if (modApiFunc('Session', 'is_Set', 'lastPlacedOrderID')) {
$this->lastPlacedOrderID = modApiFunc('Session', 'get', 'lastPlacedOrderID');
}
if (modApiFunc('Session', 'is_Set', 'currentCustomerID')) {
$this->currentCustomerID = modApiFunc('Session', 'get', 'currentCustomerID');
}
if (modApiFunc('Session', 'is_Set', 'PrerequisitesValidationResults')) {
$this->setPrerequisitesValidationResults(modApiFunc('Session', 'get', 'PrerequisitesValidationResults'));
/*
// saved for testing or emergency purposes
if (is_array($this->PrerequisitesValidationResults))
foreach($this->PrerequisitesValidationResults as $k => $v)
if (isset($v['validatedData']) && is_array($v['validatedData']))
foreach($v['validatedData'] as $kk => $vv)
{
$new_data = execQuery('SELECT_VALIDATED_DATA_VISIBLE_LABELS', array('vid' => @$v['id'], 'aid' => @$vv['id']));
if ($new_data)
{
if (isset($vv['attribute_visible_name']))
$this->PrerequisitesValidationResults[$k]['validatedData'][$kk]['attribute_visible_name'] = $new_data[0]['attribute_visible_name'];
if (isset($vv['attribute_description']))
$this->PrerequisitesValidationResults[$k]['validatedData'][$kk]['attribute_description'] = $new_data[0]['attribute_description'];
}
}
*/
if (is_array($this->PrerequisitesValidationResults)) {
$labels = $this->getValidatedDataVisibleLabels();
foreach ($this->PrerequisitesValidationResults as $k => $v) {
if (isset($v['validatedData']) && is_array($v['validatedData'])) {
foreach ($v['validatedData'] as $kk => $vv) {
if (@$labels[$v['id']][$vv['id']]) {
if (isset($vv['attribute_visible_name'])) {
$this->PrerequisitesValidationResults[$k]['validatedData'][$kk]['attribute_visible_name'] = @$labels[$v['id']][$vv['id']]['attribute_visible_name'];
}
if (isset($vv['attribute_description'])) {
$this->PrerequisitesValidationResults[$k]['validatedData'][$kk]['attribute_description'] = @$labels[$v['id']][$vv['id']]['attribute_description'];
}
}
}
}
}
}
} else {
// if(!modApiFunc('Session', 'is_Set', 'PrerequisitesValidationResults'))
// {
//: ERROR arises if not installed
Checkout::initPrerequisitesValidationResults();
// ,
// $this->initStoreOwnerInfo();
// LoadState
// }
// $err_params = array(
// "CODE" => "CHECKOUT_011"
// );
// _fatal($err_params);
//$this->initPrerequisitesValidationResults();
}
Checkout::initAdditionalPrerequisitesValidationResults("creditCardInfo", false);
Checkout::initAdditionalPrerequisitesValidationResults("bankAccountInfo", false);
if (modApiFunc('Session', 'is_Set', 'CheckoutOrderSearch')) {
$this->order_search_filter = modApiFunc('Session', 'get', 'CheckoutOrderSearch');
} else {
$this->order_search_filter = array('filter_status_id' => '1', 'status_id' => null, 'payment_status_id' => null, 'from_day' => null, 'from_month' => null, 'from_year' => null, 'to_day' => null, 'to_month' => null, 'to_year' => null, 'order_id' => null, 'search_by' => 'status');
modApiFunc('Session', 'set', 'CheckoutOrderSearch', $this->order_search_filter);
}
if (modApiFunc('Session', 'is_Set', 'CheckoutCustomerSearch')) {
$this->customer_search_filter = modApiFunc('Session', 'get', 'CheckoutCustomerSearch');
} else {
$this->customer_search_filter = array('search_by' => 'letter', 'letter' => null, 'field_name' => null, 'field_value' => null);
modApiFunc('Session', 'set', 'CheckoutCustomerSearch', $this->customer_search_filter);
}
if (modApiFunc('Session', 'is_Set', 'CurrentPaymentModuleSettingsViewName')) {
$this->setCurrentPaymentModuleSettingsViewName(modApiFunc('Session', 'get', 'CurrentPaymentModuleSettingsViewName'));
} else {
$this->CurrentPaymentModuleSettingsViewName = NULL;
}
if (modApiFunc('Session', 'is_Set', 'CurrentPaymentShippingModuleSettingsUID')) {
$this->setCurrentPaymentShippingModuleSettingsUID(modApiFunc('Session', 'get', 'CurrentPaymentShippingModuleSettingsUID'));
//.........这里部分代码省略.........