当前位置: 首页>>代码示例>>PHP>>正文


PHP Shopp::percentage方法代码示例

本文整理汇总了PHP中Shopp::percentage方法的典型用法代码示例。如果您正苦于以下问题:PHP Shopp::percentage方法的具体用法?PHP Shopp::percentage怎么用?PHP Shopp::percentage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Shopp的用法示例。


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

示例1: column_rate

 public function column_rate($Item)
 {
     extract($Item);
     $rate = Shopp::percentage(Shopp::floatval($rate), array('precision' => 4));
     $location = $this->countries[$country];
     $label = "{$rate} — {$location}";
     $edit_link = wp_nonce_url(add_query_arg('id', $id), 'shopp_edit_taxrate');
     $delete_link = wp_nonce_url(add_query_arg('delete', $id), 'shopp_delete_taxrate');
     echo '<a class="row-title edit" href="' . esc_url($edit_link) . '" title="' . Shopp::__('Edit') . ' &quot;' . esc_attr($label) . '&quot;">' . esc_html($label) . '</a>';
     echo $this->row_actions(array('edit' => '<a class="edit" href="' . $edit_link . '">' . __('Edit') . '</a>', 'delete' => '<a class="delete" href="' . $delete_link . '">' . __('Delete') . '</a>'));
 }
开发者ID:msigley,项目名称:shopp,代码行数:11,代码来源:Taxes.php

示例2: percentage

/**
 * @deprecated Use Shopp::percentage()
 **/
function percentage($amount, $format = array())
{
    return Shopp::percentage($amount, $format);
}
开发者ID:BlessySoftwares,项目名称:anvelocom,代码行数:7,代码来源:Core.php

示例3: _e

&quot;"><?php 
            _e('Disable', 'Shopp');
            ?>
</a></span>
					<?php 
        }
        ?>
				</div>

			</td>
			<td class="discount column-discount<?php 
        echo in_array('discount', $hidden) ? ' hidden' : '';
        ?>
"><?php 
        if ($Promotion->type == "Percentage Off") {
            echo Shopp::percentage((double) $Promotion->discount);
        }
        if ($Promotion->type == "Amount Off") {
            echo Shopp::money((double) $Promotion->discount);
        }
        if ($Promotion->type == "Free Shipping") {
            echo shopp_setting("free_shipping_text");
        }
        if ($Promotion->type == "Buy X Get Y Free") {
            Shopp::esc_html_e('Buy %s Get %s Free', $Promotion->buyqty, $Promotion->getqty);
        }
        ?>
</td>
			<td class="applied column-applied<?php 
        echo in_array('applied', $hidden) ? ' hidden' : '';
        ?>
开发者ID:BlessySoftwares,项目名称:anvelocom,代码行数:31,代码来源:discounts.php

示例4: _e

}
if (count($rates) == 0 && $edit === false) {
    ?>
				<tr id="no-taxrates"><td colspan="5"><?php 
    _e('No tax rates, yet.', 'Shopp');
    ?>
</td></tr>
			<?php 
}
$hidden = get_hidden_columns('shopp_page_shopp-settings-taxrates');
$even = false;
foreach ($rates as $index => $taxrate) {
    $defaults = array('rate' => 0, 'country' => false, 'zone' => false, 'rules' => array(), 'locals' => array(), 'haslocals' => false);
    $taxrate = array_merge($defaults, $taxrate);
    extract($taxrate);
    $rate = Shopp::percentage(Shopp::floatval($rate), array('precision' => 4));
    $location = $countries[$country];
    if (isset($zone) && !empty($zone)) {
        $location = $zones[$country][$zone] . ", {$location}";
    }
    $editurl = wp_nonce_url(add_query_arg(array('id' => $index), $this->url));
    $deleteurl = wp_nonce_url(add_query_arg(array('delete' => $index), $this->url), 'shopp_delete_taxrate');
    $classes = array();
    if (!$even) {
        $classes[] = 'alternate';
    }
    $even = !$even;
    if ($edit !== false && $edit === $index) {
        $conditions = array();
        foreach ($rules as $ruleid => $rule) {
            $condition_template_data = array('${id}' => $edit, '${ruleid}' => $ruleid, '${property_menu}' => menuoptions($propertymenu, $rule['p'], true), '${rulevalue}' => esc_attr($rule['v']));
开发者ID:forthrobot,项目名称:inuvik,代码行数:31,代码来源:taxrates.php


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