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


PHP Shopp::__方法代码示例

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


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

示例1: screen

 public function screen()
 {
     $status = 'available';
     if (!is_dir($this->theme_path)) {
         $status = 'directory';
     } else {
         if (!is_writable($this->theme_path)) {
             $status = 'permissions';
         } else {
             $builtin = array_filter(scandir($this->template_path), 'filter_dotfiles');
             $theme = array_filter(scandir($this->theme_path), 'filter_dotfiles');
             if (empty($theme)) {
                 $status = 'ready';
             } elseif (array_diff($builtin, $theme)) {
                 $status = 'incomplete';
             }
         }
     }
     $category_views = array('grid' => Shopp::__('Grid'), 'list' => Shopp::__('List'));
     $row_products = array(2, 3, 4, 5, 6, 7);
     $productOrderOptions = ProductCategory::sortoptions();
     $productOrderOptions['custom'] = Shopp::__('Custom');
     $orderOptions = array('ASC' => Shopp::__('Order'), 'DESC' => Shopp::__('Reverse Order'), 'RAND' => Shopp::__('Shuffle'));
     $orderBy = array('sortorder' => Shopp::__('Custom arrangement'), 'created' => Shopp::__('Upload date'));
     include $this->ui('presentation.php');
 }
开发者ID:forthrobot,项目名称:inuvik,代码行数:26,代码来源:Presentation.php

示例2: updates

 public function updates()
 {
     if (!isset($_POST['resetlog'])) {
         return;
     }
     ShoppErrorLogging()->reset();
     $this->notice(Shopp::__('The log file has been reset.'));
 }
开发者ID:forthrobot,项目名称:inuvik,代码行数:8,代码来源:Log.php

