10,
'orderby' => 'post_date',
'order' => 'DESC',
'post_type' => 'shop_order',
'post_status' => 'publish'
);
$orders = get_posts( $args );
if ($orders) :
echo '
';
foreach ($orders as $order) :
$this_order = new jigoshop_order( $order->ID );
echo '
-
'.ucwords(__($this_order->status, 'jigoshop')).' '.get_the_time(__('l jS \of F Y h:i:s A', 'jigoshop'), $order->ID).'
'.sizeof($this_order->items).' '._n('item', 'items', sizeof($this_order->items), 'jigoshop').' '.__('Total: ', 'jigoshop').jigoshop_price($this_order->order_total).'
';
endforeach;
echo '
';
endif;
?>
'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();
$_product = new jigoshop_product( $my_query->post->ID );
if (!$_product->managing_stock()) continue;
$thisitem = '
'.$_product->stock.' |
'.$my_query->post->post_title.' |
';
if ($_product->stock<=$nostockamount) :
$outofstock[] = $thisitem;
continue;
endif;
if ($_product->stock<=$lowstockamount) $lowinstock[] = $thisitem;
endwhile; endif;
wp_reset_query();
if (sizeof($lowinstock)==0) :
$lowinstock[] = '
'.__('No products are low in stock.', 'jigoshop').' |
';
endif;
if (sizeof($outofstock)==0) :
$outofstock[] = '
'.__('No products are out of stock.', 'jigoshop').' |
';
endif;
?>