samnabi / shopkit

Comprehensive commerce solution for Kirby CMS v2
https://shopkit.samnabi.com
Other
99 stars 15 forks source link

Problem with Language Detection / Routing #150

Closed matobeag closed 7 years ago

matobeag commented 7 years ago

My browser is german so If I place an order with the "pay later" function, I get transferred to the wrong page on the last step: http://shopkit.dev/shop/orders?txn_id=dfc9fe96a987042f94c763704a1958c1 11

The link should be like in the confirmation email with the detected language in the URL: http://shopkit.dev/de/shop/orders?txn_id=dfc9fe96a987042f94c763704a1958c1 00

Can i get rid of the I language detection completely? I tried to delete it in the config file but it still did not work.

samnabi commented 7 years ago

Thanks for pointing this out. I'll fix this in the next version of Shopkit.

Shopkit requires the multilanguage features of Kirby, so it's not possible to convert it to a single-language site... although perhaps you could set DE as the default, then remove the other language options in config.php. I'll have to look into that.

matobeag commented 7 years ago

Thanks you for the fast response. If I set DE as default and remove the other languages the Variants and Options disappear in the front- and backend.

With all languages

bildschirmfoto 2017-07-05 um 17 27 47

Only DE

bildschirmfoto 2017-07-05 um 17 27 40
DodoVoelkel commented 7 years ago

I had the same problem also. When you are working with multiple languages, kirby is saving the content in seperate .txt files. like content.en.txt for english and content.de.txt for german. If you deleted all the other languages in your config file, kirby is now looking only for the .de.txt file. It might be that the content was saved in the .en.txt file. Look for it in the content folder.

samnabi commented 7 years ago

That would make sense. Then the blueprint changes because it's reverting to the default blueprint.

samnabi commented 7 years ago

@manuelvonrotz if you follow the steps on this page (especially #4)... do you still get the same Blueprint error?

https://shopkit.samnabi.com/docs/translating-shopkit

matobeag commented 7 years ago

It seems to work well now! Thank you

samnabi commented 7 years ago

Great. There are still some bugs related to your original issue that I'm hoping to fix today.