Page 1 of 1

[0.7.9 RC5] Admin Last Order and different language

Posted: Tue Dec 16, 2008 7:03 pm
by Pix
Start with a 0.7.9 RC5 fresh install,register an account and place an order. In admin homepage check last order box: it shows correctly 1 last order.
Install a new language (example, german),set admin language to german, go to admin -> hompage

1) Statistics box shows correctrly 1 order
2) Last order box doesn't shows anything
3) admin/index.php?controller=order doesn't show anything either

the only way to shows order list is to set the admin language to english

I tried to place another order with all product's information filled for the new language. Same issue.

Re: [0.7.9 RC5] Admin Last Order and different language

Posted: Tue Dec 16, 2008 7:49 pm
by bruce
Go to the store admin and then find Localisation->Order Status in the menus. Add text on the (your example) German tab for each order status.

Go to the admin home page and you should see all of the orders now.

Re: [0.7.9 RC5] Admin Last Order and different language

Posted: Tue Dec 16, 2008 8:21 pm
by Pix
i've filled the order status and now the admin part shows order correctly
but the problem now is moved to catalog part

if i check my account history i see double order. Each for every language. Check the png attached

Re: [0.7.9 RC5] Admin Last Order and different language

Posted: Tue Dec 16, 2008 10:00 pm
by Qphoria
Yea, to be honest I've recently been looking at the way we pull data from the db.. all queries seem to be using this "where language_id = $language->getId()" which is absolutely wrong as you won't see things if there is no language for them

We need to get ALL results and then filter the ones that have the current language. If they don't have a record with the current language, then fallback to english. I've got this working and prototyped on my dev setup and it is my main focus. But it's a sizable change and won't make it into 079, but should be in the first release of 0.8

However, you shouldn't be seeing 2 records in the order table. I will take a look at that today

Re: [0.7.9 RC5] Admin Last Order and different language

Posted: Wed Dec 17, 2008 7:25 am
by Qphoria
This does appear to be a bug when there are multiple languages and an entry for order_statuses with each language. for each language with an order status, it creates a separate row so it looks like you have multiple orders, one for each order_status language

Re: [0.7.9 RC5] Admin Last Order and different language

Posted: Wed Dec 17, 2008 8:43 am
by Qphoria

Re: [0.7.9 RC5] Admin Last Order and different language

Posted: Wed Dec 17, 2008 8:51 am
by Qphoria
fixed in r267

Re: [0.7.9 RC5] Admin Last Order and different language

Posted: Wed Dec 17, 2008 10:57 pm
by Qphoria
@Pix: Based on the fix (you can view the code change if you click on the link in my last post, and manually add it to your codebase)
Does this fix your problem satisfactorily?

Re: [0.7.9 RC5] Admin Last Order and different language

Posted: Fri Dec 19, 2008 11:53 pm
by Pix
Yes it does
now there is no more double order. i appreciate it

Re: [0.7.9 RC5] Admin Last Order and different language

Posted: Sat Dec 20, 2008 12:37 am
by Qphoria
Great :) Thx again