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


PHP jigoshop_price函数代码示例

本文整理汇总了PHP中jigoshop_price函数的典型用法代码示例。如果您正苦于以下问题:PHP jigoshop_price函数的具体用法?PHP jigoshop_price怎么用?PHP jigoshop_price使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: get_chart_legend

 /**
  * Get the legend for the main chart sidebar
  *
  * @return array
  */
 public function get_chart_legend()
 {
     $legend = array();
     $data = $this->get_report_data();
     switch ($this->chart_groupby) {
         case 'hour':
             /** @noinspection PhpUndefinedFieldInspection */
             $average_sales_title = sprintf(__('%s average sales per hour', 'jigoshop'), '<strong>' . jigoshop_price($data->average_sales) . '</strong>');
             break;
         case 'day':
             /** @noinspection PhpUndefinedFieldInspection */
             $average_sales_title = sprintf(__('%s average daily sales', 'jigoshop'), '<strong>' . jigoshop_price($data->average_sales) . '</strong>');
             break;
         case 'month':
         default:
             /** @noinspection PhpUndefinedFieldInspection */
             $average_sales_title = sprintf(__('%s average monthly sales', 'jigoshop'), '<strong>' . jigoshop_price($data->average_sales) . '</strong>');
             break;
     }
     /** @noinspection PhpUndefinedFieldInspection */
     $legend[] = array('title' => sprintf(__('%s gross sales in this period', 'jigoshop'), '<strong>' . jigoshop_price($data->total_sales) . '</strong>'), 'placeholder' => __('This is the sum of the order totals including shipping and taxes.', 'jigoshop'), 'color' => $this->chart_colours['sales_amount'], 'highlight_series' => 5);
     /** @noinspection PhpUndefinedFieldInspection */
     $legend[] = array('title' => sprintf(__('%s net sales in this period', 'jigoshop'), '<strong>' . jigoshop_price($data->net_sales) . '</strong>'), 'placeholder' => __('This is the sum of the order totals excluding shipping and taxes.', 'jigoshop'), 'color' => $this->chart_colours['net_sales_amount'], 'highlight_series' => 6);
     $legend[] = array('title' => $average_sales_title, 'color' => $this->chart_colours['average'], 'highlight_series' => 2);
     /** @noinspection PhpUndefinedFieldInspection */
     $legend[] = array('title' => sprintf(__('%s orders placed', 'jigoshop'), '<strong>' . $data->total_orders . '</strong>'), 'color' => $this->chart_colours['order_count'], 'highlight_series' => 1);
     /** @noinspection PhpUndefinedFieldInspection */
     $legend[] = array('title' => sprintf(__('%s items purchased', 'jigoshop'), '<strong>' . $data->total_items . '</strong>'), 'color' => $this->chart_colours['item_count'], 'highlight_series' => 0);
     /** @noinspection PhpUndefinedFieldInspection */
     $legend[] = array('title' => sprintf(__('%s charged for shipping', 'jigoshop'), '<strong>' . jigoshop_price($data->total_shipping) . '</strong>'), 'color' => $this->chart_colours['shipping_amount'], 'highlight_series' => 4);
     /** @noinspection PhpUndefinedFieldInspection */
     $legend[] = array('title' => sprintf(__('%s worth of coupons used', 'jigoshop'), '<strong>' . jigoshop_price($data->total_coupons) . '</strong>'), 'color' => $this->chart_colours['coupon_amount'], 'highlight_series' => 3);
     return $legend;
 }
开发者ID:ashik968,项目名称:digiplot,代码行数:39,代码来源:sales-by-date.class.php

