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


PHP wpshop_tools::get_template_part方法代码示例

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


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

示例1: ajax_save_product_price

 /**
  * Récupère le pilotage de prix, le nombre de produit avec un prix incohérent, le type de l'entité et la langue de la boutique. 
  * Parcours la tableau de donnée avec la nouvelle valeur des prix par produit incohérent puis met à jour tout les autres prix de 
  * ce produit. Ensuite renvoie le template avec le nombre de prix incohérent qui on été corrigé et le template de la méthode :
  * ajax_checking_products_values si des produits incohérents sont toujours présent. / Get the price piloting, the number of 
  * product with an inconsistent price, type of the entity and the language of the shop. Browse the given table with the new
  * new value pricing of the inconsistent product and updates any other price of this product. Then display the template 
  * of the number of corrected product and the template of the method : ajax_checking_products_values if inconsistent product
  * already present.
  * 
  * @param array $_POST['product_price'] List of the new price for the product like array( $id_product => $new_price )
  * @return JSON Response
  */
 public function ajax_save_product_price()
 {
     header('Content-Type: application/json');
     $response = array();
     $price_piloting_option = get_option('wpshop_shop_price_piloting');
     $inconsistent_product_number = !empty($_POST['product_price']) ? count($_POST['product_price']) : 0;
     $consistent_product_number = 0;
     $entity_type_id = wpshop_entities::get_entity_identifier_from_code(WPSHOP_NEWTYPE_IDENTIFIER_PRODUCT);
     $language = WPSHOP_CURRENT_LOCALE;
     if (!empty($_REQUEST['icl_post_language'])) {
         $query = $wpdb->prepare("SELECT locale FROM " . $wpdb->prefix . "icl_locale_map WHERE code = %s", $_REQUEST['icl_post_language']);
         $language = $wpdb->get_var($query);
     }
     if (!empty($_POST['product_price'])) {
         foreach ($_POST['product_price'] as $product_id => $price) {
             try {
                 if ($price_piloting_option == 'TTC') {
                     wpshop_attributes::saveAttributeForEntity(array('decimal' => array('product_price' => $price)), $entity_type_id, $product_id, $language, 'wpshop_products');
                 } else {
                     wpshop_attributes::saveAttributeForEntity(array('decimal' => array('price_ht' => $price)), $entity_type_id, $product_id, $language, 'wpshop_product');
                 }
                 wpshop_products::calculate_price($product_id);
                 $consistent_product_number++;
             } catch (Exception $e) {
             }
         }
     }
     $response['template_number'] = __(sprintf('Number of processed product : %d/%d', $consistent_product_number, $inconsistent_product_number), 'wps-product');
     $list_product = wps_product_ctr::get_inconsistent_product();
     ob_start();
     require wpshop_tools::get_template_part(WPS_PRODUCT_DIR, WPS_PRODUCT_TEMPLATES_MAIN_DIR, "backend", "product_check_data");
     $response['template'] = ob_get_clean();
     wp_die(json_encode($response));
 }
开发者ID:pronoSoupe,项目名称:pronobo_soupe,代码行数:47,代码来源:wps_product_ajax_ctr.01.php

示例2: display_account_last_actions

 function display_account_last_actions()
 {
     global $wpdb;
     $output = '';
     $user_id = get_current_user_id();
     if (!empty($user_id)) {
         $query = $wpdb->prepare('SELECT * FROM ' . $wpdb->posts . ' WHERE post_type = %s AND post_author = %d', WPSHOP_NEWTYPE_IDENTIFIER_ORDER, $user_id);
         $orders = $wpdb->get_results($query);
         if (!empty($orders)) {
             $orders_list = '';
             foreach ($orders as $order) {
                 $order_meta = get_post_meta($order->ID, '_order_postmeta', true);
                 $order_number = !empty($order_meta) && !empty($order_meta['order_key']) ? $order_meta['order_key'] : '';
                 $order_date = !empty($order_meta) && !empty($order_meta['order_date']) ? mysql2date(get_option('date_format'), $order_meta['order_date'], true) : '';
                 $order_amount = !empty($order_meta) && !empty($order_meta['order_key']) ? wpshop_tools::formate_number($order_meta['order_grand_total']) . ' ' . wpshop_tools::wpshop_get_currency(false) : '';
                 $order_available_status = unserialize(WPSHOP_ORDER_STATUS);
                 $order_status = !empty($order_meta) && !empty($order_meta['order_status']) ? __($order_available_status[$order_meta['order_status']], 'wpshop') : '';
                 ob_start();
                 require wpshop_tools::get_template_part(WPS_ACCOUNT_DIR, WPS_ACCOUNT_PATH . WPS_ACCOUNT_DIR . "/templates/", "frontend", "account/account-dashboard-resume-element");
                 $orders_list .= ob_get_contents();
                 ob_end_clean();
             }
             ob_start();
             require_once wpshop_tools::get_template_part(WPS_ACCOUNT_DIR, WPS_ACCOUNT_PATH . WPS_ACCOUNT_DIR . "/templates/", "frontend", "account/account-dashboard-resume");
             $output = ob_get_contents();
             ob_end_clean();
         }
     }
     return $output;
 }
