本文整理汇总了PHP中Cart66Common::showErrors方法的典型用法代码示例。如果您正苦于以下问题:PHP Cart66Common::showErrors方法的具体用法?PHP Cart66Common::showErrors怎么用?PHP Cart66Common::showErrors使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cart66Common
的用法示例。
在下文中一共展示了Cart66Common::showErrors方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: basename
}
}
?>
<?php
if ($order->hasAccount() == -1) {
?>
<?php
if (!Cart66Common::isLoggedIn()) {
?>
<h2>Please Create Your Account</h2>
<?php
if (isset($data['errors'])) {
Cart66Common::log('[' . basename(__FILE__) . ' - line ' . __LINE__ . "] Account creation errors: " . print_r($data, true));
echo Cart66Common::showErrors($data['errors'], 'Your account could not be created.');
echo Cart66Common::getJqErrorScript($data['jqErrors']);
}
?>
<?php
$account = $data['account'];
if (!is_object($account)) {
$account = new Cart66Account();
}
?>
<form action="" method='post' id="account_form" class="phorm2">
<input type="hidden" name="ouid" value="<?php
echo $order->ouid;
?>
">
示例2:
<h2>PayPal Subscriptions</h2>
<div style="margin-right: 50px; margin-left: 5px;">
<?php
if (isset($data['errors'])) {
echo Cart66Common::showErrors($data['errors'], 'Subscription could not be saved for the following reasons:');
}
?>
</div>
<div id="widgets-left" style="margin-right: 50px;">
<div id="available-widgets">
<div class="widgets-holder-wrap">
<div class="sidebar-name">
<div class="sidebar-name-arrow"><br/></div>
<h3><?php
_e('PayPal Subscription Information', 'cart66');
?>
<span><img class="ajax-feedback" alt="" title="" src="images/wpspin_light.gif"/></span></h3>
</div>
<div class="widget-holder">
<?php
if (CART66_PRO) {
?>
<form method="post" action="admin.php?page=cart66-paypal-subscriptions">
<input type="hidden" name="cart66-action" value="save paypal subscription" id="cart66-action" />
<input type="hidden" name="subscription[is_paypal_subscription]" value="1" id="subscription_is_paypal_subscription" />
<input type="hidden" name="subscription[id]" value="<?php
echo $data['subscription']->id;
示例3: isset
$_POST['product']['price'] = isset($_POST['product']['price']) ? Cart66Common::convert_currency_to_number($_POST['product']['price']) : '';
try {
$product->handleFileUpload();
$product->setData(Cart66Common::postVal('product'));
$product->save();
$product->clear();
} catch (Cart66Exception $e) {
$errorCode = $e->getCode();
if ($errorCode == 66102) {
// Product save failed
$errors = $product->getErrors();
$errorMessage = Cart66Common::showErrors($errors, "<p><b>" . __("The product could not be saved for the following reasons", "cart66") . ":</b></p>");
} elseif ($errorCode == 66101) {
// File upload failed
$errors = $product->getErrors();
$errorMessage = Cart66Common::showErrors($errors, "<p><b>" . __("The file upload failed", "cart66") . ":</b></p>");
}
Cart66Common::log('[' . basename(__FILE__) . ' - line ' . __LINE__ . "] Product save failed ({$errorCode}): " . strip_tags($errorMessage));
}
} elseif (isset($_GET['task']) && $_GET['task'] == 'edit' && isset($_GET['id']) && $_GET['id'] > 0) {
$id = Cart66Common::getVal('id');
$product->load($id);
} elseif (isset($_GET['task']) && $_GET['task'] == 'delete' && isset($_GET['id']) && $_GET['id'] > 0) {
$id = Cart66Common::getVal('id');
$product->load($id);
$product->deleteMe();
$product->clear();
} elseif (isset($_GET['task']) && $_GET['task'] == 'xdownload' && isset($_GET['id']) && $_GET['id'] > 0) {
// Load the product
$id = Cart66Common::getVal('id');
$product->load($id);
示例4:
<?php
if (isset($data['errors']) && count($data['errors'])) {
echo Cart66Common::showErrors($data['errors'], "<p><b>We're sorry. Your account was not updated for the following reasons:</b></p>");
}
if (isset($data['message'])) {
echo '<div class="Cart66Success">' . $data['message'] . '</div>';
}
?>
<form id="Cart66AccountLogin" class="phorm2" action="" method="post">
<input type="hidden" name="cart66-task" value="account-update" />
<ul class='shortLabels'>
<li><h3><?php
_e('Update Your Account Information', 'cart66');
?>
</h3></li>
<li>
<label class="short" for="login-first_name"><?php
_e('First name', 'cart66');
?>
:</label>
<input type="text" id="login-first_name" name="login[first_name]" value="<?php
echo $data['account']->firstName;
?>
" />
</li>
<li>
<label class="short" for="login-last_name"><?php
_e('Last name', 'cart66');
?>
示例5:
</li>
<?php
}
?>
</ul>
</div><!-- #shippingInfo -->
<?php
} else {
?>
<?php
}
?>
</div>
<?php
if (isset($errors) && count($errors) > 0) {
echo Cart66Common::showErrors($errors, 'Unable to create account');
echo Cart66Common::getJqErrorScript($account->getJqErrors());
}
?>
<form class="phorm2" action="" method='post' style="<?php
if (isset($data['completestyle'])) {
echo $data['completestyle'];
}
?>
">
<input type="hidden" name="task" value="doexpresscheckout">
<input type="hidden" name="token" value="<?php
echo $token;
?>
">
示例6: _e
<div id="available-widgets">
<div class="widgets-holder-wrap">
<div class="sidebar-name">
<div class="sidebar-name-arrow"><br/></div>
<h3><?php
_e('Account', 'cart66');
?>
<span><img class="ajax-feedback" alt="" title="" src="images/wpspin_light.gif"/></span></h3>
</div>
<div class="widget-holder" style="overflow: hidden; display: block;">
<?php
if (isset($data['errors']) && is_array($data['errors']) && count($data['errors']) > 0) {
echo '<div style="padding: 10px;">';
echo Cart66Common::showErrors($data['errors'], 'Unable to update account:');
echo '</div>';
}
?>
<ul style="float: left;">
<li>
<label class="med" for="account-first_name"><?php
_e('First name', 'cart66');
?>
:</label>
<input type="text" name="account[first_name]" value="<?php
echo $data['account']->firstName;
?>
" id="account-first_name" />
</li>
示例7: isset
$errorMessage = false;
if ($_SERVER['REQUEST_METHOD'] == "POST" && $_POST['cart66-action'] == 'save promotion') {
$_POST['promo']['amount'] = isset($_POST['promo']['amount']) ? Cart66Common::convert_currency_to_number($_POST['promo']['amount']) : '';
$_POST['promo']['min_order'] = isset($_POST['promo']['min_order']) ? Cart66Common::convert_currency_to_number($_POST['promo']['min_order']) : '';
$_POST['promo']['max_order'] = isset($_POST['promo']['max_order']) ? Cart66Common::convert_currency_to_number($_POST['promo']['max_order']) : '';
try {
$promo->load($_POST['promo']['id']);
$promo->setData($_POST['promo']);
$promo->save();
$promo->clear();
} catch (Cart66Exception $e) {
$errorCode = $e->getCode();
if ($errorCode == 66301) {
// Promotion save failed
$errors = $promo->getErrors();
$errorMessage = Cart66Common::showErrors($errors, "<p><b>" . __("The promotion could not be saved for the following reasons", "cart66") . ":</b></p>");
}
Cart66Common::log('[' . basename(__FILE__) . ' - line ' . __LINE__ . "] Promotion save failed ({$errorCode}): " . strip_tags($errorMessage));
}
} elseif (isset($_GET['task']) && $_GET['task'] == 'edit' && isset($_GET['id']) && $_GET['id'] > 0) {
$id = Cart66Common::getVal('id');
$promo->load($id);
} elseif (isset($_GET['task']) && $_GET['task'] == 'delete' && isset($_GET['id']) && $_GET['id'] > 0) {
$id = Cart66Common::getVal('id');
$promo->load($id);
$promo->deleteMe();
$promo->clear();
}
?>