Please help us to make AbanteCart Ideal Open Source Ecommerce Solution for everyone.

Support AbanteCart eCommerce

Author Topic: Order history does not show up after change language  (Read 4268 times)

Offline oguzhan.oda

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Order history does not show up after change language
« 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
« Last Edit: December 27, 2013, 09:31:39 AM by oguzhan.oda »

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4359
  • Karma: +298/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: Order history does not show up after change language
« Reply #1 on: December 28, 2013, 10:32:50 AM »
There is a fix. Locate file /storefront/model/account/order.php

Look about like 142

Code: [Select]
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:

Code: [Select]
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

Offline oguzhan.oda

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Order history does not show up after change language
« Reply #2 on: December 28, 2013, 04:41:33 PM »
Thank you so much!!

 

Powered by SMFPacks Social Login Mod