• Resolved Terbium

    (@terbium)


    Hello,

    My site is a Twenty Twelve child with WooCommerce. My two menus (French and English) work fine, i.e. I can easily switch language with any menu item.

    EXCEPT for Boutique/Shop.

    Boutique was first created in French, like my other pages. Then I clicked the plus sign near the British flag to get an English version. Therefore I have 2 links for my shop:

    https://phototrope.ca/boutique/ (French)
    https://phototrope.ca/shop/ (English)

    Boutique works fine: it shows my product categories. Switching to English activates the proper link, but the page is empty.

    In my WooCommerce settings, Boutique is the default page for Shop. Since there is no shortcode for such a page (like [woocommerce_checkout]), I can’t “force” my English Shop page to display what it should.

    Is this a WooCommerce or a Polylang issue?

    I also notice that in French, when I click on Caisse (checkout) with no items added to the cart, I automatically end up on the Panier (cart) page where I’m told, rightfully, that my cart is empty.

    It doesn’t work in English. Clicking on Checkout with no item in the cart keeps me on the Checkout page with no indication that my cart is empty.

    Thanks for your help.

    https://www.ads-software.com/plugins/woocommerce/

Viewing 14 replies - 1 through 14 (of 14 total)
  • Thread Starter Terbium

    (@terbium)

    Well, let’s forget it.

    I found out that Polylang is unable to deal with WooCommerce’s shop and checkout pages. Too bad…

    Use qTranslate and IM8 qtranslate plugin.

    Thread Starter Terbium

    (@terbium)

    Hi miso00,

    Thank you so much for your tip! I still have a few issues with categories and products, but at least my Shop page is now working in both French and English.

    Prior to your post I had installed WPML for WooCommerce. It was a rip-off for me because the basic version (29 $) didn’t work unless upgrading (79 $) in order to get two missing components. This infuriated me so much that I asked for a full refund (which I got).

    Since you seem quite knowledgeable about Multilingual WooCommerce, allow me to explain my current issues. I posted the following to both WooCommerce and qTranslate forums but nobody has responded yet.

    Here it goes:

    I use WooCommerce and qTranslate in my photo site (Twenty Twelve Child) . Everything works fine, except in the Shop …

    I created three categories of products in French:
    ? Nature – Couleur
    ? Nature – Noir et blanc
    ? Europe

    Each class has two attributes:
    ? Format (3 sizes available)
    ? Présentation (cadre noir, cadre argent, ou non encadrée)

    This thus gives 9 price variations for each photo.

    I duplicated everything and translated into English.

    To build my catalogue, I first created a product in French (with the same title in English), which I then duplicated as many times as necessary by changing only the title. This saved me from specifying 9 price variations for each photo.

    I have done the same in English.

    The problem is when I change the language (“switcher” in the menu). qTranslate correctly translates “Veuillez choisir une option” to “Choose an option” (drop-down menus facing the two attributes), but it fails to translate the rest (eg Format to Size, Cadre noir to Black frame, etc.).

    Should I create Language Tags to eliminate all English price variations? I feel this too many variations screws up qTranslate or WooCommerce…

    In other words should there be only 9 price variations in French? Language Tags would then take over to generate the English variations.

    But I do not know how …

    Moreover, even the Boutique (Shop) page seems unable to manage the languages since it displays all 6 categories at once, instead of 3 in the proper language as it should. So I deleted the English categories in the general settings (not in the products themselves). I ended up, as desired, with 3 categories in the Shop page, but obviously they are only in French.

    Even the English sub-menus are not displayed in their language (although they are OK in the Portfolio tab).

    In short, hours of fun trying, unsuccessfully, to sort it out.

    Thank you for your help!

    I went into very similar process, I think I tried all possible translation plugins and I ended up with a multisite network. Thank you I had not notice polylang didn’t work for the Woocommerce shopping page, I am happy I found that bug early. for the attributes you must use the shortcode tags of IM8 qtranslate plugin. Personnaly I don’t like qtranslate because it is buggy and after we remove it we have to manually clean everything in the site.

    Looks like I solved the problem with this snippet in functions.php in a child theme:

    function get_woocommerce_shop_polylang()
    {
      return pll_get_post(get_option('woocommerce_shop_page_id'));
    }
    add_filter('woocommerce_get_shop_page_id', "get_woocommerce_shop_polylang");

    https://misha.beshkin.lv/woocommerce-polylang-shop-page-in-proper-language/

    Looks it hooks a function in woocommerce to retrieve the id page for the shop then contacts polylang to request the id page of the translated version and returns it to woocommerce so that it renders the page. I wonder why woocommerce doesn’t provides a tag as with the rest of the pages. Would make things much easier.

    Quintus

    (@casperhesseling)

    Hi Waldoalvarez00,

    Have you tried this solution? Did it work?

    I am having the same problem with Woocommerce and Polylang. Both great plugins, but unfortunately Woocommerce has “hardcoded” links to other pages like checkout, cart, my-account, etc. If I change those to another language in the backend it works for that language. You can see it when you hover over the buttons in the shop. They keep redirecting to the default language.

    I am quite new to PHP, so I can not code this myself, but it seems to be a quite easy problem.

    Do you need to do anything else? I guess you need the pages to exist in the other language too? So far, I have tried adding this snippet to functions.php, but no luck. Am I missing something here?

    Hi.

    I’ve got the same problem in my local woocommerce instalation. My site using spanish & english lang. Theme twenty twelve.
    I’ve translate over 90% entries and shop, product, cart, my acoount, Footer, select language flag…
    The lateral tree of category-products show the translate and correct name in “es” and “en” language for categories and subcategories names.
    But when I click over someone link of the category (or subcategories) tree, I get a 404 error.

    The links change from
    localhost/es/categoria-producto/… (when es language is select), to
    localhost/en/product-category/…
    but in both case received 404 error.

    Never works well the english category tree (like 2nd language).

    Before this, the spanish tree works well. Then I’ve turned disable in polylang the taxonomy translate options and turned on again.

    After that don’t work spanish or english tree. Bad

    Any suggestions?

    Thanks in avance

    Hello has anyone been able to get Woocommerce and polylang to work together? Thanks

    I solved the problem.

    From the control pannel navigate Settings->Languages.

    Here in the Polylang Settings go to Settings.

    From the Settings windows check the boxes:
    Products – Products Category – Products Tag.

    Then the languange options will appear.

    That is totally good news thank you very much
    It means that I dont need any other language plugin and can now get on and translate the shop
    Thank you v much

    All above with the Products, Products Category, Products Tag, Cart and Checkout are working and i’m able to translate

    BUT… Did any of you had the problem, with both translation of a product is displayed at the shop page. I mean, it’s the same product with diffrent translation, so of course I don’t want to show them as two diffrent products.

    I don’t want to show them as two diffrent products

    Glad you mention that – I have the same problem – the same item twice (in 2 languages) on the shop page. Can’t move ahead and want to stick to Polylang.

    Glad you mention that – I have the same problem – the same item twice (in 2 languages) on the shop page. Can’t move ahead and want to stick to Polylang.

    I just found the solution. in polylang settings.
    You need to go to : Settings -> Languages and then select the settings tab.
    From the settings menu, instead of having “The language is set from content”, which resulted in the page would be the same and have no language.
    Select “The language is set from the directory name in pretty permalinks”
    Example: https://priceecodesign.kbmedier.dk/en/my-post/

    Then polylang will recognize the language and set the correct products.
    Hope it helps.

    In fact although it works for the shop page – clicking on products – products cannot be found and all the site urls requiring rework of .htaccess.

    likewise your page

    https://priceecodesign.kbmedier.dk/en/my-post/

    comes up 404 not found

    How to combine both?

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘WooCommerce or Polylang problem?’ is closed to new replies.