• Resolved Funnelkit Support

    (@supportfunnelkit)


    Hi team,

    This is Pratik from FunnelKit support.

    We have a mutual customer who is using our FunnelKit Automation plugin to send abandoned cart emails. However, the gTranslate plugin is causing an issue with the abandoned cart link redirection.

    Background: They have different domains configured such as,

    German
    https://example.de/

    English
    https://example.co/

    Spanish
    https://example.es/

    French
    https://example.fr/

    Italian
    https://example.it/

    When a cart is abandoned from any of the site, the FKA running on their main site https://example.de/ captures the cart, language data and trigger an email with the cart recovery link based on the language sends an email. When this link is clicked, the visitor who abandoned cart should be taken to the same site where they left off, but for some reason, they are always taken to their main site.

    For example, if the visitor abandons from https://example.it, they receive an email with recovery link, once clicked they are taken to the https://example.de/ site which is incorrect.

    We are trying to find a way to retrieve language-specific URLs for posts/pages.

    For example, each language has a specific name and page slug, such as:

    Based on this, how can we retrieve the checkout URL for different languages?

    We looked through the gTranslate plugin but did not find any method which we can use to add a filter on the basis of language slug to fetch/replace?the domain name.

    Let us know if you have any way to achieve this.

    Thanks in advance.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author edo888

    (@edo888)

    Hi,

    You can check How to detect current selected language?

    First you need to use $_SERVER['HTTP_X_GT_LANG'] to get the selected language. If it is set, then it means that the user is on the translated version. Based on that you will need to detect the language specific URL.

    You can get the GTranslate settings from $gtranslate_settings = get_option('GTranslate');

    Then you need to check the URL structure:
    $gtranslate_settings['pro_version'] if true, it means that website is using sub-directory URL structure, so you just add the language code on the base like this: https://example.com/XX/...

    $gtranslate_settings['enterprise_version'] if true, it means that the website is using sub-domain URL structure, so you can add the language code on the sub-domain base like this: https://XX.example.com/...

    For sub-domain URL structure case you will need to also check for the presence of custom domains per language, so you also check $gtranslate_settings['custom_domains'] and if it is set, it means the website is using custom domains, so instead of adding the language code to the sub-domain base you will need to check $gtranslate_settings['custom_domains_data'] variable which contains the language codes with associated custom domain. So you just check if $gtranslate_settings['custom_domains_data']['XX'] exists and use it as a base domain: https://$gtranslate_settings['custom_domains_data']['XX']/...

    You can download GTranslate plugin and check gtranslate_add_hreflang_tags function in gtranslate.php file to get the idea, hope it helps.

    Thanks! ??

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.