• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP wpsc_get_currency_symbol函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: output_row

    /**
     * generates row of table rate fields
     */
    private function output_row($key = '', $shipping = '')
    {
        $currency = wpsc_get_currency_symbol();
        $class = $this->alt ? 'class="alternate"' : '';
        $this->alt = !$this->alt;
        ?>
			<tr>
				<td <?php 
        echo $class;
        ?>
>
					<div class="cell-wrapper">
						<small><?php 
        echo esc_html($currency);
        ?>
</small>
						<input type="text" name="wpsc_shipping_tablerate_layer[]" value="<?php 
        echo esc_attr($key);
        ?>
" size="4" />
						<small><?php 
        _e(' and above', 'wpsc');
        ?>
</small>
					</div>
				</td>
				<td <?php 
        echo $class;
        ?>
>
					<div class="cell-wrapper">
						<small><?php 
        echo esc_html($currency);
        ?>
</small>
						<input type="text" name="wpsc_shipping_tablerate_shipping[]" value="<?php 
        echo esc_attr($shipping);
        ?>
" size="4" />
						<span class="actions">
							<a tabindex="-1" title="<?php 
        _e('Delete Layer', 'wpsc');
        ?>
" class="button-secondary wpsc-button-round wpsc-button-minus" href="#"><?php 
        echo _x('&ndash;', 'delete item', 'wpsc');
        ?>
</a>
							<a tabindex="-1" title="<?php 
        _e('Add Layer', 'wpsc');
        ?>
" class="button-secondary wpsc-button-round wpsc-button-plus" href="#"><?php 
        echo _x('+', 'add item', 'wpsc');
        ?>
</a>
						</span>
					</div>
				</td>
			</tr>
		<?php 
    }
开发者ID:RJHanson292,项目名称:WP-e-Commerce,代码行数:63,代码来源:tablerate.php


示例2: settings_form_shipping_price_field

 /**
  * Create shipping price field
  *
  * @return string HTML snippet, a <tr> with two columns.
  */
 function settings_form_shipping_price_field($id, $label, $value)
 {
     $output = "<tr><td>" . $label . "</td>";
     $output .= "<td>";
     $output .= esc_attr(wpsc_get_currency_symbol());
     $output .= "<input size='4' type='text' name='shipping[" . esc_attr($id) . "]' value='" . esc_attr($value) . "'>";
     $output .= "</td></tr>";
     return $output;
 }
开发者ID:ashik968,项目名称:digiplot,代码行数:14,代码来源:flatrate.php


示例3: output_row

    private function output_row($key = '', $shipping = '')
    {
        $currency = wpsc_get_currency_symbol();
        $class = $this->alt ? ' class="alternate"' : '';
        $this->alt = !$this->alt;
        ?>
			<tr>
				<td<?php 
        echo $class;
        ?>
>
					<div class="cell-wrapper">
						<input type="text" name="wpsc_shipping_weightrate_layer[]" value="<?php 
        echo esc_attr($key);
        ?>
" size="4" />
						<small><?php 
        _e(' lbs and above', 'wpsc');
        ?>
</small>
					</div>
				</td>
				<td<?php 
        echo $class;
        ?>
>
					<div class="cell-wrapper">
						<small><?php 
        echo esc_html($currency);
        ?>
</small>
						<input type="text" name="wpsc_shipping_weightrate_shipping[]" value="<?php 
        echo esc_attr($shipping);
        ?>
" size="4" />
						<div class="actions">
							<a tabindex="-1" title="<?php 
        _e('Add Layer', 'wpsc');
        ?>
" class="action add" href="#"><?php 
        _e('Add', 'wpsc');
        ?>
</a>
							<a tabindex="-1" title="<?php 
        _e('Delete Layer', 'wpsc');
        ?>
" class="action delete" href="#"><?php 
        _e('Delete', 'wpsc');
        ?>
</a>
						</div>
					</div>
				</td>
			</tr>
		<?php 
    }
开发者ID:pankajsinghjarial,项目名称:SYLC,代码行数:56,代码来源:weightrate.php


