strange language change during checkout
- cskmanagement
-
Topic Author
- Offline
Less
More
10 years 9 months ago #228374
by cskmanagement
________________________________
CSK Management
www.cskmanagement.com
strange language change during checkout was created by cskmanagement
-- HikaShop version -- : 2.6.1
-- Joomla version -- : 3.4.8
-- Browser(s) name and version -- : div
-- Error-message(debug-mod must be tuned on) -- : (none)
I have setup a bilingual webshop German/English, and it runs fine.
There is only one strange thing, I can't figure out why:
When someone goes through the checkout process on the English page, the last step is in German. The page itself stays in English. All steps (login/ address entry, payment method, confirmation, etc.) was in English but when it comes to the actual payment step, the shop seems to switch to German. It is independent from the payment method.
I have documented all four steps in my checkout process with screenshots. As you can see, in steps 1-3 the checkout progress bar is in English (1. "start", 2. "payment method", 3. "confirmation", 4. "end") but in step 4, it switches to German ("1. start", 2. "zahlungsmethode", 3. "übersicht", 4. "bestellbestätigung").
Any idea? Thanks for your help.
Chris
-- Joomla version -- : 3.4.8
-- Browser(s) name and version -- : div
-- Error-message(debug-mod must be tuned on) -- : (none)
I have setup a bilingual webshop German/English, and it runs fine.
There is only one strange thing, I can't figure out why:
When someone goes through the checkout process on the English page, the last step is in German. The page itself stays in English. All steps (login/ address entry, payment method, confirmation, etc.) was in English but when it comes to the actual payment step, the shop seems to switch to German. It is independent from the payment method.
I have documented all four steps in my checkout process with screenshots. As you can see, in steps 1-3 the checkout progress bar is in English (1. "start", 2. "payment method", 3. "confirmation", 4. "end") but in step 4, it switches to German ("1. start", 2. "zahlungsmethode", 3. "übersicht", 4. "bestellbestätigung").
Any idea? Thanks for your help.
Chris
________________________________
CSK Management
www.cskmanagement.com
Please Log in or Create an account to join the conversation.
10 years 9 months ago - 10 years 9 months ago #228394
by Philip
Replied by Philip on topic strange language change during checkout
Hello,
Did you notice some change in your url? I mean do you have this kind of difference :
index.php/fr/hikashop-menu-for-products-listing/checkout/task-step/step-1
To
index.php/en-us/hikashop-menu-for-products-listing/checkout/task-step/step-2
or other stuff like this example, maybe that can be link to your canonical Url and so try switch it off.
Hope this will help you.
Regards,
Did you notice some change in your url? I mean do you have this kind of difference :
index.php/fr/hikashop-menu-for-products-listing/checkout/task-step/step-1
To
index.php/en-us/hikashop-menu-for-products-listing/checkout/task-step/step-2
or other stuff like this example, maybe that can be link to your canonical Url and so try switch it off.
Hope this will help you.
Regards,
Last edit: 10 years 9 months ago by Philip.
Please Log in or Create an account to join the conversation.
- cskmanagement
-
Topic Author
- Offline
10 years 9 months ago #228478
by cskmanagement
________________________________
CSK Management
www.cskmanagement.com
Replied by cskmanagement on topic strange language change during checkout
Hi Philippe
- thanks for the fast reply.
I have checked the URL, they do not change the language (still "en").
Regarding the canonical URL: do you mean the canonical URL in the product definition? I have deleted the canonical URL in one of my products, but unfortunately no success... Where did you mean I should switch it off?
Given the fact that the rest of the page is still in the English version, it doesn't seem that it's changing the overall language.
- thanks for the fast reply.
I have checked the URL, they do not change the language (still "en").
Regarding the canonical URL: do you mean the canonical URL in the product definition? I have deleted the canonical URL in one of my products, but unfortunately no success... Where did you mean I should switch it off?
Given the fact that the rest of the page is still in the English version, it doesn't seem that it's changing the overall language.
________________________________
CSK Management
www.cskmanagement.com
Please Log in or Create an account to join the conversation.
10 years 9 months ago #228515
by nicolas
Replied by nicolas on topic strange language change during checkout
Hi,
We're never had that issue.
What payment methods are you using on your website ? Do you have the same problem with all the payment methods on the end step ?
I guess that some plugin must be changing the language of the page in the middle of the processing when the order is being created. So maybe disabling them one by one and testing each time could help identify the source of the problem, especially with the "hikashop", "hikashoppayment" and "system" plugins.
We're never had that issue.
What payment methods are you using on your website ? Do you have the same problem with all the payment methods on the end step ?
I guess that some plugin must be changing the language of the page in the middle of the processing when the order is being created. So maybe disabling them one by one and testing each time could help identify the source of the problem, especially with the "hikashop", "hikashoppayment" and "system" plugins.
Please Log in or Create an account to join the conversation.
- cskmanagement
-
Topic Author
- Offline
10 years 9 months ago #228540
by cskmanagement
________________________________
CSK Management
www.cskmanagement.com
Replied by cskmanagement on topic strange language change during checkout
strange, isn't it?
It is with all the payment methods (stripe credit card, PayPal, invoice and pre-payment).
I will try disabling them, and I will let you know.
thanks so far,
Chris
It is with all the payment methods (stripe credit card, PayPal, invoice and pre-payment).
I will try disabling them, and I will let you know.
thanks so far,
Chris
________________________________
CSK Management
www.cskmanagement.com
Please Log in or Create an account to join the conversation.
- cskmanagement
-
Topic Author
- Offline
10 years 9 months ago #228544
by cskmanagement
________________________________
CSK Management
www.cskmanagement.com
Replied by cskmanagement on topic strange language change during checkout
I found the issue, although I haven't solved it, yet.
You guys are really good!
It wasn't a payment plugin. It's the "Attach Invoice to the order confirmation e-mail" plugin. I have now tested it several times with different products and different payment methods. When I disable it, it will work fine!
Any idea, how to solve this (because I definitely need the invoice in the confirmation e-mail)?
regards,
Chris
You guys are really good!
It wasn't a payment plugin. It's the "Attach Invoice to the order confirmation e-mail" plugin. I have now tested it several times with different products and different payment methods. When I disable it, it will work fine!
Any idea, how to solve this (because I definitely need the invoice in the confirmation e-mail)?
regards,
Chris
________________________________
CSK Management
www.cskmanagement.com
Please Log in or Create an account to join the conversation.
10 years 9 months ago #228607
by nicolas
Replied by nicolas on topic strange language change during checkout
Hi,
Interesting.
The file you want to look at is plugins/hikashop/attachinvoice/attachinvoice.php
There, you have twice the code:
$class->loadLocale($order);
and the code:
if(method_exists($class,'loadBackLocale')){
$class->loadBackLocale();
}else{
$this->loadBackLocale($class);
}
remove them and try again.
These change the language of the page on the fly in order to generate the invoice in the language of the user and then revert back the language to what it was.
That's however a bit strange since the invoice generation process of the plugin is called just before the email is sent and at that point it has already been generated. so I don't see why the plugin would influence the language of the email.
Interesting.
The file you want to look at is plugins/hikashop/attachinvoice/attachinvoice.php
There, you have twice the code:
$class->loadLocale($order);
and the code:
if(method_exists($class,'loadBackLocale')){
$class->loadBackLocale();
}else{
$this->loadBackLocale($class);
}
remove them and try again.
These change the language of the page on the fly in order to generate the invoice in the language of the user and then revert back the language to what it was.
That's however a bit strange since the invoice generation process of the plugin is called just before the email is sent and at that point it has already been generated. so I don't see why the plugin would influence the language of the email.
The following user(s) said Thank You: cskmanagement
Please Log in or Create an account to join the conversation.
- cskmanagement
-
Topic Author
- Offline
10 years 9 months ago #228654
by cskmanagement
________________________________
CSK Management
www.cskmanagement.com
Replied by cskmanagement on topic strange language change during checkout
Bingo! Yes, that worked out!
Thanks a lot for this excellent support!!!
One last question: will that file be overwritten when I update HikaShop the next time so that I have to remove the code again?
regards,
Chris
Thanks a lot for this excellent support!!!
One last question: will that file be overwritten when I update HikaShop the next time so that I have to remove the code again?
regards,
Chris
________________________________
CSK Management
www.cskmanagement.com
Please Log in or Create an account to join the conversation.
10 years 9 months ago #228660
by nicolas
Replied by nicolas on topic strange language change during checkout
Hi,
No. The plugin is not included in HikaShop. So you won't loose the change when you update HikaShop.
No. The plugin is not included in HikaShop. So you won't loose the change when you update HikaShop.
Please Log in or Create an account to join the conversation.
Time to create page: 0.103 seconds