Page 1 of 1

[RESOLVED] error after paypal payment (language not english)

Posted: Mon Jan 26, 2009 10:44 pm
by francy88
hi,
I found an error after paypal transaction, if I use opencart in Italian language.
After paypal redirect, this error appears:

Configuration error: Store owner needs to create an order status for "Paid Unconfirmed" for every installed language. The following sql statement returned no rows and must cease select `order_status_id` from `order_status` where `name` = 'order_status_paid_unconfirmed' and `language_id` = '1'

Then I opened the table "order_status", and I saw that there is no row with "order_status_paid_unconfirmed", but this order status is called "Paid Unconfirmed"!!
I edited this field, changing "Paid Unconfirmed" with "order_status_paid_unconfirmed", and then all works perfectly.
Under "admin-->configuration-->localisation-->order status", the name of payment status is changed in "order_status_paid_unconfirmed".
The real problem should be in the query in the page "paypal.php"?

thanks

Re: error after paypal payment (language not english)

Posted: Mon Jan 26, 2009 11:26 pm
by francy88
OK, I resolve this issue!!
My opencart version is 0.7.9, I don't know if this is a version problem or not...

Then, you must open the file : "/catalog/language/YOUR-NOT-ENGLISH-LANGUAGE/extension/payment/paypal.php", and paste this code:

Code: Select all

$_['order_status_paid_unconfirmed'] = 'Paid Unconfirmed';
$_['order_status_pending'] = 'Pending';
after that, the redirect on your non-english language works perfectly!  ;)

ciao!!

Re: error after paypal payment (language not english)

Posted: Mon Jan 26, 2009 11:32 pm
by Qphoria
Configuration error: Store owner needs to create an order status for "Paid Unconfirmed" for every installed language.

You need to change "Paid Unconfirmed" back for english and then for Italian you need to:
- translate the english paypal language file to italian and place it in: catalog/language/italian/extension/payment/paypal.php
- Edit the order status of "Paid Unconfirmed" to add the italian version to the "italian" tab. This value should match what you translated to in the paypal language file.



There is probably a better way to do it in the paypal module so that this isn't an issue.. I'll think about it

-edit- I see you figured it out above.

Re: [RESOLVED] error after paypal payment (language not english)

Posted: Tue Jan 27, 2009 7:38 am
by bruce
Qphoria wrote: There is probably a better way to do it in the paypal module so that this isn't an issue.. I'll think about it
There is.

I have attached it to this post. Have a look at the admin part which uses dropdowns to select the status values. They end up associated with the actual order status ID instead of using text and translations. There are people using this package but I never bothered to put it in the contributions section because you guys were planning so many changes.

Written for opencart 0.7.7 and not compatible with any other

Re: [RESOLVED] error after paypal payment (language not english)

Posted: Tue Jan 27, 2009 7:59 am
by Qphoria
eh.. paypal's improved quite a bit since that version.
I think there is still a better way than that method