示例2: widget

 /**
  * Widget
  * Display the widget in the sidebar
  * Save output to the cache if empty
  *
  * @param  array  sidebar arguments
  * @param  array  instance
  */
 public function widget($args, $instance)
 {
     // Hide widget if page is the cart or checkout
     if (is_cart() || is_checkout()) {
         return false;
     }
     extract($args);
     // Set the widget title
     $title = apply_filters('widget_title', $instance['title'] ? $instance['title'] : __('Cart', 'jigoshop'), $instance, $this->id_base);
     // Print the widget wrapper & title
     echo $before_widget;
     if ($title) {
         echo $before_title . $title . $after_title;
     }
     // Get the contents of the cart
     $cart_contents = jigoshop_cart::$cart_contents;
     // If there are items in the cart print out a list of products
     if (!empty($cart_contents)) {
         // Open the list
         echo '<ul class="cart_list">';
         foreach ($cart_contents as $key => $value) {
             // Get product instance
             $_product = $value['data'];
             if ($_product->exists() && $value['quantity'] > 0) {
                 echo '<li>';
                 // Print the product image & title with a link to the permalink
                 echo '<a href="' . esc_attr(get_permalink($_product->id)) . '" title="' . esc_attr($_product->get_title()) . '">';
                 // Print the product thumbnail image if exists else display placeholder
                 echo has_post_thumbnail($_product->id) ? get_the_post_thumbnail($_product->id, 'shop_tiny') : jigoshop_get_image_placeholder('shop_tiny');
                 // Print the product title
                 echo '<span class="js_widget_product_title">' . $_product->get_title() . '</span>';
                 echo '</a>';
                 // Displays variations and cart item meta
                 echo jigoshop_cart::get_item_data($value);
                 // Print the quantity & price per product
                 echo '<span class="js_widget_product_price">' . $value['quantity'] . ' &times; ' . $_product->get_price_html() . '</span>';
                 echo '</li>';
             }
         }
         echo '</ul>';
         // Close the list
         // Print the cart total
         echo '<p class="total"><strong>';
         echo __('Subtotal', 'jigoshop');
         echo ':</strong> ' . jigoshop_price($this->total_cart_items());
         echo '</p>';
         do_action('jigoshop_widget_cart_before_buttons');
         // Print view cart & checkout buttons
         $view_cart_button_label = isset($instance['view_cart_button']) ? $instance['view_cart_button'] : __('View Cart &rarr;', 'jigoshop');
         $checkout_button_label = isset($instance['checkout_button']) ? $instance['checkout_button'] : __('Checkout &rarr;', 'jigoshop');
         echo '<p class="buttons">';
         echo '<a href="' . esc_attr(jigoshop_cart::get_cart_url()) . '" class="button">' . __($view_cart_button_label, 'jigoshop') . '</a>';
         echo '<a href="' . esc_attr(jigoshop_cart::get_checkout_url()) . '" class="button checkout">' . __($checkout_button_label, 'jigoshop') . '</a>';
         echo '</p>';
     } else {
         echo '<span class="empty">' . __('No products in the cart.', 'jigoshop') . '</span>';
     }
     // Print closing widget wrapper
     echo $after_widget;
 }
开发者ID:ashik968,项目名称:digiplot,代码行数:68,代码来源:cart.php

示例3: menu_item

 public function menu_item()
 {
     $total = 0;
     if (!empty(jigoshop_cart::$cart_contents)) {
         foreach (jigoshop_cart::$cart_contents as $cart_item_key => $values) {
             $product = $values['data'];
             $total += $product->get_price() * $values['quantity'];
         }
     }
     $total = jigoshop_price($total);
     $menu_item = array('cart_url' => jigoshop_cart::get_cart_url(), 'shop_page_url' => get_permalink(jigoshop_get_page_id('shop')), 'cart_contents_count' => jigoshop_cart::$cart_contents_count, 'cart_total' => $total);
     return $menu_item;
 }
开发者ID:alexwonderwood,项目名称:leir,代码行数:13,代码来源:wpmenucart-jigoshop.php

示例4: get_order_email_arguments

