Commit eb9c333a authored by anthonylindsay's avatar anthonylindsay

Removed superfluous condition and changed 'complete' to 'completed for order status.

parent 3449719d
......@@ -14,7 +14,6 @@ function commerce_popular_products_get_product() {
$time = variable_get('commerce_popular_products_time', $default = 'month');
$number = variable_get('commerce_popular_products_number', $default = '1');
$products = variable_get('commerce_popular_products_products');
if (isset($products)) {
// Gather information on all the Commerce product reference fields in use.
$fields = field_info_fields();
......@@ -26,7 +25,6 @@ function commerce_popular_products_get_product() {
}
}
}
// Turn the time period into something we can use with FROM_UNIXTIME().
$time_period = '';
switch ($time) {
......@@ -67,11 +65,7 @@ function commerce_popular_products_get_product() {
$query->addExpression('SUM(cli.quantity)', 'sum');
$query->condition(
'co.status',
array('pending', 'complete', 'checkout_complete'),
'in');
$query->condition(
'co.status',
array('pending', 'complete', 'checkout_complete'),
array('pending', 'completed', 'checkout_complete'),
'in');
$product_types = array();
foreach ($products as $key => $product) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment