summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnthony Lindsay2012-09-14 09:55:44 (GMT)
committerAnthony Lindsay2012-09-14 09:55:44 (GMT)
commiteb9c333a02949e5a1078046c6bb8457da8cc7160 (patch)
treeb5e912f6c3e0b1a80972971551ad2f6a41270e21
parent3449719d60710efdabb34ce7bfccf6ddc2d873c2 (diff)
Removed superfluous condition and changed 'complete' to 'completed for order status.
-rw-r--r--commerce_popular_products.module8
1 files changed, 1 insertions, 7 deletions
diff --git a/commerce_popular_products.module b/commerce_popular_products.module
index f3c4226..cfb2040 100644
--- a/commerce_popular_products.module
+++ b/commerce_popular_products.module
@@ -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) {