AbanteCart Community
Shopping Cart Operations => Support => General Support => Topic started by: oguzhan.oda on December 27, 2013, 09:02:55 AM
-
I have a problem on my website.
in customers acount order history section when i change the language to Turkish it doesnt show orders but in English it shows.
Can you please help me to solve this problem.
iphonealisveris.com/index.php?rt=account/history
iphonealisveris.com/index.php?rt=account/history&language=en
ID: oguzhan.oda
pass : 123456
-
There is a fix. Locate file /storefront/model/account/order.php
Look about like 142
public function getOrders($start = 0, $limit = 20) {
if ($start < 0) {
$start = 0;
}
$query = $this->db->query("SELECT o.order_id, o.firstname, o.lastname, os.name as status, o.date_added, o.total, o.currency, o.value FROM `" . $this->db->table("orders") . "` o LEFT JOIN " . $this->db->table("order_statuses") . " os ON (o.order_status_id = os.order_status_id) WHERE customer_id = '" . (int)$this->customer->getId() . "' AND o.order_status_id > '0' AND os.language_id = '" . (int)$this->config->get('storefront_language_id') . "' ORDER BY o.order_id DESC LIMIT " . (int)$start . "," . (int)$limit);
return $query->rows;
}
Replace with:
public function getOrders($start = 0, $limit = 20) {
if ($start < 0) {
$start = 0;
}
$query = $this->db->query("SELECT o.order_id, o.firstname, o.lastname, os.name as status, o.date_added, o.total, o.currency, o.value FROM `" . $this->db->table("orders") . "` o LEFT JOIN " . $this->db->table("order_statuses") . " os ON (o.order_status_id = os.order_status_id) WHERE customer_id = '" . (int)$this->customer->getId() . "' AND o.order_status_id > '0' ORDER BY o.order_id DESC LIMIT " . (int)$start . "," . (int)$limit);
return $query->rows;
}
Basically there was a select based on the language order was places in. This is not right.
-
Thank you so much!!