Do you like AbanteCart? Please rate AbanteCart or share your experience with other eCommerce entrepreneurs. Go to Softaculous rating page to add your rating or write a review

Order history does not show up after change language

Started by oguzhan.oda, December 27, 2013, 09:02:55 AM

Previous topic - Next topic

oguzhan.oda

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

abantecart

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.
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help


Forum Rules Code of conduct
AbanteCart.com 2010 -