开发者ID:fedeB-IT-dept,项目名称:fedeB_website,代码行数:30,代码来源:wps_account_dashboard_ctr.php

示例3: help_tab_content

 public function help_tab_content($screen, $tab)
 {
     $id = $tab['id'];
     $title = $tab['callback'][0]->help_tabs[$tab['id']]['title'];
     $content = $tab['callback'][0]->help_tabs[$tab['id']]['content'];
     $pages = $tab['callback'][0]->help_tabs[$tab['id']]['pages'];
     require wpshop_tools::get_template_part(WPS_HELP_DIR, WPS_HELP_TEMPLATES_MAIN_DIR, "backend", "wps_tab_content_tpl");
 }
开发者ID:fedeB-IT-dept,项目名称:fedeB_website,代码行数:8,代码来源:wps_help_tabs_ctr.php

示例4: display_modal

 function display_modal()
 {
     $output = '';
     ob_start();
     require_once wpshop_tools::get_template_part(WPS_MODAL_DIR, $this->template_dir, "frontend", "modal");
     $output = ob_get_contents();
     ob_end_clean();
     echo $output;
 }
开发者ID:fedeB-IT-dept,项目名称:fedeB_website,代码行数:9,代码来源:wps-modal.php

示例5: customer_creation

 /**
  * AJAX - Charge le fomulaire d'ajout rapide d'un client / Load the form for new customer quick add
  */
 function customer_creation()
 {
     check_ajax_referer('wps-customer-quick-nonce', 'wps-nonce');
     global $wpdb;
     $customer_entity_type_id = wpshop_entities::get_entity_identifier_from_code(WPSHOP_NEWTYPE_IDENTIFIER_CUSTOMERS);
     $query = $wpdb->prepare("SELECT ID FROM {$wpdb->posts} WHERE post_type = %s AND post_author = %d", WPSHOP_NEWTYPE_IDENTIFIER_CUSTOMERS, get_current_user_id());
     $cid = $wpdb->get_var($query);
     $customer_attribute_set = !empty($_GET) && !empty($_GET['customer_set_id']) ? $_GET['customer_set_id'] : null;
     $customer_attributes = wpshop_attributes_set::getAttributeSetDetails($customer_attribute_set, "'valid'");
     require_once wpshop_tools::get_template_part(WPSCLTQUICK_DIR, WPSCLTQUICK_TEMPLATES_MAIN_DIR, "backend", "customer", "creation");
     wp_die();
 }
开发者ID:pronoSoupe,项目名称:pronobo_soupe,代码行数:15,代码来源:wps_customer_quick_add.ctr.php

示例6: alphabet_letters

 /**
  * DISPLAY / Affichage - Display all letter buttons for element choice / Affiche les lettres de l'alphabet pour lister les éléments existants
  *
  * @param string $type The type of element to display alphabet for / Le type d'élément pour lequel on va afficher l'alphabet
  *
  * @return string The alphabet letter button / Les bouttons affichant les lettres de l'alphabet
  */
 public static function alphabet_letters($type = 'customer', $available_letters = array(), $chosen_letter = '')
 {
     global $wpdb;
     $alphabet = unserialize(WPSPOS_ALPHABET_LETTERS);
     $alphabet_interface = '';
     foreach ($alphabet as $alpha) {
         ob_start();
         require wpshop_tools::get_template_part(WPSPOS_DIR, WPSPOS_TEMPLATES_MAIN_DIR, 'backend', 'alphabet', 'letters');
         $alphabet_interface .= ob_get_contents();
         ob_end_clean();
     }
     return $alphabet_interface;
 }
开发者ID:fedeB-IT-dept,项目名称:fedeB_website,代码行数:20,代码来源:wps-pos-tools.php

示例7: display_discount_chip

 /**
  * Display Discount Chip
  * @param array $args
  * @return string
  */
 function display_discount_chip($args)
 {
     $output = '';
     if (!empty($args) && !empty($args['pid'])) {
         $wps_price = new wpshop_prices();
         $discount_data = wpshop_prices::check_discount_for_product($args['pid']);
         if (!empty($discount_data)) {
             ob_start();
             require wpshop_tools::get_template_part(WPS_PRODUCT_DIR, WPS_PRODUCT_TEMPLATES_MAIN_DIR, "frontend", "product_discount_chip");
             $output = ob_get_contents();
             ob_end_clean();
         }
     }
     return $output;
 }