示例3: screen

 public function screen()
 {
     $Shopp = Shopp::object();
     if (!current_user_can('shopp_settings_checkout')) {
         wp_die(__('You do not have sufficient permissions to access this page.'));
     }
     $purchasetable = ShoppDatabaseObject::tablename(ShoppPurchase::$table);
     $next = sDB::query("SELECT IF ((MAX(id)) > 0,(MAX(id)+1),1) AS id FROM {$purchasetable} LIMIT 1");
     $next_setting = shopp_setting('next_order_id');
     if ($next->id > $next_setting) {
         $next_setting = $next->id;
     }
     $term_recount = false;
     if (!empty($_POST['save'])) {
         check_admin_referer('shopp-setup-management');
         $next_order_id = $_POST['settings']['next_order_id'] = intval($_POST['settings']['next_order_id']);
         if ($next_order_id >= $next->id) {
             if (sDB::query("ALTER TABLE {$purchasetable} AUTO_INCREMENT=" . sDB::escape($next_order_id))) {
                 $next_setting = $next_order_id;
             }
         }
         $_POST['settings']['order_shipfee'] = Shopp::floatval($_POST['settings']['order_shipfee']);
         // Recount terms when this setting changes
         if (isset($_POST['settings']['inventory']) && $_POST['settings']['inventory'] != shopp_setting('inventory')) {
             $term_recount = true;
         }
         shopp_set_formsettings();
         $this->notice(Shopp::__('Management settings saved.'), 'notice', 20);
     }
     if ($term_recount) {
         $taxonomy = ProductCategory::$taxon;
         $terms = get_terms($taxonomy, array('hide_empty' => 0, 'fields' => 'ids'));
         if (!empty($terms)) {
             wp_update_term_count_now($terms, $taxonomy);
         }
     }
     $states = array(__('Map the label to an order state:', 'Shopp') => array_merge(array('' => ''), Lookup::txnstatus_labels()));
     $statusLabels = shopp_setting('order_status');
     $statesLabels = shopp_setting('order_states');
     $reasonLabels = shopp_setting('cancel_reasons');
     if (empty($reasonLabels)) {
         $reasonLabels = array(__('Not as described or expected', 'Shopp'), __('Wrong size', 'Shopp'), __('Found better prices elsewhere', 'Shopp'), __('Product is missing parts', 'Shopp'), __('Product is defective or damaaged', 'Shopp'), __('Took too long to deliver', 'Shopp'), __('Item out of stock', 'Shopp'), __('Customer request to cancel', 'Shopp'), __('Item discontinued', 'Shopp'), __('Other reason', 'Shopp'));
     }
     $promolimit = array('1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '15', '20', '25');
     $lowstock = shopp_setting('lowstock_level');
     if (empty($lowstock)) {
         $lowstock = 0;
     }
     include $this->ui('management.php');
 }
开发者ID:forthrobot,项目名称:inuvik,代码行数:50,代码来源:OrdersSettings.php

示例4: settings

 /**
  * Filters the tax settings based on
  *
  * @author Jonathan Davis
  * @since 1.3
  *
  * @return array A list of tax rate settings
  **/
 public function settings()
 {
     if (!shopp_setting_enabled('taxes')) {
         return false;
     }
     $taxrates = shopp_setting('taxrates');
     $fallbacks = array();
     $settings = array();
     foreach ((array) $taxrates as $setting) {
         $defaults = array('rate' => 0, 'country' => '', 'zone' => '', 'haslocals' => false, 'logic' => 'any', 'rules' => array(), 'localrate' => 0, 'compound' => false, 'label' => Shopp::__('Tax'));
         $setting = array_merge($defaults, $setting);
         extract($setting);
         if (!$this->taxcountry($country)) {
             continue;
         }
         if (!$this->taxzone($zone)) {
             continue;
         }
         if (!$this->taxrules($rules, $logic)) {
             continue;
         }
         // Capture fall back tax rates
         if (empty($zone) && self::ALL == $country) {
             $fallbacks[] = $setting;
             continue;
         }
         $key = hash('crc32b', serialize($setting));
         // Key settings before local rates
         $setting['localrate'] = 0;
         if (isset($setting['locals']) && is_array($setting['locals']) && isset($setting['locals'][$this->address['locale']])) {
             $setting['localrate'] = $setting['locals'][$this->address['locale']];
         }
         $settings[$key] = $setting;
     }
     if (empty($settings) && !empty($fallbacks)) {
         $settings = $fallbacks;
     }
     $settings = apply_filters('shopp_cart_taxrate_settings', $settings);
     // @deprecated Use shopp_tax_rate_settings instead
     return apply_filters('shopp_tax_rate_settings', $settings);
 }
开发者ID:BlessySoftwares,项目名称:anvelocom,代码行数:49,代码来源:Tax.php

示例5: updates

 public function updates()
 {
     if (!isset($_POST['settings']['target_markets'])) {
         asort($_POST['settings']['target_markets']);
     }
     // Save all other settings
     shopp_set_formsettings();
     $update = false;
     // Update country changes
     $country = ShoppBaseLocale()->country();
     if ($country != $this->form('country')) {
         $country = strtoupper($this->form('country'));
         $countries = ShoppLookup::countries();
         // Validate the country
         if (!isset($countries[$country])) {
             return $this->notice(Shopp::__('The country provided is not valid.'), 'error');
         }
         $update = true;
     }
     // Update state changes
     $state = ShoppBaseLocale()->state();
     if (ShoppBaseLocale()->state() != $this->form('state')) {
         $state = strtoupper($this->form('state'));
         $states = ShoppLookup::country_zones(array($country));
         // Validate the state
         if (!empty($states) && !isset($states[$country][$state])) {
             return $this->notice(Shopp::__('The %s provided is not valid.', ShoppBaseLocale()->division()), 'error');
         }
         $update = true;
     }
     // Save base locale changes
     if ($update) {
         ShoppBaseLocale()->save($country, $state);
     }
     $this->notice(Shopp::__('Shopp settings saved.'));
 }
开发者ID:crunnells,项目名称:shopp,代码行数:36,代码来源:Setup.php

示例6: column_name

 public function column_name($Item)
 {
     echo '<a class="row-title edit" href="' . $editurl . '" title="' . Shopp::__('Edit') . ' &quot;' . esc_attr($Item->name) . '&quot;">' . esc_html($Item->name) . '</a>';
     $edit_link = wp_nonce_url(add_query_arg('id', $Item->id), 'shopp-settings-images');
     $delete_link = wp_nonce_url(add_query_arg('delete', $Item->id), 'shopp-settings-images');
     echo $this->row_actions(array('edit' => '<a class="edit" href="' . $edit_link . '">' . __('Edit') . '</a>', 'delete' => '<a class="delete" href="' . $delete_link . '">' . __('Delete') . '</a>'));
 }
开发者ID:forthrobot,项目名称:inuvik,代码行数:7,代码来源:Images.php

示例7: strtolower

?>
<br />
			<?php 
if (!empty($operations['country'])) {
    ?>
			<strong><?php 
    Shopp::_e('Currency');
    ?>
: </strong><?php 
    echo Shopp::money(1000.0);
    ?>
			<?php 
    if (shopp_setting_enabled('tax_inclusive')) {
        ?>
<strong>(+<?php 
        echo strtolower(Shopp::__('Tax'));
        ?>
)</strong><?php 
    }
    ?>
			<?php 
}
?>
		</td>
	</tr>
	<tr>
		<th scope="row" valign="top"><label for="target_markets"><?php 
Shopp::_e('Target Markets');
?>
</label></th>
		<td>
开发者ID:msigley,项目名称:shopp,代码行数:31,代码来源:setup.php

示例8: tab

All of these advanced searches can be used:

', 'Customers Manager help tab') . $table;
$Exporting = Shopp::_mx('### Exporting

Customers can be exported in a variety of formats with any number of customer data columns needed.

**Shopp supported order export formats:**

* Tab-separated.txt
* Comma-separated.csv
* Microsoft&copy; Excel.xls

For Tab-separated, comma-separated and Microsoft® Excel file formats select the columns to include for each record in the export. Enable the Include column headings option to include column names in the first line of the export file.

### Continuous Periodic Exports

Using filtering and searching you can isolate specific orders to export. Additionally, using date range filtering you can set up periodic exporting. Shopp stores the end date of each export that has date range filters enabled. This allows selecting the Last Export option from the date range drop-down menu which will automatically set the start field to the end date of the last completed export, and the end date field will be set to today’s current date.', 'Customers Manager help tab');
$sidebar = Shopp::_mx('**For more information:**

[Shopp User Guide](%s)

[Community Forums](%s)

[Shopp Support Help Desk](%s)', 'Customers Manager help tab (sidebar)', ShoppSupport::DOCS . 'orders-customers/customer-manager/', ShoppSupport::FORUMS, ShoppSupport::SUPPORT);
get_current_screen()->add_help_tab(array('id' => 'overview', 'title' => Shopp::__('Overview'), 'content' => $Overview));
get_current_screen()->add_help_tab(array('id' => 'filtering', 'title' => Shopp::__('Filtering'), 'content' => $Filtering));
get_current_screen()->add_help_tab(array('id' => 'exporting', 'title' => Shopp::__('Exporting'), 'content' => $Exporting));
get_current_screen()->add_help_tab(array('id' => 'search', 'title' => Shopp::__('Search'), 'content' => $Search));
get_current_screen()->set_help_sidebar($sidebar);
开发者ID:forthrobot,项目名称:inuvik,代码行数:30,代码来源:customers.php

示例9: _e

		<tr>
		<td scope="row" valign="top" class="rate"><input type="text" name="settings[taxrates][${id}][rate]" id="tax-rate" value="${rate}" size="7" class="selectall" tabindex="1" /><br /><label for="tax-rate"><?php 
_e('Tax Rate', 'Shopp');
?>
</label><br />
		<input type="hidden" name="settings[taxrates][${id}][compound]" value="off" /><label><input type="checkbox" id="tax-compound" name="settings[taxrates][${id}][compound]" value="on" ${compounded} tabindex="4" />&nbsp;<?php 
Shopp::_e('Compound');
?>
</label></td>
		<td scope="row" class="conditions">
		<select name="settings[taxrates][${id}][country]" class="country" tabindex="2">${countries}</select><select name="settings[taxrates][${id}][zone]" class="zone no-zones" tabindex="3">${zones}</select>
		<?php 
echo ShoppUI::button('add', 'addrule');
?>
		<?php 
$options = array('any' => Shopp::__('any'), 'all' => strtolower(Shopp::__('All')));
$menu = '<select name="settings[taxrates][${id}][logic]" class="logic">' . menuoptions($options, false, true) . '</select>';
?>
			<div class="conditionals no-conditions">
				<p><label><?php 
printf(__('Apply tax rate when %s of the following conditions match', 'Shopp'), $menu);
?>
:</label></p>
				<ul>
				${conditions}
				</ul>
			</div>
		</td>
			<td>
				<div class="local-rates panel subpanel no-local-rates">
					<div class="label"><label><?php 
开发者ID:forthrobot,项目名称:inuvik,代码行数:31,代码来源:taxes.php

示例10: label

 public function label()
 {
     return Shopp::__('Shipping');
 }
开发者ID:BlessySoftwares,项目名称:anvelocom,代码行数:4,代码来源:Totals.php

示例11: orders_widget

 /**
  * Renders the recent orders dashboard widget
  *
  * @author Jonathan Davis
  * @since 1.0
  *
  * @return void
  **/
 public static function orders_widget($args = false)
 {
     $defaults = array('before_widget' => '', 'before_title' => '', 'widget_name' => '', 'after_title' => '', 'after_widget' => '');
     $args = array_merge($defaults, (array) $args);
     extract($args, EXTR_SKIP);
     $statusLabels = shopp_setting('order_status');
     echo $before_widget;
     echo $before_title;
     echo $widget_name;
     echo $after_title;
     $purchasetable = ShoppDatabaseObject::tablename(ShoppPurchase::$table);
     $purchasedtable = ShoppDatabaseObject::tablename(Purchased::$table);
     $txnlabels = Lookup::txnstatus_labels();
     if (!($Orders = get_transient('shopp_dashboard_orders'))) {
         $Orders = sDB::query("SELECT p.*,count(*) as items FROM (SELECT * FROM {$purchasetable} WHERE txnstatus != 'purchased' AND txnstatus != 'invoiced' ORDER BY created DESC LIMIT 6) AS p LEFT JOIN {$purchasedtable} AS i ON i.purchase=p.id GROUP BY p.id ORDER BY p.id DESC", 'array');
         set_transient('shopp_dashboard_orders', $Orders, 90);
         // Keep for the next 1 minute
     }
     if (!empty($Orders)) {
         echo '<table class="widefat">' . '<thead>' . '	<tr>' . '		<th scope="col">' . __('Name', 'Shopp') . '</th>' . '		<th scope="col">' . __('Date', 'Shopp') . '</th>' . '		<th scope="col" class="num">' . Shopp::__('Items') . '</th>' . '		<th scope="col" class="num">' . Shopp::__('Total') . '</th>' . '		<th scope="col" class="num">' . Shopp::__('Status') . '</th>' . '	</tr>' . '</thead>' . '	<tbody id="orders" class="list orders">';
         $even = false;
         foreach ($Orders as $Order) {
             $classes = array();
             if ($even = !$even) {
                 $classes[] = 'alternate';
             }
             $txnstatus = isset($txnlabels[$Order->txnstatus]) ? $txnlabels[$Order->txnstatus] : $Order->txnstatus;
             $status = isset($statusLabels[$Order->status]) ? $statusLabels[$Order->status] : $Order->status;
             $contact = '' == $Order->firstname . $Order->lastname ? '(no contact name)' : $Order->firstname . ' ' . $Order->lastname;
             $url = add_query_arg(array('page' => ShoppAdmin()->pagename('orders'), 'id' => $Order->id), admin_url('admin.php'));
             $classes[] = strtolower(preg_replace('/[^\\w]/', '_', $Order->txnstatus));
             echo '<tr class="' . join(' ', $classes) . '">' . '	<td><a class="row-title" href="' . $url . '" title="View &quot;Order ' . $Order->id . '&quot;">' . (empty($Order->firstname) && empty($Order->lastname) ? '(no contact name)' : $Order->firstname . ' ' . $Order->lastname) . '</a></td>' . '	<td>' . date("Y/m/d", mktimestamp($Order->created)) . '</td>' . '	<td class="num items">' . $Order->items . '</td>' . '	<td class="num total">' . money($Order->total) . '</td>' . '	<td class="num status">' . $statusLabels[$Order->status] . '</td>' . '</tr>';
         }
         echo '</tbody></table>';
     } else {
         echo '<p>' . Shopp::__('No orders, yet.') . '</p>';
     }
     echo $after_widget;
 }
开发者ID:forthrobot,项目名称:inuvik,代码行数:47,代码来源:Dashboard.php

示例12: rules

 public static function rules()
 {
     $rules = apply_filters('shopp_discount_rules', array('Name' => Shopp::__('Name'), 'Category' => Shopp::__('Category'), 'Variation' => Shopp::__('Variation'), 'Price' => Shopp::__('Price'), 'Sale price' => Shopp::__('Sale price'), 'Type' => Shopp::__('Type'), 'In stock' => Shopp::__('In stock'), 'Tag name' => Shopp::__('Tag name'), 'Unit price' => Shopp::__('Unit price'), 'Total price' => Shopp::__('Total price'), 'Input name' => Shopp::__('Input name'), 'Input value' => Shopp::__('Input value'), 'Quantity' => Shopp::__('Quantity'), 'Any item name' => Shopp::__('Any item name'), 'Any item amount' => Shopp::__('Any item amount'), 'Any item quantity' => Shopp::__('Any item quantity'), 'Total quantity' => Shopp::__('Total quantity'), 'Shipping amount' => Shopp::__('Shipping amount'), 'Subtotal amount' => Shopp::__('Subtotal amount'), 'Discount amount' => Shopp::__('Discount amount'), 'Customer type' => Shopp::__('Customer type'), 'Ship-to country' => Shopp::__('Ship-to country'), 'Promo code' => Shopp::__('Discount code'), 'Promo use count' => Shopp::__('Discount use count'), 'Discounts applied' => Shopp::__('Discounts applied'), 'Is equal to' => Shopp::__('Is equal to'), 'Is not equal to' => Shopp::__('Is not equal to'), 'Contains' => Shopp::__('Contains'), 'Does not contain' => Shopp::__('Does not contain'), 'Begins with' => Shopp::__('Begins with'), 'Ends with' => Shopp::__('Ends with'), 'Is greater than' => Shopp::__('Is greater than'), 'Is greater than or equal to' => Shopp::__('Is greater than or equal to'), 'Is less than' => Shopp::__('Is less than'), 'Is less than or equal to' => Shopp::__('Is less than or equal to')));
     echo json_encode($rules);
 }
开发者ID:forthrobot,项目名称:inuvik,代码行数:5,代码来源:Discounter.php

示例13:

		<tr class="<?php 
        echo $classes;
        ?>
" rel="<?php 
        echo $Category->slug;
        ?>
">
			<td><button type="button" name="top" alt="<?php 
        $title = Shopp::__('Move to the top&hellip;');
        echo $title;
        ?>
" class="shoppui-step-top"><span class="hidden"><?php 
        echo $title;
        ?>
</span></button><button type="button" name="bottom" alt="<?php 
        $title = Shopp::__('Move to the bottom&hellip;');
        echo $title;
        ?>
" class="shoppui-step-bottom"><span class="hidden"><?php 
        echo $title;
        ?>
</span></button><a class='row-title' href='<?php 
        echo $editurl;
        ?>
' title='<?php 
        _e('Edit', 'Shopp');
        ?>
 &quot;<?php 
        echo $CategoryName;
        ?>
&quot;'><?php 
开发者ID:forthrobot,项目名称:inuvik,代码行数:31,代码来源:arrange.php

示例14: downloads

 public function downloads()
 {
     if (!current_user_can('shopp_settings_checkout')) {
         wp_die(__('You do not have sufficient permissions to access this page.'));
     }
     $downloads = array('1', '2', '3', '5', '10', '15', '25', '100');
     $time = array('1800' => Shopp::__('%d minutes', 30), '3600' => Shopp::__('%d hour', 1), '7200' => Shopp::__('%d hours', 2), '10800' => Shopp::__('%d hours', 3), '21600' => Shopp::__('%d hours', 6), '43200' => Shopp::__('%d hours', 12), '86400' => Shopp::__('%d day', 1), '172800' => Shopp::__('%d days', 2), '259200' => Shopp::__('%d days', 3), '604800' => Shopp::__('%d week', 1), '2678400' => Shopp::__('%d month', 1), '7952400' => Shopp::__('%d months', 3), '15901200' => Shopp::__('%d months', 6), '31536000' => Shopp::__('%d year', 1));
     if (!empty($_POST['save'])) {
         check_admin_referer('shopp-settings-downloads');
         shopp_set_formsettings();
         $this->notice(Shopp::__('Downloads settings saved.'), 'notice', 20);
     }
     include $this->ui('downloads.php');
 }
开发者ID:BlessySoftwares,项目名称:anvelocom,代码行数:14,代码来源:Setup.php

示例15: isset

                    echo $enabled ? ' checked' : '';
                    ?>
" title="<?php 
                    echo $title;
                    ?>
"><span class="hidden"><?php 
                    echo $title;
                    ?>
</div>
					</td>
				<?php 
                    break;
                case 'menus':
                    $classes[] = 'num';
                    $enabled = isset($Category->facetedmenus) && Shopp::str_true($Category->facetedmenus);
                    $title = $enabled ? Shopp::__('Faceted search menus enabled') : '';
                    ?>
					<td width="5%" class="<?php 
                    echo esc_attr(join(' ', $classes));
                    ?>
">
						<div class="checkbox<?php 
                    echo $enabled ? ' checked' : '';
                    ?>
" title="<?php 
                    echo $title;
                    ?>
"><span class="hidden"><?php 
                    echo $title;
                    ?>
</div>
开发者ID:forthrobot,项目名称:inuvik,代码行数:31,代码来源:categories.php


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