示例4: getForm

 /**
  *
  *
  * @return unknown
  */
 function getForm()
 {
     $output = "";
     $output .= "<tr><th>" . __('Total Price', 'wpsc') . "</th><th>" . __('Shipping Price', 'wpsc') . "</th></tr>";
     $layers = get_option("table_rate_layers");
     if ($layers != '') {
         foreach ($layers as $key => $shipping) {
             $output .= "<tr class='rate_row'>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<i style='color: grey;'>" . __('If price is ', 'wpsc') . "</i>\n\t\t\t\t\t\t\t\t<input type='text' name='layer[]' value='{$key}' size='4' />\n\t\t\t\t\t\t\t\t<i style='color: grey;'> " . __(' and above', 'wpsc') . "</i>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t" . wpsc_get_currency_symbol() . "\n\t\t\t\t\t\t\t\t<input type='text' value='{$shipping}' name='shipping[]'\tsize='4'>\n\t\t\t\t\t\t\t\t&nbsp;&nbsp;<a href='#' class='delete_button' >" . __('Delete', 'wpsc') . "</a>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>";
         }
     }
     $output .= "<input type='hidden' name='checkpage' value='table'>";
     $output .= "<tr class='addlayer'><td colspan='2'>Layers: <a href='' style='cursor:pointer;' id='addlayer' >" . __('Add Layer', 'wpsc') . "</a></td></tr>";
     return $output;
 }
开发者ID:hornet9,项目名称:Morato,代码行数:19,代码来源:tablerate.php


示例5: getForm

 function getForm()
 {
     //	$output.="<table>";
     $output .= "<tr><th>" . TXT_WPSC_TOTALPRICE . "</th><th>" . TXT_WPSC_SHIPPING_PRICE . "</th></tr>";
     $layers = get_option("table_rate_layers");
     if ($layers != '') {
         foreach ($layers as $key => $shipping) {
             $output .= "<tr class='rate_row'>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<i style='color: grey;'>" . TXT_WPSC_IF_PRICE_IS . "</i>\n\t\t\t\t\t\t\t\t<input type='text' name='layer[]' value='{$key}' size='4' />\n\t\t\t\t\t\t\t\t<i style='color: grey;'> " . TXT_WPSC_AND_ABOVE . "</i>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t" . wpsc_get_currency_symbol() . "\n\t\t\t\t\t\t\t\t<input type='text' value='{$shipping}' name='shipping[]'  size='4'>\n\t\t\t\t\t\t\t\t&nbsp;&nbsp;<a href='#' class='delete_button' >" . TXT_WPSC_DELETE . "</a>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>";
         }
     }
     $output .= "<input type='hidden' name='checkpage' value='table'>";
     $output .= "<tr class='addlayer'><td colspan='2'>Layers: <a href='' style='cursor:pointer;' id='addlayer' >Add Layer</a></td></tr>";
     //	$output.="</table>";
     return $output;
 }
开发者ID:papayalabs,项目名称:htdocs,代码行数:15,代码来源:tablerate.php


示例6: getForm

 /**
  *
  *
  * @return unknown
  */
 function getForm()
 {
     $output = "";
     $output .= "<tr><th>" . __('Total weight <br />(<abbr alt="You must enter the weight here in pounds, regardless of what you used on your products" title="You must enter the weight here in pounds, regardless of what you used on your products">in pounds</abbr>)', 'wpsc') . "</th><th>" . __('Shipping Price', 'wpsc') . "</th></tr>";
     $layers = get_option("weight_rate_layers");
     if ($layers != '') {
         foreach ($layers as $key => $shipping) {
             $output .= "<tr class='rate_row'><td >";
             $output .= "<i style='color: grey;'>" . __('If weight is ', 'wpsc') . "</i><input type='text' value='{$key}' name='weight_layer[]'size='4'><i style='color: grey;'>" . __(' and above', 'wpsc') . "</i></td><td>" . wpsc_get_currency_symbol() . "<input type='text' value='" . esc_attr($shipping) . "' name='weight_shipping[]' size='4'>&nbsp;&nbsp;<a href='#' class='delete_button' >" . __('Delete', 'wpsc') . "</a></td></tr>";
         }
     }
     $output .= "<input type='hidden' name='checkpage' value='weight'>";
     $output .= "<tr class='addlayer'><td colspan='2'>Layers: <a style='cursor:pointer;' id='addweightlayer' >Add Layer</a></td></tr>";
     return $output;
 }
开发者ID:hornet9,项目名称:Morato,代码行数:20,代码来源:weightrate.php


示例7: wpsc_quarterly_dashboard_widget