function get_order_email_arguments($order_id)
{
    $options = Jigoshop_Base::get_options();
    $order = new jigoshop_order($order_id);
    $inc_tax = $options->get('jigoshop_calc_taxes') == 'no' || $options->get('jigoshop_prices_include_tax') == 'yes';
    $can_show_links = $order->status == 'completed' || $order->status == 'processing';
    $statuses = $order->get_order_statuses_and_names();
    $variables = array('blog_name' => get_bloginfo('name'), 'order_number' => $order->get_order_number(), 'order_date' => date_i18n(get_option('date_format')), 'order_status' => $statuses[$order->status], 'shop_name' => $options->get('jigoshop_company_name'), 'shop_address_1' => $options->get('jigoshop_address_1'), 'shop_address_2' => $options->get('jigoshop_address_2'), 'shop_tax_number' => $options->get('jigoshop_tax_number'), 'shop_phone' => $options->get('jigoshop_company_phone'), 'shop_email' => $options->get('jigoshop_company_email'), 'customer_note' => $order->customer_note, 'order_items_table' => jigoshop_get_order_items_table($order, $can_show_links, true, $inc_tax), 'order_items' => $order->email_order_items_list($can_show_links, true, $inc_tax), 'order_taxes' => jigoshop_get_order_taxes_list($order), 'subtotal' => $order->get_subtotal_to_display(), 'shipping' => $order->get_shipping_to_display(), 'shipping_cost' => jigoshop_price($order->order_shipping), 'shipping_method' => $order->shipping_service, 'discount' => jigoshop_price($order->order_discount), 'applied_coupons' => jigoshop_get_order_coupon_list($order), 'total_tax' => jigoshop_price($order->get_total_tax()), 'total' => jigoshop_price($order->order_total), 'is_local_pickup' => $order->shipping_method == 'local_pickup' ? true : null, 'checkout_url' => $order->status == 'pending' ? $order->get_checkout_payment_url() : null, 'payment_method' => $order->payment_method_title, 'is_bank_transfer' => $order->payment_method == 'bank_transfer' ? true : null, 'is_cash_on_delivery' => $order->payment_method == 'cod' ? true : null, 'is_cheque' => $order->payment_method == 'cheque' ? true : null, 'bank_info' => str_replace(PHP_EOL, '', jigoshop_bank_transfer::get_bank_details()), 'cheque_info' => str_replace(PHP_EOL, '', $options->get('jigoshop_cheque_description')), 'billing_first_name' => $order->billing_first_name, 'billing_last_name' => $order->billing_last_name, 'billing_company' => $order->billing_company, 'billing_euvatno' => $order->billing_euvatno, 'billing_address_1' => $order->billing_address_1, 'billing_address_2' => $order->billing_address_2, 'billing_postcode' => $order->billing_postcode, 'billing_city' => $order->billing_city, 'billing_country' => jigoshop_countries::get_country($order->billing_country), 'billing_state' => strlen($order->billing_state) == 2 ? jigoshop_countries::get_state($order->billing_country, $order->billing_state) : $order->billing_state, 'billing_country_raw' => $order->billing_country, 'billing state_raw' => $order->billing_state, 'billing_email' => $order->billing_email, 'billing_phone' => $order->billing_phone, 'shipping_first_name' => $order->shipping_first_name, 'shipping_last_name' => $order->shipping_last_name, 'shipping_company' => $order->shipping_company, 'shipping_address_1' => $order->shipping_address_1, 'shipping_address_2' => $order->shipping_address_2, 'shipping_postcode' => $order->shipping_postcode, 'shipping_city' => $order->shipping_city, 'shipping_country' => jigoshop_countries::get_country($order->shipping_country), 'shipping_state' => strlen($order->shipping_state) == 2 ? jigoshop_countries::get_state($order->shipping_country, $order->shipping_state) : $order->shipping_state, 'shipping_country_raw' => $order->shipping_country, 'shipping_state_raw' => $order->shipping_state);
    if ($options->get('jigoshop_calc_taxes') == 'yes') {
        $variables['all_tax_classes'] = $variables['order_taxes'];
    } else {
        unset($variables['order_taxes']);
    }
    return apply_filters('jigoshop_order_email_variables', $variables, $order_id);
}
开发者ID:ashik968,项目名称:digiplot,代码行数:15,代码来源:jigoshop_emails.php

示例5: widget

 /** @see WP_Widget::widget */
 function widget($args, $instance)
 {
     if (is_cart()) {
         return;
     }
     extract($args);
     if (!empty($instance['title'])) {
         $title = $instance['title'];
     } else {
         $title = __('Cart', 'jigoshop');
     }
     $title = apply_filters('widget_title', $title, $instance, $this->id_base);
     echo $before_widget;
     if ($title) {
         echo $before_title . $title . $after_title;
     }
     echo '<ul class="cart_list">';
     if (sizeof(jigoshop_cart::$cart_contents) > 0) {
         foreach (jigoshop_cart::$cart_contents as $item_id => $values) {
             $_product = $values['data'];
             if ($_product->exists() && $values['quantity'] > 0) {
                 echo '<li><a href="' . get_permalink($item_id) . '">';
                 if (has_post_thumbnail($item_id)) {
                     echo get_the_post_thumbnail($item_id, 'shop_tiny');
                 } else {
                     echo '<img src="' . jigoshop::plugin_url() . '/assets/images/placeholder.png" alt="Placeholder" width="' . jigoshop::get_var('shop_tiny_w') . '" height="' . jigoshop::get_var('shop_tiny_h') . '" />';
                 }
                 echo apply_filters('jigoshop_cart_widget_product_title', $_product->get_title(), $_product) . '</a> ' . $values['quantity'] . ' &times; ' . jigoshop_price($_product->get_price()) . '</li>';
             }
         }
     } else {
         echo '<li class="empty">' . __('No products in the cart.', 'jigoshop') . '</li>';
     }
     echo '</ul>';
     if (sizeof(jigoshop_cart::$cart_contents) > 0) {
         echo '<p class="total"><strong>';
         if (get_option('js_prices_include_tax') == 'yes') {
             _e('Total', 'jigoshop');
         } else {
             _e('Subtotal', 'jigoshop');
         }
         echo ':</strong> ' . jigoshop_cart::get_cart_total();
         echo '</p>';
         do_action('jigoshop_widget_shopping_cart_before_buttons');
         echo '<p class="buttons"><a href="' . jigoshop_cart::get_cart_url() . '" class="button">' . __('View Cart &rarr;', 'jigoshop') . '</a> <a href="' . jigoshop_cart::get_checkout_url() . '" class="button checkout">' . __('Checkout &rarr;', 'jigoshop') . '</a></p>';
     }
     echo $after_widget;
 }
