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') . ' "' . esc_attr($label) . '"">' . 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>')); }
/** * @deprecated Use Shopp::percentage() **/ function percentage($amount, $format = array()) { return Shopp::percentage($amount, $format); }
""><?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' : ''; ?>
} 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']));