mweimerskirch / wordpress-qtranslate-support-for-woocommerce

Plugin to make qTranslate work with WooCommerce
wordpress.org/plugins/qtranslate-support-for-woocommerce/
MIT License
6 stars 7 forks source link

https redirect is broken #5

Open jolona opened 10 years ago

jolona commented 10 years ago

Hello Mikel,

That´s the right place to put this, I think. Firstly I want to congratulation for wordpress-qtranslate-support-for-woocommerce plugin. I put you five stars.

For me all works well except two things:

1.- Horizontal menu and links doesn´t work well with ssl (https). I can see the translation in the second language menu label, links point to HTTP English link but really goes to my default language paralel page and links should point to HTTPS in ssl pages.

Eg: I put the mouse over "My account" option in English main menu and I see this link: http://www..com/en/my-account/ >> If I click into this link I really go to https://www..com/my-account/ (https in Spanish) because the right link should be https://www..com/en/my-account/

2.- Image products of the shop in the second language point to the right link but if I press into buttons "DETAILS" or "SELECT OPTIONS" of the shop page, that buttons link to the default language (Spanish).

My website is http://www..com (Spanish) and http://www..com/en/ (English) Can you help me?

Thanks for your great plugin.

Javier

mweimerskirch commented 10 years ago

1: The menu is not changed by this plugin. You should check your WooCommerce configuration and update your permalinks settings.

2: I'll see what I can do about the buttons.

mweimerskirch commented 10 years ago

"2" should be fixed by commit 0bfef9e87a67f85cb94c40c2ba689ce8e60e37b5 (version 1.0.3)

jolona commented 10 years ago

WOW MICHEL! It is fantastic! It works perfect! Thanks for your support.

About point number 1 I will check my WooCommerce configuration but in my oppinion the menu is changed by qTranslate because in Spanish all permalinks work well and in the second language permalinks are not the same, because qTranslate convert all HTTPS links in HTTP links and the result is that links doesn´t point well.

Eg:

When the default Spanish Menu point to http://www.mydomain.com/test >> English menu point to http://www.mydomain.com/en/test >> THAT´S PERFECT. WORKS FINE.

But when I have a link in default Spanish Menu with ssl HTTPS://www.mydomain.com/test >> I think that English menu link in second language should be HTTPS://www.mydomain.com/en/test and really it is HTTP://www.mydomain.com/en/test (without ssl). I think this is a problem from qTranslate but What´s your oppinion?

Thank you very much for your help. I appreciate it very much.

Javier

mweimerskirch commented 10 years ago

OK, I understand now. The menu URL is correct, but WooCommerce redirects to the wrong HTTPS address.

mweimerskirch commented 10 years ago

I'll leave the issue open but I won't be able to fix it right away. The problem is in woocommerce-functions.php, function woocommerce_template_redirect() lines 84 to 90. WooCommerce constructs the URLs to redirect to using the $_SERVER array instead of using the internal functions of WordPress (e.g. get_permalink()).

jolona commented 10 years ago

Ok Michel,

You are right. All HTTPS links goes to the wrong HTTP address. First of all I will contact to Woocommerce support and I will explain what you told me and I hope they fix this problem. When I have the answer I will post you.

Another related question. Is there any way to add a custom link to the menu? If I could do this, half problem would be resolved because I could add manual https links to the menu.

When I try to do this, text link works fine but URL link doesn´t work if I put for example: [:es]http://www.mydomain.com[:en]http://www.mydomain.com/es

Is there any way to do this?

Thanks for your good work and support.

mweimerskirch commented 10 years ago

That's definitely out of scope of this plugin. Please hire a developer.

jolona commented 10 years ago

Thank you, Michel, I will contact you soon! ;)