开发者ID:kdzwinel,项目名称:Jigoshop,代码行数:49,代码来源:cart.php

示例6: jigoshop_thankyou

/**
 * Outputs the thankyou page
 **/
function jigoshop_thankyou() {
	
	_e('<p>Thank you. Your order has been processed successfully.</p>', 'jigoshop');	

	// Pay for order after checkout step
	if (isset($_GET['order'])) $order_id = $_GET['order']; else $order_id = 0;
	if (isset($_GET['key'])) $order_key = $_GET['key']; else $order_key = '';
	
	if ($order_id > 0) :
	
		$order = &new jigoshop_order( $order_id );
		
		if ($order->order_key == $order_key) :
	
			?>
			<ul class="order_details">
				<li class="order">
					<?php _e('Order:', 'jigoshop'); ?>
					<strong># <?php echo $order->id; ?></strong>
				</li>
				<li class="date">
					<?php _e('Date:', 'jigoshop'); ?>
					<strong><?php echo date(get_option('date_format'), strtotime($order->order_date)); ?></strong>
				</li>
				<li class="total">
					<?php _e('Total:', 'jigoshop'); ?>
					<strong><?php echo jigoshop_price($order->order_total); ?></strong>
				</li>
				<li class="method">
					<?php _e('Payment method:', 'jigoshop'); ?>
					<strong><?php 
						$gateways = jigoshop_payment_gateways::payment_gateways();
						if (isset($gateways[$order->payment_method])) echo $gateways[$order->payment_method]->title;
						else echo $order->payment_method; 
					?></strong>
				</li>
			</ul>
			<div class="clear"></div>
			<?php
			
			do_action( 'thankyou_' . $order->payment_method, $order_id );
			
		endif;
		
	endif;
	
}
开发者ID:rszczypka,项目名称:jigoshop,代码行数:50,代码来源:thankyou.php

示例7: sales_sparkline

 /**
  * Prepares a sparkline to show sales in the last X days
  *
  * @param  int|string $id ID of the product to show. Blank to get all orders.
  * @param  int $days Days of stats to get.
  * @param  string $type Type of sparkline to get. Ignored if ID is not set.
  * @return string
  */
 public function sales_sparkline($id = '', $days = 7, $type = 'sales')
 {
     if ($id) {
         $meta_key = $type == 'sales' ? '_line_total' : '_qty';
         $data = $this->get_order_report_data(array('data' => array('_product_id' => array('type' => 'order_item_meta', 'order_item_type' => 'line_item', 'function' => '', 'name' => 'product_id'), $meta_key => array('type' => 'order_item_meta', 'order_item_type' => 'line_item', 'function' => 'SUM', 'name' => 'sparkline_value'), 'post_date' => array('type' => 'post_data', 'function' => '', 'name' => 'post_date')), 'where' => array(array('key' => 'post_date', 'value' => date('Y-m-d', strtotime('midnight -' . ($days - 1) . ' days', current_time('timestamp'))), 'operator' => '>'), array('key' => 'ID', 'value' => $id, 'operator' => '=')), 'group_by' => 'YEAR(posts.post_date), MONTH(posts.post_date), DAY(posts.post_date)', 'query_type' => 'get_results', 'filter_range' => false));
     } else {
         $data = $this->get_order_report_data(array('data' => array('_order_total' => array('type' => 'meta', 'function' => 'SUM', 'name' => 'sparkline_value'), 'post_date' => array('type' => 'post_data', 'function' => '', 'name' => 'post_date')), 'where' => array(array('key' => 'post_date', 'value' => date('Y-m-d', strtotime('midnight -' . ($days - 1) . ' days', current_time('timestamp'))), 'operator' => '>')), 'group_by' => 'YEAR(posts.post_date), MONTH(posts.post_date), DAY(posts.post_date)', 'query_type' => 'get_results', 'filter_range' => false));
     }
     $total = 0;
     foreach ($data as $d) {
         $total += $d->sparkline_value;
     }
     if ($type == 'sales') {
         $tooltip = sprintf(__('Sold %s worth in the last %d days', 'jigoshop'), strip_tags(jigoshop_price($total)), $days);
     } else {
         $tooltip = sprintf(_n('Sold 1 item in the last %d days', 'Sold %d items in the last %d days', $total, 'jigoshop'), $total, $days);
     }
     $sparkline_data = array_values($this->prepare_chart_data($data, 'post_date', 'sparkline_value', $days - 1, strtotime('midnight -' . ($days - 1) . ' days', current_time('timestamp')), 'day'));
     return '<span class="jigoshop_sparkline ' . ($type == 'sales' ? 'lines' : 'bars') . ' tips" data-color="#777" data-tip="' . esc_attr($tooltip) . '" data-barwidth="' . 60 * 60 * 16 * 1000 . '" data-sparkline="' . esc_attr(json_encode($sparkline_data)) . '"></span>';
 }