开发者ID:pronoSoupe,项目名称:pronobo_soupe,代码行数:20,代码来源:wps_product_ctr.php

示例8: wp_ajax_display_pictures_in_backend

 /**
  * AJAX - Display pictures in backend panel
  */
 function wp_ajax_display_pictures_in_backend()
 {
     $status = true;
     $response = '';
     $media_indicator = !empty($_POST['media_id']) ? $_POST['media_id'] : null;
     if (!empty($media_indicator)) {
         $media_id = explode(',', $media_indicator);
         if (!empty($media_id)) {
             ob_start();
             require wpshop_tools::get_template_part(WPS_MEDIA_MANAGER_DIR, $this->template_dir, "backend", "media_list");
             $response = ob_get_contents();
             ob_end_clean();
         }
     }
     echo json_encode(array('status' => $status, 'response' => $response));
     wp_die();
 }
开发者ID:fedeB-IT-dept,项目名称:fedeB_website,代码行数:20,代码来源:wps_media_manager_backend_ctr.php

示例9: generate_product_sheet_datas

 /**
  * Generate product sheet datas
  *
  * @param integer $product_id THe product identifier to generate the sheet for
  *
  * @return string
  */
 function generate_product_sheet_datas($product_id)
 {
     $product = get_post($product_id);
     $shop_type = get_option('wpshop_shop_type');
     $product_price_data = get_post_meta($product_id, '_wps_price_infos', true);
     // Attributes Def
     $product_atts_def = $this->get_product_atts_def($product_id);
     // Attach CSS datas
     ob_start();
     require wpshop_tools::get_template_part(WPS_PRODUCT_DIR, WPS_PRODUCT_TEMPLATES_MAIN_DIR, "backend", "product_sheet_datas_style");
     $output = ob_get_contents();
     ob_end_clean();
     ob_start();
     require wpshop_tools::get_template_part(WPS_PRODUCT_DIR, WPS_PRODUCT_TEMPLATES_MAIN_DIR, "backend", "product_sheet");
     $output .= ob_get_contents();
     ob_end_clean();
     return $output;
 }
开发者ID:fedeB-IT-dept,项目名称:fedeB_website,代码行数:25,代码来源:wps_product_administration_ctr.php

示例10: display_customer_address_in_order

 /**
  * Display address in customer informations panel
  * @param integer $customer_id
  * @param integre $order_id
  * @param integer $address_type
  * @return string
  */
 function display_customer_address_in_order($customer_id, $order_id, $address_type)
 {
     $output = '';
     if (!empty($customer_id) && !empty($order_id) && !empty($address_type)) {
         $order_infos = get_post_meta($order_id, '_order_info', true);
         $order_metadata = get_post_meta($order_id, '_order_postmeta', true);
         $billing_address_option = get_option('wpshop_billing_address');
         $address_type_indicator = !empty($billing_address_option) && !empty($billing_address_option['choice']) && $billing_address_option['choice'] == $address_type ? 'billing' : 'shipping';
         // Freeze Address display
         $address_informations = !empty($order_infos) && is_array($order_infos) && !empty($order_infos[$address_type_indicator]) && !empty($order_infos[$address_type_indicator]['address']) ? $order_infos[$address_type_indicator]['address'] : '';
         $address_content = !empty($address_informations) && !empty($order_infos[$address_type_indicator]['id']) ? wps_address::display_an_address($address_informations, '', $order_infos[$address_type_indicator]['id']) : '';
         ob_start();
         require wpshop_tools::get_template_part(WPS_ADDRESS_DIR, WPS_LOCALISATION_TEMPLATES_MAIN_DIR, "backend", "freeze-address-admin-display");
         $output = ob_get_contents();
         ob_end_clean();
     }
     return $output;
 }
开发者ID:pronoSoupe,项目名称:pronobo_soupe,代码行数:25,代码来源:wps_address_admin_ctr.php

示例11: _e

		<h2><?php 
_e('WP-Shop POS Software', 'wps-pos-i18n');
?>
 <a class="add-new-h2" href="<?php 
echo admin_url('admin.php?page=wps-pos&new_order=yes');
?>
"><?php 
_e('Create a new order', 'wps-pos-i18n');
?>
</a></h2>
	<!-- 	<div class="wpspos-main-actions-buttons-container" ><?php 
