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


PHP Lookup::customer_types方法代码示例

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


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

示例1: settings_meta_box

function settings_meta_box($Customer)
{
    ?>
	<p>
		<span>
		<input type="hidden" name="marketing" value="no" />
		<input type="checkbox" id="marketing" name="marketing" value="yes"<?php 
    echo $Customer->marketing == 'yes' ? ' checked="checked"' : '';
    ?>
/>
		<label for="marketing" class="inline">&nbsp;<?php 
    _e('Subscribes to marketing', 'Shopp');
    ?>
</label>
		</span>
	</p>
	<br class="clear" />
	<p>
		<span>
		<select name="type"><?php 
    echo Shopp::menuoptions(Lookup::customer_types(), $Customer->type);
    ?>
</select>
		<label for="type"><?php 
    _e('Customer Type', 'Shopp');
    ?>
</label>
		</span>
	</p>
	<br class="clear" />
	<?php 
    do_action('shopp_customer_editor_settings', $Customer);
}
开发者ID:BlessySoftwares,项目名称:anvelocom,代码行数:33,代码来源:ui.php

示例2: suggestions

 public function suggestions()
 {
     check_admin_referer('wp_ajax_shopp_suggestions');
     if (isset($_GET['t'])) {
         // @legacy
         switch ($_GET['t']) {
             case "product-name":
                 $_GET['s'] = 'shopp_products';
                 break;
             case "product-tags":
                 $_GET['s'] = 'shopp_tag';
                 break;
             case "product-category":
                 $_GET['s'] = 'shopp_category';
                 break;
             case "customer-type":
                 $_GET['s'] = 'shopp_customer_types';
                 break;
         }
     }
     if (isset($_GET['s'])) {
         global $wpdb;
         $source = strtolower($_GET['s']);
         $q = $_GET['q'];
         $orderlimit = '';
         do_action('shopp_suggestions_from_' . $source);
         $joins = $where = array();
         switch ($source) {
             case 'wp_posts':
                 $id = 'ID';
                 $name = 'post_title';
                 $table = $wpdb->posts;
                 $where[] = "post_type='post'";
                 break;
             case 'wp_pages':
                 $id = 'ID';
                 $name = 'post_title';
                 $table = $wpdb->posts;
                 $where[] = "post_type='page'";
                 break;
             case 'wp_categories':
                 $id = 't.term_id';
                 $name = 'name';
                 $table = "{$wpdb->terms} AS t";
                 $joins[] = "INNER JOIN  {$wpdb->term_taxonomy} AS tt ON tt.term_id = t.term_id";
                 $where[] = "tt.taxonomy = 'category'";
                 break;
             case 'wp_tags':
                 $id = 't.term_id';
                 $name = 'name';
                 $table = "{$wpdb->terms} AS t";
                 $joins[] = "INNER JOIN  {$wpdb->term_taxonomy} AS tt ON tt.term_id = t.term_id";
                 $where[] = "tt.taxonomy = 'post_tag'";
                 break;
             case 'wp_media':
                 $id = 'ID';
                 $name = 'post_title';
                 $table = $wpdb->posts;
                 $where[] = "post_type='attachment'";
                 break;
             case 'wp_users':
                 $id = 'ID';
                 $name = 'user_login';
                 $table = $wpdb->users;
                 break;
             case 'shopp_memberships':
                 $id = 'id';
                 $name = 'name';
                 $table = ShoppDatabaseObject::tablename('meta');
                 $where[] = "context='membership'";
                 $where[] = "type='membership'";
                 break;
             case 'shopp_products':
                 $id = 'ID';
                 $name = 'post_title';
                 $table = $wpdb->posts;
                 $where[] = "post_type='" . ShoppProduct::$posttype . "'";
                 break;
             case 'shopp_promotions':
                 $id = 'id';
                 $name = 'name';
                 $table = ShoppDatabaseObject::tablename(ShoppPromo::$table);
                 break;
             case 'shopp_downloads':
                 $id = 'id';
                 $name = 'name';
                 $table = ShoppDatabaseObject::tablename('meta');
                 $where[] = "context='price'";
                 $where[] = "type='download'";
                 break;
             case 'shopp_target_markets':
                 $markets = shopp_setting('target_markets');
                 $results = array();
                 foreach ($markets as $id => $market) {
                     if (strpos(strtolower($market), strtolower($_GET['q'])) !== false) {
                         $_ = new StdClass();
                         $_->id = $id;
                         $_->name = stripslashes($market);
                         $results[] = $_;
                     }
//.........这里部分代码省略.........
开发者ID:msigley,项目名称:shopp,代码行数:101,代码来源:Ajax.php

示例3: _e

<p class="clearfix">
	<span>
	<input type="hidden" name="marketing" value="no" />
	<input type="checkbox" id="marketing" name="marketing" value="yes"<?php 
echo $Customer->marketing == 'yes' ? ' checked="checked"' : '';
?>
/>
	<label for="marketing" class="inline">&nbsp;<?php 
_e('Subscribes to marketing', 'Shopp');
?>
</label>
	</span>
</p>
<p class="clearfix">
	<span>
	<label for="customer-type"><?php 
_e('Customer Type', 'Shopp');
?>
</label>
	<select id="customer-type" name="type"><?php 
echo Shopp::menuoptions(Lookup::customer_types(), $Customer->type);
?>
</select>
	</span>
</p>
开发者ID:forthrobot,项目名称:inuvik,代码行数:25,代码来源:settings.php

示例4: suggestions

	function suggestions () {
		check_admin_referer('wp_ajax_ecart_suggestions');
		$db = DB::get();

		switch($_GET['t']) {
			case "product-name": $table = DatabaseObject::tablename(Product::$table); break;
			case "product-tags": $table = DatabaseObject::tablename(Tag::$table); break;
			case "product-category": $table = DatabaseObject::tablename(Category::$table); break;
			case "customer-type":
				$types = Lookup::customer_types();
				$results = array();
				foreach ($types as $type)
					if (strpos(strtolower($type),strtolower($_GET['q'])) !== false) $results[] = $type;
				echo join("\n",$results);
				exit();
				break;
		}

		$entries = $db->query("SELECT name FROM $table WHERE name LIKE '%{$_GET['q']}%'",AS_ARRAY);
		$results = array();
		foreach ($entries as $entry) $results[] = $entry->name;
		echo join("\n",$results);
		exit();
	}
开发者ID:robbiespire,项目名称:paQui,代码行数:24,代码来源:Ajax.php


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