开发者ID:ashik968,项目名称:digiplot,代码行数:28,代码来源:admin-report.class.php

示例8: get_chart_legend

 /**
  * Get the legend for the main chart sidebar
  *
  * @return array
  */
 public function get_chart_legend()
 {
     if (!$this->show_categories) {
         return array();
     }
     $legend = array();
     $index = 0;
     foreach ($this->show_categories as $category) {
         $category = get_term($category, 'product_cat');
         $total = 0;
         $product_ids = $this->get_products_in_category($category->term_id);
         foreach ($product_ids as $id) {
             if (isset($this->item_sales[$id])) {
                 $total += $this->item_sales[$id];
             }
         }
         $legend[] = array('title' => sprintf(__('%s sales in %s', 'jigoshop'), '<strong>' . jigoshop_price($total) . '</strong>', $category->name), 'color' => isset($this->chart_colours[$index]) ? $this->chart_colours[$index] : $this->chart_colours[0], 'highlight_series' => $index);
         $index++;
     }
     return $legend;
 }
开发者ID:ashik968,项目名称:digiplot,代码行数:26,代码来源:sales-by-category.class.php

示例9: apply_filters

            if ($options->get('jigoshop_calc_shipping') == 'yes') {
                ?>
			<td><address>
					<?php 
                if ($order->formatted_shipping_address) {
                    echo $order->formatted_shipping_address;
                } else {
                    echo '&ndash;';
                }
                ?>
				</address></td>
		<?php 
            }
            ?>
		<td><?php 
            echo apply_filters('jigoshop_display_order_total', jigoshop_price($order->order_total), $order);
            ?>
</td>
		<td class="nobr"><?php 
            _e($order->status, 'jigoshop');
            ?>
</td>
		<td class="nobr alignright">
			<?php 
            if ($order->status == 'pending') {
                ?>
				<a href="<?php 
                echo esc_url($order->get_checkout_payment_url());
                ?>
" class="button pay"><?php 
                _e('Pay', 'jigoshop');
开发者ID:ashik968,项目名称:digiplot,代码行数:31,代码来源:my_account.php

示例10: coupons_widget


//.........这里部分代码省略.........
            }
            ?>
" />
						<input type="hidden" name="report" value="<?php 
            if (!empty($_GET['report'])) {
                echo esc_attr($_GET['report']);
            }
            ?>
" />
					<?php 
        } else {
            ?>
						<span><?php 
            _e('No used coupons found', 'jigoshop');
            ?>
</span>
					<?php 
        }
        ?>
				</div>
			</form>
		</div>
		<h4 class="section_title"><span><?php 
        _e('Most Popular', 'jigoshop');
        ?>
</span></h4>
		<div class="section">
			<table cellspacing="0">
				<?php 
        $most_popular = $used_coupons;
        usort($most_popular, function ($a, $b) {
            return $b['usage'] - $a['usage'];
        });
        $most_popular = array_slice($most_popular, 0, 12);
        if ($most_popular) {
            foreach ($most_popular as $coupon) {
                echo '<tr class="' . (in_array($coupon['code'], $this->coupon_codes) ? 'active' : '') . '">
							<td class="count" width="1%">' . $coupon['usage'] . '</td>
							<td class="name"><a href="' . esc_url(add_query_arg('coupon_codes', $coupon['code'])) . '">' . $coupon['code'] . '</a></td>
						</tr>';
            }
        } else {
            echo '<tr><td colspan="2">' . __('No coupons found in range', 'jigoshop') . '</td></tr>';
        }
        ?>
			</table>
		</div>
		<h4 class="section_title"><span><?php 
        _e('Most Discount', 'jigoshop');
        ?>
</span></h4>
		<div class="section">
			<table cellspacing="0">
				<?php 
        $most_discount = $used_coupons;
        usort($most_discount, function ($a, $b) {
            return $b['amount'] * $b['usage'] - $a['amount'] * $a['usage'];
        });
        $most_discount = array_slice($most_discount, 0, 12);
        if ($most_discount) {
            foreach ($most_discount as $coupon) {
                echo '<tr class="' . (in_array($coupon['code'], $this->coupon_codes) ? 'active' : '') . '">
							<td class="count" width="1%">' . jigoshop_price($coupon['amount'] * $coupon['usage']) . '</td>
							<td class="name"><a href="' . esc_url(add_query_arg('coupon_codes', $coupon['code'])) . '">' . $coupon['code'] . '</a></td>
						</tr>';
            }
        } else {
            echo '<tr><td colspan="3">' . __('No coupons found in range', 'jigoshop') . '</td></tr>';
        }
        ?>
			</table>
		</div>
		<script type="text/javascript">
			jQuery(function($){
				$('.section_title').click(function(){
					var next_section = $(this).next('.section');
					if($(next_section).is(':visible'))
						return false;
					$('.section:visible').slideUp();
					$('.section_title').removeClass('open');
					$(this).addClass('open').next('.section').slideDown();
					return false;
				});
				$('.section').slideUp(100, function(){
					<?php 
        if (empty($this->coupon_codes)) {
            ?>
					$('.section_title:eq(1)').click();
					<?php 
        } else {
            ?>
					$('.section_title:eq(0)').click();
					<?php 
        }
        ?>
				});
			});
		</script>
		<?php 
    }
开发者ID:ashik968,项目名称:digiplot,代码行数:101,代码来源:coupon-usage.class.php

示例11: email_order_items_list

	/** Output items for display in emails */
	function email_order_items_list( $show_download_links = false, $show_sku = false ) {
		
		$return = '';
		
		foreach($this->items as $item) : 
			$_product = &new jigoshop_product( $item['id'] );
			
			$return .= $item['qty'] . ' x ' . apply_filters('jigoshop_order_product_title', $item['name'], $_product);
			
			if ($show_sku) :
				
				$return .= ' (#' . $_product->sku . ')';
				
			endif;
			
			$return .= ' - ' . strip_tags(jigoshop_price( $item['cost']*$item['qty'], array('ex_tax_label' => 1 )));
			
			if ($show_download_links) :
				
				if ($_product->exists) :
			
					if ($_product->is_type('downloadable')) :
						$return .= PHP_EOL . ' - ' . $this->get_downloadable_file_url( $item['id'] ) . '';
					endif;
		
				endif;	
					
			endif;
			
			$return .= PHP_EOL;
			
		endforeach;	
		
		return $return;	
		
	}
开发者ID:rszczypka,项目名称:jigoshop,代码行数:37,代码来源:jigoshop_order.class.php

示例12: jigoshop_dashboard


//.........这里部分代码省略.........
										</tr>
									</tbody>
								</table>
							</div>
							<div class="versions">
								<p id="wp-version-message"><?php _e('You are using', 'jigoshop'); ?> <strong>JigoShop <?php echo JIGOSHOP_VERSION; ?>.</strong></p>
							</div>
							<div class="clear"></div>
						</div>
					
					</div><!-- postbox end -->

					<div class="postbox">
						<h3 class="hndle" id="poststuff"><span><?php _e('Recent Orders', 'jigoshop') ?></span></h3>
						<div class="inside">
							<?php
								$args = array(
								    'numberposts'     => 10,
								    'orderby'         => 'post_date',
								    'order'           => 'DESC',
								    'post_type'       => 'shop_order',
								    'post_status'     => 'publish' 
								);
								$orders = get_posts( $args );
								if ($orders) :
									echo '<ul class="recent-orders">';
									foreach ($orders as $order) :
										
										$this_order = &new jigoshop_order( $order->ID );
										
										echo '
										<li>
											<span class="order-status '.sanitize_title($this_order->status).'">'.ucwords($this_order->status).'</span> <a href="'.admin_url('post.php?post='.$order->ID).'&action=edit">'.date_i18n('l jS \of F Y h:i:s A', strtotime($this_order->order_date)).'</a><br />
											<small>'.sizeof($this_order->items).' '._n('item', 'items', sizeof($this_order->items), 'jigoshop').' <span class="order-cost">'.__('Total: ', 'jigoshop').jigoshop_price($this_order->order_total).'</span></small>
										</li>';

									endforeach;
									echo '</ul>';
								endif;
							?>
						</div>
					</div><!-- postbox end -->	
					
					<?php if (get_option('jigoshop_manage_stock')=='yes') : ?>
					<div class="postbox jigoshop_right_now">
						<h3 class="hndle" id="poststuff"><span><?php _e('Stock Report', 'jigoshop') ?></span></h3>
						<div class="inside">
							
							<?php
							
							$lowstockamount = get_option('jigoshop_notify_low_stock_amount');
							if (!$lowstockamount) $lowstockamount = 1;
							
							$nostockamount = get_option('jigoshop_notify_no_stock_amount');
							if (!$nostockamount) $nostockamount = 1;
							
							$outofstock = array();
							$lowinstock = array();
							$args = array(
								'post_type'	=> 'product',
								'post_status' => 'publish',
								'ignore_sticky_posts'	=> 1,
								'posts_per_page' => -1
							);
							$my_query = new WP_Query($args);
							if ($my_query->have_posts()) : while ($my_query->have_posts()) : $my_query->the_post(); 
开发者ID:rszczypka,项目名称:jigoshop,代码行数:67,代码来源:jigoshop-admin-dashboard.php

示例13: jigoshop_custom_order_columns


//.........这里部分代码省略.........
</dt>
                <dd><?php 
                echo sprintf(__('%s', 'jigoshop'), $order->shipping_service);
                ?>
</dd>
	              <?php 
            }
            ?>
            </dl>
            <?php 
            break;
        case "total_cost":
            ?>
            <table cellpadding="0" cellspacing="0" class="cost">
                <tr>
                    <?php 
            if ($jigoshop_options->get('jigoshop_calc_taxes') == 'yes' && $order->has_compound_tax() || $jigoshop_options->get('jigoshop_tax_after_coupon') == 'yes' && $order->order_discount > 0) {
                ?>
                        <th><?php 
                _e('Retail Price', 'jigoshop');
                ?>
</th>
                    <?php 
            } else {
                ?>
                        <th><?php 
                _e('Subtotal', 'jigoshop');
                ?>
</th>
                    <?php 
            }
            ?>
                    <td><?php 
            echo jigoshop_price($order->order_subtotal);
            ?>
</td>
                </tr>
                <?php 
            if ($order->order_shipping > 0) {
                ?>
<tr>
                        <th><?php 
                _e('Shipping', 'jigoshop');
                ?>
</th>
                        <td><?php 
                echo jigoshop_price($order->order_shipping);
                ?>
</td>
                    </tr>
                    <?php 
            }
            do_action('jigoshop_processing_fee_after_shipping');
            if ($jigoshop_options->get('jigoshop_tax_after_coupon') == 'yes' && $order->order_discount > 0) {
                ?>
                    <tr>
                        <th><?php 
                _e('Discount', 'jigoshop');
                ?>
</th>
                        <td>-<?php 
                echo jigoshop_price($order->order_discount);
                ?>
</td>
                    </tr>
                    <?php 
开发者ID:ashik968,项目名称:digiplot,代码行数:67,代码来源:jigoshop-admin-post-types.php

示例14: jigoshop_custom_order_columns

function jigoshop_custom_order_columns($column) {

	global $post;
	$order = &new jigoshop_order( $post->ID );
	switch ($column) {
		case "order_status" :
			
			echo sprintf( __('<mark class="%s">%s</mark>', 'jigoshop'), sanitize_title($order->status), $order->status );
			
		break;
		case "order_title" :
			
			echo '<a href="'.admin_url('post.php?post='.$post->ID.'&action=edit').'">'.sprintf( __('Order #%s', 'jigoshop'), $post->ID ).'</a>';
			
			echo '<time title="'.date_i18n('c', strtotime($post->post_date)).'">'.date_i18n('F j, Y, g:i a', strtotime($post->post_date)).'</time>';
			
		break;
		case "customer" :
			
			if ($order->user_id) $user_info = get_userdata($order->user_id);

			?>
			<dl>
				<dt><?php _e('User:', 'jigoshop'); ?></dt>
				<dd><?php
					if (isset($user_info) && $user_info) : 
			                    	
		            	echo '<a href="user-edit.php?user_id='.$user_info->ID.'">#'.$user_info->ID.' &ndash; <strong>';
		            	
		            	if ($user_info->first_name || $user_info->last_name) echo $user_info->first_name.' '.$user_info->last_name;
		            	else echo $user_info->display_name;
		            	
		            	echo '</strong></a>';
		
		           	else : 
		           		_e('Guest', 'jigoshop'); 
		           	endif;
				?></dd>
        		<?php if ($order->billing_email) : ?><dt><?php _e('Billing Email:', 'jigoshop'); ?></dt>
        		<dd><a href="mailto:<?php echo $order->billing_email; ?>"><?php echo $order->billing_email; ?></a></dd><?php endif; ?>
        		<?php if ($order->billing_phone) : ?><dt><?php _e('Billing Tel:', 'jigoshop'); ?></dt>
        		<dd><?php echo $order->billing_phone; ?></dd><?php endif; ?>
        	</dl>
        	<?php
		break;
		case "billing_address" :
			echo '<strong>'.$order->billing_first_name . ' ' . $order->billing_last_name;
        	if ($order->billing_company) echo ', '.$order->billing_company;
        	echo '</strong><br/>';
        	echo '<a target="_blank" href="http://maps.google.co.uk/maps?&q='.urlencode($order->formatted_billing_address).'&z=16">'.$order->formatted_billing_address.'</a>';
		break;
		case "shipping_address" :
			if ($order->formatted_shipping_address) :
            	echo '<strong>'.$order->shipping_first_name . ' ' . $order->shipping_last_name;
            	if ($order->shipping_company) : echo ', '.$order->shipping_company; endif;
            	echo '</strong><br/>';
            	echo '<a target="_blank" href="http://maps.google.co.uk/maps?&q='.urlencode($order->formatted_shipping_address).'&z=16">'.$order->formatted_shipping_address.'</a>';
        	else :
        		echo '&ndash;';
        	endif;
		break;
		case "billing_and_shipping" :
			?>
			<dl>
				<dt><?php _e('Payment:', 'jigoshop'); ?></dt>
				<dd><?php echo $order->payment_method; ?></dd>
        		<dt><?php _e('Shipping:', 'jigoshop'); ?></dt>
				<dd><?php echo $order->shipping_method; ?></dd>
        	</dl>
        	<?php
		break;
		case "total_cost" :
			?>
			<table cellpadding="0" cellspacing="0" class="cost">
        		<tr>
        			<th><?php _e('Subtotal', 'jigoshop'); ?></th>
        			<td><?php echo jigoshop_price($order->order_subtotal); ?></td>
        		</tr>
        		<?php if ($order->order_shipping>0) : ?><tr>
        			<th><?php _e('Shipping', 'jigoshop'); ?></th>
        			<td><?php echo jigoshop_price($order->order_shipping); ?></td>
        		</tr><?php endif; ?>
        		<?php if ($order->get_total_tax()>0) : ?><tr>
        			<th><?php _e('Tax', 'jigoshop'); ?></th>
        			<td><?php echo jigoshop_price($order->get_total_tax()); ?></td>
        		</tr><?php endif; ?>
        		<?php if ($order->order_discount>0) : ?><tr>
        			<th><?php _e('Discount', 'jigoshop'); ?></th>
        			<td><?php echo jigoshop_price($order->order_discount); ?></td>
        		</tr><?php endif; ?>
        		<tr>	
        			<th><?php _e('Total', 'jigoshop'); ?></th>
        			<td><?php echo jigoshop_price($order->order_total); ?></td>
        		</tr>
            </table>
            <?php
		break;
	}
}
开发者ID:rszczypka,项目名称:jigoshop,代码行数:99,代码来源:jigoshop-admin-post-types.php

示例15: _e

			<tr>
				<td colspan="2"><strong><?php _e('Grand Total', 'jigoshop'); ?></strong></td>
				<td><strong><?php echo jigoshop_cart::get_total(); ?></strong></td>
			</tr>
		</tfoot>
		<tbody>
			<?php
			if (sizeof(jigoshop_cart::$cart_contents)>0) : 
				foreach (jigoshop_cart::$cart_contents as $item_id => $values) :
					$_product = $values['data'];
					if ($_product->exists() && $values['quantity']>0) :
						echo '
							<tr>
								<td>'.$_product->get_title().'</td>
								<td>'.$values['quantity'].'</td>
								<td>'.jigoshop_price($_product->get_price_excluding_tax()*$values['quantity'], array('ex_tax_label' => 1)).'</td>
							</tr>';
					endif;
				endforeach; 
			endif;
			?>
		</tbody>
	</table>
	
	<div id="payment">
		<?php if (jigoshop_cart::needs_payment()) : ?>
		<ul class="payment_methods methods">
			<?php 
				$available_gateways = jigoshop_payment_gateways::get_available_payment_gateways();
				if ($available_gateways) : 
					// Chosen Method
开发者ID:rszczypka,项目名称:jigoshop,代码行数:31,代码来源:review_order.php


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