Skip to content

Commit

Permalink
Customer Orders Fix
Browse files Browse the repository at this point in the history
Removed join on order_items - order items aren't used, and join causes duplicate orders to be shown
  • Loading branch information
Oli Mortimer committed Jul 25, 2016
1 parent 324eccb commit ba4db6d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions gocart/models/order_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ function get_orders_count($search=false)
//get an individual customers orders
function get_customer_orders($id, $offset=0)
{
$this->db->join('order_items', 'orders.id = order_items.order_id');
$this->db->order_by('ordered_on', 'DESC');
return $this->db->get_where('orders', array('customer_id'=>$id), 15, $offset)->result();
}
Expand Down Expand Up @@ -316,4 +315,4 @@ function get_best_sellers($start, $end)
return $return;
}

}
}

0 comments on commit ba4db6d

Please sign in to comment.