kalua Posted April 11, 2015 Share Posted April 11, 2015 Hey all I have a strange problem and can't find a solution. I'am working PS 1.6.0.11 with the default template. Please take a look at the screenshot below. As you can see the invoice is made in english via the english Frontoffice. Therefor everything's fine except the word "Banküberweisung" below the payment method. Normally it should be "Bank wire" ... Problem No. 1 - i have no idea from where this come from. With the translations in the bank wire module everythings ok. I'am just wondering why it is "Banküberweisung" if I'am in the english FO. Therefor I made a test with the COD (Cash on Delivery) in the FO. First order in english and second order in german. As you can see below everythings fine. Also a check in the database (ps_order_payment) ... everythings fine. But take a look at this ... It doesn't matter if I'am in english in the Front Office, if I make an order, "Banküberweisung" will be written to the database instead of Bank wire. Does somebody know which part of prestashop is responsible for this? Thanks for any help Link to comment Share on other sites More sharing options...
selectshop.at Posted April 11, 2015 Share Posted April 11, 2015 Indeed a little bug on Prestashop, but fix you will find on German Forum too: https://www.prestashop.com/forums/topic/244719-tutorial-rechnungsformular-%C3%A4ndern-f%C3%BCr-version-15x-und-16x/page-4?do=findComment&comment=1485598 Link to comment Share on other sites More sharing options...
kalua Posted April 11, 2015 Author Share Posted April 11, 2015 (edited) Thanks, just checked it but it didn't work quiet well. This is code that is actually used in the invoice.tpl {foreach from=$order_invoice->getOrderPaymentCollection() item=payment} {$payment->payment_method} {foreachelse} {if $payment->payment_method == 'PrePayment'} {l s='PrePayment' pdf='true'} {else} {l s='Invoice' pdf='true'} {/if} {/foreach} I changed the 4th and 5th line to this ... {if $order->payment == 'Banküberweisung'} {l s='Banküberweisung' pdf='true'} But i take no effect. It seems that the foreach Clause above will be handled before. Therefor I changed the total code to this: {if $order->payment == 'Banküberweisung'} {l s='Bank wire' pdf='true'} {else} {l s='Invoice' pdf='true'} {/if} Now it takes effect, but not as expected. I get "Invoice" in the the Payment Method instead of "Bank wire" Furthermore by taking out the foreach clause, all the rest payment methods do not take effect. Where i got "COD" in earlier invoices, everywhere is writte "Invoice" which is clear because taken out the foreach Clause. What's also strange, that in the database table ps_order_payment only "Banküberweisung" appears even when I'am in english FO Hm, I have no idea what to do Edited April 11, 2015 by kalua (see edit history) Link to comment Share on other sites More sharing options...
Martijn++ Posted April 11, 2015 Share Posted April 11, 2015 If the item in the foreach-clause is named "$payment", you got to use it! Code shouldn't be {if $order->payment == 'Banküberweisung'} but instead {if $payment->payment_method == 'Banküberweisung'} Or skip the whole foreach-clause. Link to comment Share on other sites More sharing options...
selectshop.at Posted April 12, 2015 Share Posted April 12, 2015 (edited) As I cannot answer in German Forum so I answer here your second question for database: Banküberweisung is written into dabatase but only for the order, , cause your main shop language is German, BUT not for payment (module) row which is always English (software language). If the main language of your shop is Portuguese or English for ex. than into database is written Portuguese translated or English translated. See screen attached. Edited April 12, 2015 by selectshop.at (see edit history) Link to comment Share on other sites More sharing options...
kalua Posted April 12, 2015 Author Share Posted April 12, 2015 Hey Thanks for your reply. So far so clear, but I have also foreign languages in the table row. If a place an order in english languag in FO with Payment "Cash on Delivery (COD) i get this entry also in the database ps_order_payment Take a look at this ... As you can see COD will be written in german and english depends on the actual language in the FO.But with Bank Wire .. i everytime get "Banküberweisung" in the tablerow, it doesn't matter if I'am on english or german. Thats strange!! Isnt it? Link to comment Share on other sites More sharing options...
selectshop.at Posted April 14, 2015 Share Posted April 14, 2015 No, it is not strange. Basically what is written into database is the language your shop is set. If it is set to localization EN than the entry in DB is EN. If it is set to DE, than the entry is DE, if it is set to PT, than the entry is PT. This is independent of the customer language. If you want your invoice printed in customer's language, so there is a fix you can find in the English Forum as well: https://www.prestashop.com/forums/topic/396155-need-to-display-double-currency-and-change-pdf-language/?do=findComment&comment=2011871 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now