require_once wpshop_tools::get_template_part(WPSPOS_DIR, WPSPOS_TEMPLATES_MAIN_DIR, 'backend', 'pos', 'top_button');
?>
</div> -->
		<?php 
require_once wpshop_tools::get_template_part(WPSPOS_DIR, WPSPOS_TEMPLATES_MAIN_DIR, 'backend', 'tab_pos');
?>
	</div>

	<div id="wpspos-dashboard-widgetswrap" class="metabox-holder" ><?php 
/**	Create nonce for metabox order saving securisation	*/
wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false);
/**	Create nonce for metabox order saving securisation	*/
wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false);
/**	Call the different fonction to add meta boxes on dashboard	*/
do_meta_boxes('wpspos-dashboard', 'wpspos-dashboard-summary', null);
?>
		<div class="wpspos-dashboard-contents wpspos-current-step-<?php 
echo $current_step;
?>
" >
开发者ID:pronoSoupe,项目名称:pronobo_soupe,代码行数:31,代码来源:pos.php

示例12: wpshop_rss_tutorial_videos

 function wpshop_rss_tutorial_videos()
 {
     $ini_get_checking = ini_get('allow_url_fopen');
     if ($ini_get_checking != 0) {
         $content = @file_get_contents('http://www.wpshop.fr/rss_video.xml');
         $videos_rss = $content !== false ? new SimpleXmlElement($content) : null;
         if (!empty($videos_rss) && !empty($videos_rss->channel)) {
             $videos_items = array();
             foreach ($videos_rss->channel->item as $i => $item) {
                 $videos_items[] = $item;
             }
             $rand_element = array_rand($videos_items);
             ob_start();
             require_once wpshop_tools::get_template_part(WPS_DASHBOARD_DIR, WPSDASHBOARD_TPL_DIR, "backend", "dashboard", "videos");
             $output = ob_get_contents();
             ob_end_clean();
         } else {
             $output = __('No tutorial videos can be loaded', 'wpshop');
         }
     } else {
         $output = __('Your servor doesn\'t allow to open external files', 'wpshop');
     }
     echo $output;
 }
开发者ID:fedeB-IT-dept,项目名称:fedeB_website,代码行数:24,代码来源:wps_dashboard_ctr.php

示例13: display_payment_modes

 function display_payment_modes()
 {
     $output = '';
     $payment_modes = get_option('wps_payment_mode');
     if (!empty($payment_modes) && !empty($payment_modes['mode'])) {
         $default_choice = !empty($payment_modes['default_choice']) ? $payment_modes['default_choice'] : '';
         $payment_modes = $payment_modes['mode'];
         $tmp_array = array();
         foreach ($payment_modes as $payment_mode_id => $payment_mode) {
             if (!empty($payment_mode['active'])) {
                 $tmp_array[$payment_mode_id] = $payment_mode;
             }
         }
         $payment_modes = apply_filters('wps-paymentmode-filter', $tmp_array);
         ob_start();
         require_once wpshop_tools::get_template_part(WPS_PAYMENT_MODE_DIR, $this->template_dir, "frontend", "payment-modes");
         $output = ob_get_contents();
         ob_end_clean();
     }
     return $output;
 }
开发者ID:fedeB-IT-dept,项目名称:fedeB_website,代码行数:21,代码来源:wps_payment_mode.php

示例14: display_highlightings

 function display_highlightings($args)
 {
     $output = $highlightings = '';
     if (!empty($args) && !empty($args['hook_name'])) {
         $datas = $this->get_data_for_hook($args['hook_name']);
         //Display in Template
         if (!empty($datas)) {
             foreach ($datas as $data) {
                 ob_start();
                 require wpshop_tools::get_template_part(WPS_HIGHLIGHTING_DIR, $this->template_dir, "frontend", "highlighting");
                 $highlightings .= ob_get_contents();
                 ob_end_clean();
             }
         }
     }
     return $highlightings;
 }
开发者ID:pronoSoupe,项目名称:pronobo_soupe,代码行数:17,代码来源:wps_highlighting_ctr.php

示例15:

<div class="wps-address-list-container" >
	<?php 
require wpshop_tools::get_template_part(WPS_ADDRESS_DIR, WPS_LOCALISATION_TEMPLATES_MAIN_DIR, "backend", "addresses");
?>
</div>
<a href="#" class="alignright wps-address-icon-black wps-address-icon-add" id="wps-address-add-for-<?php 
echo $post->ID;
?>
" ></a>
<div class="clear" ></div>
开发者ID:fedeB-IT-dept,项目名称:fedeB_website,代码行数:10,代码来源:address-metabox.php


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