function wpsc_quarterly_dashboard_widget()
{
    if (get_option('wpsc_business_year_start') == false) {
        ?>
		<form action='' method='post'>
			<label for='date_start'><?php 
        _e('Financial Year End', 'wpsc');
        ?>
: </label>
			<input id='date_start' type='text' class='pickdate' size='11' value='<?php 
        echo get_option('wpsc_last_date');
        ?>
' name='add_start' />
			   <!--<select name='add_start[day]'>
<?php 
        for ($i = 1; $i <= 31; ++$i) {
            $selected = '';
            if ($i == date("d")) {
                $selected = "selected='selected'";
            }
            echo "<option {$selected} value='{$i}'>{$i}</option>";
        }
        ?>
				   </select>
		   <select name='add_start[month]'>
	<?php 
        for ($i = 1; $i <= 12; ++$i) {
            $selected = '';
            if ($i == (int) date("m")) {
                $selected = "selected='selected'";
            }
            echo "<option {$selected} value='{$i}'>" . date("M", mktime(0, 0, 0, $i, 1, date("Y"))) . "</option>";
        }
        ?>
				   </select>
		   <select name='add_start[year]'>
	<?php 
        for ($i = date("Y"); $i <= date("Y") + 12; ++$i) {
            $selected = '';
            if ($i == date("Y")) {
                $selected = "selected='true'";
            }
            echo "<option {$selected} value='{$i}'>" . $i . "</option>";
        }
        ?>
				   </select>-->
		<input type='hidden' name='wpsc_admin_action' value='wpsc_quarterly' />
		<input type='submit' class='button primary' value='Submit' name='wpsc_submit' />
	</form>
<?php 
        if (get_option('wpsc_first_quart') != '') {
            $firstquarter = get_option('wpsc_first_quart');
            $secondquarter = get_option('wpsc_second_quart');
            $thirdquarter = get_option('wpsc_third_quart');
            $fourthquarter = get_option('wpsc_fourth_quart');
            $finalquarter = get_option('wpsc_final_quart');
            $revenue = wpsc_get_quarterly_summary();
            $currsymbol = wpsc_get_currency_symbol();
            foreach ($revenue as $rev) {
                if ($rev == '') {
                    $totals[] = '0.00';
                } else {
                    $totals[] = $rev;
                }
            }
            ?>
			<div id='box'>
				<p class='atglance'>
					<span class='wpsc_quart_left'><?php 
            _e('At a Glance', 'wpsc');
            ?>
</span>
					<span class='wpsc_quart_right'><?php 
            _e('Revenue', 'wpsc');
            ?>
</span>
				</p>
				<div style='clear:both'></div>
				<p class='quarterly'>
					<span class='wpsc_quart_left'><strong>01</strong>&nbsp; (<?php 
            echo date('M Y', $thirdquarter) . ' - ' . date('M Y', $fourthquarter);
            ?>
)</span>
					<span class='wpsc_quart_right'><?php 
            echo $currsymbol . ' ' . $totals[0];
            ?>
</span></p>
				<p class='quarterly'>
					<span class='wpsc_quart_left'><strong>02</strong>&nbsp; (<?php 
            echo date('M Y', $secondquarter) . ' - ' . date('M Y', $thirdquarter);
            ?>
)</span>
					<span class='wpsc_quart_right'><?php 
            echo $currsymbol . ' ' . $totals[1];
            ?>
</span></p>
				<p class='quarterly'>
					<span class='wpsc_quart_left'><strong>03</strong>&nbsp; (<?php 
            echo date('M Y', $firstquarter) . ' - ' . date('M Y', $secondquarter);
            ?>
//.........这里部分代码省略.........
开发者ID:hornet9,项目名称:Morato,代码行数:101,代码来源:admin.php


示例8: wpsc_dashboard_4months_widget

function wpsc_dashboard_4months_widget()
{
    global $wpdb;
    $this_year = date("Y");
    //get current year and month
    $this_month = date("n");
    $months[] = mktime(0, 0, 0, $this_month - 3, 1, $this_year);
    //generate  unix time stamps fo 4 last months
    $months[] = mktime(0, 0, 0, $this_month - 2, 1, $this_year);
    $months[] = mktime(0, 0, 0, $this_month - 1, 1, $this_year);
    $months[] = mktime(0, 0, 0, $this_month, 1, $this_year);
    $prodsql = "SELECT `" . WPSC_TABLE_CART_CONTENTS . "`.`prodid` FROM `" . WPSC_TABLE_CART_CONTENTS . "` INNER JOIN `" . WPSC_TABLE_PURCHASE_LOGS . "` ON `" . WPSC_TABLE_CART_CONTENTS . "`.`purchaseid` = `" . WPSC_TABLE_PURCHASE_LOGS . "`.`id` WHERE `" . WPSC_TABLE_PURCHASE_LOGS . "`.`processed` >= 2 AND `" . WPSC_TABLE_PURCHASE_LOGS . "`.`date` >= " . $months[0] . " GROUP BY `" . WPSC_TABLE_CART_CONTENTS . "`.`prodid` ORDER BY SUM(`" . WPSC_TABLE_CART_CONTENTS . "`.`price` * `" . WPSC_TABLE_CART_CONTENTS . "`.`quantity`) DESC LIMIT 4";
    $products = $wpdb->get_results($prodsql, ARRAY_A);
    //get 4 products with top income in 4 last months.
    $timeranges[0]["start"] = mktime(0, 0, 0, $this_month - 3, 1, $this_year);
    //make array of time ranges
    $timeranges[0]["end"] = mktime(0, 0, 0, $this_month - 2, 1, $this_year);
    $timeranges[1]["start"] = mktime(0, 0, 0, $this_month - 2, 1, $this_year);
    $timeranges[1]["end"] = mktime(0, 0, 0, $this_month - 1, 1, $this_year);
    $timeranges[2]["start"] = mktime(0, 0, 0, $this_month - 1, 1, $this_year);
    $timeranges[2]["end"] = mktime(0, 0, 0, $this_month, 1, $this_year);
    $timeranges[3]["start"] = mktime(0, 0, 0, $this_month, 1, $this_year);
    $timeranges[3]["end"] = mktime();
    foreach ((array) $products as $product) {
        //run trough products and get each product income amounts and name
        foreach ($timeranges as $timerange) {
            //run trough time ranges of product, and get its income over each time range
            $prodsql = "SELECT SUM(`" . WPSC_TABLE_CART_CONTENTS . "`.`price` * `" . WPSC_TABLE_CART_CONTENTS . "`.`quantity`) AS sum FROM `" . WPSC_TABLE_CART_CONTENTS . "` INNER JOIN `" . WPSC_TABLE_PURCHASE_LOGS . "` ON `" . WPSC_TABLE_CART_CONTENTS . "`.`purchaseid` = `" . WPSC_TABLE_PURCHASE_LOGS . "`.`id` WHERE `" . WPSC_TABLE_PURCHASE_LOGS . "`.`processed` >= 2 AND `" . WPSC_TABLE_PURCHASE_LOGS . "`.`date` >= " . $timerange["start"] . " AND `" . WPSC_TABLE_PURCHASE_LOGS . "`.`date` < " . $timerange["end"] . " AND `" . WPSC_TABLE_CART_CONTENTS . "`.`prodid` = " . $product['prodid'] . " GROUP BY `" . WPSC_TABLE_CART_CONTENTS . "`.`prodid` LIMIT 1";
            //get the amount of income that current product has generaterd over current time range
            $sum = $wpdb->get_results($prodsql, ARRAY_A);
            $sums[] = $sum[0]["sum"];
            //push amount to array
        }
        $namesql = "SELECT `" . WPSC_TABLE_PRODUCT_LIST . "`.`name` FROM `" . WPSC_TABLE_PRODUCT_LIST . "` WHERE `" . WPSC_TABLE_PRODUCT_LIST . "`.`id` = " . $product['prodid'];
        $name = $wpdb->get_results($namesql, ARRAY_A);
        $prod_data[] = array($sums, $name[0]["name"]);
        //result: array of 2: $prod_data[0] = array(income)
        $sums = array();
        //reset array				//$prod_data[1] = product name
    }
    $tablerow = 1;
    $output .= '<div style="padding-bottom:15px; ">Last four months of sales on a per product basis:</div>
    <table style="width:100%" border="0" cellspacing="0">
    	<tr style="font-style:italic; color:#666;" height="20">
    		<td colspan="2" style=" font-family:\'Times New Roman\', Times, serif; font-size:15px; border-bottom:solid 1px #000;">At a Glance</td>';
    foreach ($months as $mnth) {
        $output .= '<td align="center" style=" font-family:\'Times New Roman\'; font-size:15px; border-bottom:solid 1px #000;">' . date("M", $mnth) . '</td>';
    }
    $output .= '</tr>';
    foreach ((array) $prod_data as $product) {
        $output .= '<tr height="20">
				<td width="20" style="font-weight:bold; color:#008080; border-bottom:solid 1px #000;">' . $tablerow . '</td>
				<td style="border-bottom:solid 1px #000;width:60px">' . $product[1] . '</td>';
        $currsymbol = wpsc_get_currency_symbol();
        $tablerow++;
        foreach ($product[0] as $amount) {
            $output .= '<td align="center" style="border-bottom:solid 1px #000;">' . $currsymbol . number_format(absint($amount), 2) . '</td>';
        }
        $output .= '</tr>';
    }
    $output .= '</table>';
    echo $output;
}
开发者ID:alx,项目名称:SBek-Arak,代码行数:63,代码来源:admin.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP wpsc_get_current_customer_id函数代码示例发布时间:2022-05-23
下一篇:
PHP wpsc_get_checkout_url函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap