本文整理汇总了PHP中wpsc_have_shipping_quotes函数的典型用法代码示例。如果您正苦于以下问题:PHP wpsc_have_shipping_quotes函数的具体用法?PHP wpsc_have_shipping_quotes怎么用?PHP wpsc_have_shipping_quotes使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wpsc_have_shipping_quotes函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: while
<?php
while (wpsc_have_shipping_methods()) {
wpsc_the_shipping_method();
?>
<?php
// Don't display shipping method if it doesn't have at least one quote
if (!wpsc_have_shipping_quotes()) {
continue;
}
?>
<tr><td class='shipping_header' colspan='5'><?php
echo wpsc_shipping_method_name() . TXT_WPSC_CHOOSE_A_SHIPPING_RATE;
?>
</td></tr>
<?php
while (wpsc_have_shipping_quotes()) {
wpsc_the_shipping_quote();
?>
<tr>
<td colspan='3'>
<label for='<?php
echo wpsc_shipping_quote_html_id();
?>
'><?php
echo wpsc_shipping_quote_name();
?>
</label>
</td>
<td style='text-align:center;'>
<label for='<?php
echo wpsc_shipping_quote_html_id();
开发者ID:papayalabs,项目名称:htdocs,代码行数:31,代码来源:shopping_cart_page.php
示例2: wpsc_shipping_country_list
<form name='change_country' id='change_country' action='' method='post'>
<?php echo wpsc_shipping_country_list();?>
<input type='hidden' name='wpsc_update_location' value='true' />
<input type='submit' name='wpsc_submit_zipcode' value='Calculate' />
</form>
</td>
</tr>
<?php while (wpsc_have_shipping_methods()) : wpsc_the_shipping_method(); ?>
<?php
// Don't display shipping method if it doesn't have at least one quote
if (!wpsc_have_shipping_quotes()) continue;
?>
<tr><td class='shipping_header' colspan='5'><?php echo wpsc_shipping_method_name().__('- Choose a Shipping Rate', 'wpsc'); ?> </td></tr>
<?php while (wpsc_have_shipping_quotes()) : wpsc_the_shipping_quote(); ?>
<tr class='shipping_quotes'>
<td colspan='3'>
<label for='<?php echo wpsc_shipping_quote_html_id(); ?>'><?php echo wpsc_shipping_quote_name(); ?></label>
</td>
<td style='text-align:center;'>
<label for='<?php echo wpsc_shipping_quote_html_id(); ?>'><?php echo wpsc_shipping_quote_value(); ?></label>
</td>
<td style='text-align:center;'>
<?php if(wpsc_have_morethanone_shipping_methods_and_quotes()): ?>
<input type='radio' id='<?php echo wpsc_shipping_quote_html_id(); ?>' <?php echo wpsc_shipping_quote_selected_state(); ?> onclick='switchmethod("<?php echo wpsc_shipping_quote_name(); ?>", "<?php echo wpsc_shipping_method_internal_name(); ?>")' value='<?php echo wpsc_shipping_quote_value(true); ?>' name='shipping_method' />
<?php else: ?>
<input <?php echo wpsc_shipping_quote_selected_state(); ?> disabled='disabled' type='radio' id='<?php echo wpsc_shipping_quote_html_id(); ?>' value='<?php echo wpsc_shipping_quote_value(true); ?>' name='shipping_method' />
<?php wpsc_update_shipping_single_method(); ?>
<?php endif; ?>
</td>
开发者ID:nerdfiles,项目名称:sideshowtramps.com,代码行数:31,代码来源:shopping_cart_page.php
示例3: wpsc_update_shipping_price
/**
* update_shipping_price function, used through ajax and in normal page loading.
* No parameters, returns nothing
*/
function wpsc_update_shipping_price()
{
global $wpdb, $wpsc_cart;
$quote_shipping_method = $_POST['key1'];
$quote_shipping_option = $_POST['key'];
//If no $_POST key variable means it is activated through shipping same as billing
if ($quote_shipping_method == '' && $quote_shipping_option == '') {
$quote_shipping_method = $wpsc_cart->selected_shipping_method;
$i = 0;
//if it is from shipping same as billing then per item shipping may need to be calculated...
foreach ($wpsc_cart->cart_items as $cart_item) {
$product_ship = $cart_item->calculate_shipping($quote_shipping_method);
echo "jQuery('#shipping_" . $i . "').html('" . htmlspecialchars(nzshpcrt_currency_display($product_ship, false, true)) . "');\n\r";
$i++;
}
} else {
$wpsc_cart->update_shipping($quote_shipping_method, $quote_shipping_option);
echo "jQuery('.pricedisplay.checkout-shipping').html('" . wpsc_cart_shipping() . "');\n\r";
echo "jQuery('.pricedisplay.checkout-total').html('" . wpsc_cart_total() . "');\n\r";
exit;
}
//if(count($wpsc_cart->shipping_quotes) > 0 && $_POST['key1'] == '' && $_POST['key'] == ''){
while (wpsc_have_shipping_methods()) {
wpsc_the_shipping_method();
if (!wpsc_have_shipping_quotes()) {
continue;
}
// Don't display shipping method if it doesn't have at least one quote
$output .= "<tr><td class='shipping_header' colspan='5'>" . wpsc_shipping_method_name() . __('- Choose a Shipping Rate', 'wpsc') . "</td></tr>";
while (wpsc_have_shipping_quotes()) {
wpsc_the_shipping_quote();
$output .= "<tr class='shipping_quotes'>";
$output .= "<td colspan='3'>";
$output .= "<label for='" . wpsc_shipping_quote_html_id() . "'>" . wpsc_shipping_quote_name() . "</label>";
$output .= "</td>";
$output .= "<td style='text-align:center;'>";
$output .= "<label for='" . wpsc_shipping_quote_html_id() . "'>" . wpsc_shipping_quote_value() . "</label>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td style='text-align:center;'>";
if (wpsc_have_morethanone_shipping_methods_and_quotes()) {
$output .= "<input type='radio' id='" . wpsc_shipping_quote_html_id() . "'" . wpsc_shipping_quote_selected_state() . " onclick='switchmethod(\"" . wpsc_shipping_quote_name() . "\", \"" . wpsc_shipping_method_internal_name() . "\")' value='" . wpsc_shipping_quote_value(true) . "' name='shipping_method' />";
} else {
$output .= "\t<input " . wpsc_shipping_quote_selected_state() . " disabled='disabled' type='radio' id='" . wpsc_shipping_quote_html_id() . "' value='" . wpsc_shipping_quote_value(true) . "' name='shipping_method' />";
wpsc_update_shipping_single_method();
}
$output .= "</td>";
$output .= "</tr>";
}
}
$output = str_replace(array("\n", "\r"), array("\\n", "\\r"), addslashes($output));
echo "var shipping =jQuery('td.shipping_header').parent('tr');";
echo "shipping.nextAll('tr').remove();\n\r";
echo "shipping.parent().append(\"" . $output . "\");\n\r";
echo "shipping.empty();";
// }
$wpsc_cart->update_shipping($quote_shipping_method, $quote_shipping_option);
if (wpsc_cart_tax(false) > 0) {
echo "jQuery(\"tr.total_tax\").show();\n\r";
echo "jQuery('#checkout_tax').html(\"<span class='pricedisplay'>" . wpsc_cart_tax() . "</span>\");\n\r";
}
echo "jQuery('.pricedisplay.checkout-shipping').html('" . wpsc_cart_shipping() . "');\n\r";
echo "jQuery('.pricedisplay.checkout-total').html('" . wpsc_cart_total() . "');\n\r";
exit;
}
开发者ID:alx,项目名称:SBek-Arak,代码行数:66,代码来源:ajax.functions.php
示例4: wpsc_update_shipping_quotes_on_shipping_same_as_billing
function wpsc_update_shipping_quotes_on_shipping_same_as_billing()
{
global $wpsc_cart;
wpsc_update_location();
if (get_option('do_not_use_shipping')) {
die('-1');
}
if (!wpsc_have_shipping_quotes()) {
die('0');
} else {
?>
<tr class="wpsc_shipping_info">
<td colspan="5">
<?php
_e('Please choose a country below to calculate your shipping costs', 'wpsc');
?>
</td>
</tr>
<?php
if (!wpsc_have_shipping_quote()) {
// No valid shipping quotes
?>
<?php
if (wpsc_have_valid_shipping_zipcode()) {
?>
<tr class='wpsc_update_location'>
<td colspan='5' class='shipping_error' >
<?php
_e('Please provide a Zipcode and click Calculate in order to continue.', 'wpsc');
?>
</td>
</tr>
<?php
} else {
?>
<tr class='wpsc_update_location_error'>
<td colspan='5' class='shipping_error' >
<?php
_e('Sorry, online ordering is unavailable to this destination and/or weight. Please double check your destination details.', 'wpsc');
?>
</td>
</tr>
<?php
}
?>
<?php
}
?>
<tr class='wpsc_change_country'>
<td colspan='5'>
<form name='change_country' id='change_country' action='' method='post'>
<?php
echo wpsc_shipping_country_list();
?>
<input type='hidden' name='wpsc_update_location' value='true' />
<input type='submit' name='wpsc_submit_zipcode' value='Calculate' />
</form>
</td>
</tr>
<?php
if (wpsc_have_morethanone_shipping_quote()) {
?>
<?php
while (wpsc_have_shipping_methods()) {
wpsc_the_shipping_method();
?>
<?php
if (!wpsc_have_shipping_quotes()) {
continue;
}
// Don't display shipping method if it doesn't have at least one quote
?>
<tr class='wpsc_shipping_header'><td class='shipping_header' colspan='5'><?php
echo wpsc_shipping_method_name() . __(' - Choose a Shipping Rate', 'wpsc');
?>
</td></tr>
<?php
while (wpsc_have_shipping_quotes()) {
wpsc_the_shipping_quote();
?>
<tr class='<?php
echo wpsc_shipping_quote_html_id();
?>
'>
<td class='wpsc_shipping_quote_name wpsc_shipping_quote_name_<?php
echo wpsc_shipping_quote_html_id();
?>
' colspan='3'>
<label for='<?php
echo wpsc_shipping_quote_html_id();
?>
'><?php
echo wpsc_shipping_quote_name();
?>
</label>
</td>
<td class='wpsc_shipping_quote_price wpsc_shipping_quote_price_<?php
echo wpsc_shipping_quote_html_id();
//.........这里部分代码省略.........
开发者ID:pankajsinghjarial,项目名称:SYLC,代码行数:101,代码来源:ajax.functions.php
注:本文中的wpsc_have_shipping_quotes函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论