本文整理汇总了PHP中wpsc_have_checkout_items函数的典型用法代码示例。如果您正苦于以下问题:PHP wpsc_have_checkout_items函数的具体用法?PHP wpsc_have_checkout_items怎么用?PHP wpsc_have_checkout_items使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wpsc_have_checkout_items函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: foreach
<?php
echo TXT_WPSC_ASTERISK;
?>
<?php
if (count($_SESSION['wpsc_checkout_misc_error_messages']) > 0) {
echo "<div class='login_error'>\n\r";
foreach ((array) $_SESSION['wpsc_checkout_misc_error_messages'] as $user_error) {
echo $user_error . "<br />\n";
}
echo "</div>\n\r";
}
$_SESSION['wpsc_checkout_misc_error_messages'] = array();
?>
<table class='wpsc_checkout_table'>
<?php
while (wpsc_have_checkout_items()) {
wpsc_the_checkout_item();
?>
<?php
if (wpsc_is_shipping_details()) {
?>
<tr>
<td colspan ='2'>
<br />
<input type='checkbox' value='true' name='shippingSameBilling' id='shippingSameBilling' />
<label for='shippingSameBilling'>Shipping Address same as Billing Address?</label>
</td>
</tr>
<?php
}
开发者ID:papayalabs,项目名称:htdocs,代码行数:31,代码来源:shopping_cart_page.php
示例2: _wpsc_create_checkout_item_required_map
/**
* Create an array of item name and active status
* @access public
*
* @since 3.8.14
* @return (boolean)
*/
function _wpsc_create_checkout_item_required_map()
{
global $wpsc_checkout;
if (empty($wpsc_checkout)) {
$wpsc_checkout = new wpsc_checkout();
}
$checkout_item_map = array();
while (wpsc_have_checkout_items()) {
$checkout_item = wpsc_the_checkout_item();
if (!empty($checkout_item->unique_name)) {
$checkout_item_map[$wpsc_checkout->form_item_unique_name()] = $wpsc_checkout->form_name_is_required();
}
}
$wpsc_checkout->rewind_checkout_items();
return $checkout_item_map;
}
开发者ID:osuarcher,项目名称:WP-e-Commerce,代码行数:23,代码来源:checkout-localization.php
示例3: __
<h2><?php echo __('Please enter your contact details:', 'wpsc'); ?></h2>
<?php/* echo __('Note, Once you press submit, you will need to have your Credit card handy.', 'wpsc'); <br /> */?>
<?php echo __('Fields marked with an asterisk must be filled in.', 'wpsc'); ?>
<?php
if(count($_SESSION['wpsc_checkout_misc_error_messages']) > 0) {
echo "<div class='login_error'>\n\r";
foreach((array)$_SESSION['wpsc_checkout_misc_error_messages'] as $user_error ) {
echo $user_error."<br />\n";
}
echo "</div>\n\r";
}
$_SESSION['wpsc_checkout_misc_error_messages'] =array();
?>
<table class='wpsc_checkout_table'>
<?php while (wpsc_have_checkout_items()) : wpsc_the_checkout_item(); ?>
<?php if(wpsc_is_shipping_details()) : ?>
<tr>
<td colspan ='2'>
<br />
<input type='checkbox' value='true' name='shippingSameBilling' id='shippingSameBilling' />
<label for='shippingSameBilling'>Shipping Address same as Billing Address?</label>
</td>
</tr>
<?php endif; ?>
<?php if(wpsc_checkout_form_is_header() == true) : ?>
<tr <?php echo wpsc_the_checkout_item_error_class();?>>
<td <?php if(wpsc_is_shipping_details()) echo "class='wpsc_shipping_forms'"; ?> colspan='2'>
<h4>
开发者ID:nerdfiles,项目名称:sideshowtramps.com,代码行数:30,代码来源:shopping_cart_page.php
示例4: _wpsc_get_country_and_region_replacements
/**
* Get replacement elements for country and region fields on the checkout form
*
* @since 3.8.14
* @access private
* @param array $replacements
* @return array $replacements array
*/
function _wpsc_get_country_and_region_replacements($replacements = null, $replacebilling = true, $replaceshipping = true)
{
global $wpsc_checkout;
if (empty($wpsc_checkout)) {
$wpsc_checkout = new wpsc_checkout();
}
if (empty($replacements)) {
$replacements = array();
}
while (wpsc_have_checkout_items()) {
$checkoutitem = wpsc_the_checkout_item();
if ($replaceshipping && 'shippingcountry' == $checkoutitem->unique_name) {
$element_id = 'region_country_form_' . wpsc_checkout_form_item_id();
$replacement = array('elementid' => $element_id, 'element' => wpsc_checkout_form_field());
$replacements['shippingcountry'] = $replacement;
}
if ($replaceshipping && 'shippingstate' == $checkoutitem->unique_name) {
$element_id = wpsc_checkout_form_element_id();
$replacement = array('elementid' => $element_id, 'element' => wpsc_checkout_form_field());
$replacements['shippingstate'] = $replacement;
}
if ($replacebilling && 'billingcountry' == $checkoutitem->unique_name) {
$element_id = 'region_country_form_' . wpsc_checkout_form_item_id();
$replacement = array('elementid' => $element_id, 'element' => wpsc_checkout_form_field());
$replacements['billingcountry'] = $replacement;
}
if ($replacebilling && 'billingstate' == $checkoutitem->unique_name) {
$element_id = wpsc_checkout_form_item_id();
$replacement = array('elementid' => $element_id, 'element' => wpsc_checkout_form_field());
$replacements['billingstate'] = $replacement;
}
}
return $replacements;
}
开发者ID:dreamteam111,项目名称:dreamteam,代码行数:42,代码来源:wpsc-checkout-ajax.php
示例5: wpsc_display_form_fields
/**
* wpsc_display_form_fields()
*
* This function displays each of the form fields.
*
*/
function wpsc_display_form_fields()
{
do_action('wpsc_start_display_user_log_form_fields');
$wpsc_checkout = wpsc_core_get_checkout();
$i = 0;
while (wpsc_have_checkout_items()) {
wpsc_the_checkout_item();
if (wpsc_checkout_form_is_header()) {
$i++;
// display headers for form fields
?>
<?php
if ($i > 1) {
?>
</table>
<table>
<?php
}
?>
<tr class="checkout-heading-row <?php
echo esc_attr(wpsc_the_checkout_item_error_class(false));
?>
">
<td <?php
wpsc_the_checkout_details_class();
?>
colspan='2'>
<h4><?php
echo esc_html(wpsc_checkout_form_name());
?>
</h4>
</td>
</tr>
<?php
if (wpsc_is_shipping_details()) {
?>
<tr class='same_as_shipping_row'>
<td colspan='2'>
<?php
$checked = '';
$shipping_same_as_billing = wpsc_get_customer_meta('shippingSameBilling');
if ($shipping_same_as_billing) {
$checked = 'checked="checked"';
}
?>
<label for='shippingSameBilling'>
<input type='checkbox'
value='true'
data-wpsc-meta-key="shippingSameBilling"
class="wpsc-visitor-meta"
name='shippingSameBilling'
id='shippingSameBilling' <?php
echo $checked;
?>
/>
<?php
_e('Same as billing address:', 'wp-e-commerce');
?>
</label>
<br>
<span id="shippingsameasbillingmessage"><?php
_e('Your orders will be shipped to the billing address', 'wp-e-commerce');
?>
</span>
</td>
</tr>
<?php
}
// Not a header so start display form fields
} elseif ($wpsc_checkout->checkout_item->unique_name == 'billingemail') {
?>
<?php
$email_markup = "<div class='wpsc_email_address'>\n <p class='" . wpsc_checkout_form_element_id() . "'>\n <label class='wpsc_email_address' for='" . wpsc_checkout_form_element_id() . "'>\n " . __('Enter your email address', 'wp-e-commerce') . "\n </label>\n <p class='wpsc_email_address_p'>\n <img src='https://secure.gravatar.com/avatar/empty?s=60&d=mm' id='wpsc_checkout_gravatar' />\n " . wpsc_checkout_form_field();
if (wpsc_the_checkout_item_error() != '') {
$email_markup .= "<p class='validation-error'>" . wpsc_the_checkout_item_error() . "</p>";
}
$email_markup .= "</div>";
} else {
?>
<tr>
<td class='<?php
echo wpsc_checkout_form_element_id();
?>
'>
<label
for='<?php
echo esc_attr(wpsc_checkout_form_element_id());
?>
'>
<?php
echo wpsc_checkout_form_name();
?>
//.........这里部分代码省略.........
开发者ID:ashik968,项目名称:digiplot,代码行数:101,代码来源:wpsc-user_log_functions.php
示例6: wpsc_display_form_fields
/**
* wpsc_display_form_fields()
*
* This function displays each of the form fields.
*
*/
function wpsc_display_form_fields()
{
do_action('wpsc_start_display_user_log_form_fields');
$wpsc_checkout = wpsc_core_get_checkout();
$i = 0;
while (wpsc_have_checkout_items()) {
wpsc_the_checkout_item();
if (wpsc_checkout_form_is_header()) {
$i++;
// display headers for form fields
?>
<?php
if ($i > 1) {
?>
</table>
<table>
<?php
}
?>
<tr class="checkout-heading-row <?php
echo esc_attr(wpsc_the_checkout_item_error_class(false));
?>
">
<td <?php
wpsc_the_checkout_details_class();
?>
colspan='2'>
<h4><?php
echo esc_html(wpsc_checkout_form_name());
?>
</h4>
</td>
</tr>
<?php
if (wpsc_is_shipping_details()) {
?>
<tr class='same_as_shipping_row'>
<td colspan='2'>
<?php
$checked = '';
$shipping_same_as_billing = wpsc_get_customer_meta('shippingSameBilling');
if ($shipping_same_as_billing) {
$checked = 'checked="checked"';
}
?>
<label for='shippingSameBilling'>
<input type='checkbox'
value='true'
data-wpsc-meta-key="shippingSameBilling"
class="wpsc-visitor-meta"
name='shippingSameBilling'
id='shippingSameBilling' <?php
echo $checked;
?>
/>
<?php
_e('Same as billing address:', 'wp-e-commerce');
?>
</label>
<br>
<span id="shippingsameasbillingmessage"><?php
_e('Your orders will be shipped to the billing address', 'wp-e-commerce');
?>
</span>
</td>
</tr>
<?php
}
// Not a header so start display form fields
} else {
?>
<tr>
<td class='<?php
echo wpsc_checkout_form_element_id();
?>
'>
<label
for='<?php
echo esc_attr(wpsc_checkout_form_element_id());
?>
'>
<?php
echo wpsc_checkout_form_name();
?>
</label>
</td>
<td>
<?php
echo wpsc_checkout_form_field();
?>
<?php
if (wpsc_the_checkout_item_error() != '') {
//.........这里部分代码省略.........
开发者ID:benhuson,项目名称:WP-e-Commerce,代码行数:101,代码来源:wpsc-user_log_functions.php
注:本文中的wpsc_have_checkout_items函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论