當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。