Home Forums WoodMart support forum Сhange the language on a category page

Сhange the language on a category page

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #663827

    edgarskairans
    Participant

    Hello.

    I have the following problem: when I change the language on a category page using the WPML plugin, it opens the wrong page. For example, if I’m on /phone-en/ and switch the language to /phone-fr/, everything works correctly. But if I’m on a subcategory like /phone-en/android-en/, it should logically open /phone-fr/android-fr/ when switching languages. However, it just redirects to /phone-fr/ instead.

    It seems like the language switcher only works correctly on the main category level and not on subcategories.

    Could you please help me solve this problem?

    Thanks
    Best Regards

    #663830

    edgarskairans
    Participant

    + private content

    #663868

    Luke Nielsen
    Keymaster

    Hello,

    Could you please check how it works with some default WordPress themes like TwentyTwenty or WooCommerce Storefront to understand is it our theme issue or not?

    Kind Regards

    #663894

    edgarskairans
    Participant

    Hello,

    I tried the TwentyTwenty theme, and everything worked as it should — when switching the language, it opened the same category that was previously open.

    Thanks
    Best Regards

    #663951

    Luke Nielsen
    Keymaster

    Hello,

    I have checked it on your end and it works well, here is a video – https://dropmefiles.com.ua/en/4K6s38

    https://prnt.sc/9WCyV3GsN-aU -> https://prnt.sc/F0CjiIJTl8vJ -> https://prnt.sc/C4UZaOU3GVIP

    Kind Regards

    #663955

    edgarskairans
    Participant

    Hello

    It used to work for me sometimes too — it’s probably an exception. I just tried it again, and it’s not working for me. I cleared the cache, but it still doesn’t work. I added a link with a large number of subcategories. Please open it and try switching between languages and categories.

    Thanks
    Best Regards

    #663958

    Luke Nielsen
    Keymaster

    Okay, I see. It happens on my side only once when I first visit the category. May I check how it works on the default theme?

    Kind Regards

    #663972

    edgarskairans
    Participant

    Yes, of course.

    I tried to reproduce the bug on the TwentyTwenty theme, but I couldn’t.

    #664035

    Luke Nielsen
    Keymaster

    Hello,

    You use the AJAX Shop functionality, in this case, when the subcategory page is loaded via AJAX and you change the language it will redirect you to all categories. If you do not want such behaviur, you can disable the AJAX Shop via Theme Settings -> Product archive – https://prnt.sc/5fZCSJvyaTWP

    Kind Regards

    #664136

    edgarskairans
    Participant

    Hello.

    But this is not the correct functionality — how can I disable AJAX for categories but keep it enabled for everything else?

    Thanks
    Best Regards

    #664147

    Luke Nielsen
    Keymaster

    Hello,

    Unfortunately, there is no way to disable it for the specific categories as it applies to the shop globally.

    If you have any additional questions, let me know.

    Kind Regards

Viewing 11 posts - 1 through 11 (of 11 total)