Forum Replies Created

Viewing 15 replies - 31 through 45 (of 50 total)
  • Thread Starter psivel

    (@psivel)

    Hi,

    I use SIP to send follow-up emails to check if the clients have received their orders. Since the email subject contains customer’s name and comes in 5 languages I tried the following:

    add_filter( ‘haet_mail_use_template’, ‘customize_template_usage’, 10, 2 );

    function customize_template_usage( $use_template, $mail ){
    $strings = array(“avez-vous bien re?u votre commande ?”,”did you receive your order ?”,”has recibido bien tu pedido?”,”heb je je bestelling ontvangen?”,”Hast du deine Bestellung erhalten?”);
    foreach ($strings as $string) {
    if (strpos($string, $mail[‘subject’]) !== FALSE) {
    return false;
    }
    }

    return true;
    }

    but it doesn’t work, return false is never fired and I always get the header setup in your plugin.

    Anyway I’ve checked the box “Allow HTML code in plain text content type” in the settings and it solves the issue even if I have some side effects in SIP html code and would prefer to get rid of your plugin in SIP emails. But with some fine tuning it seems to be working.

    Thanks for your help.

    Thread Starter psivel

    (@psivel)

    Perfect thank you !

    Thread Starter psivel

    (@psivel)

    Hi,

    Thank you for your answer. Meanwhile I’ve installed a domain name I’m sorry, the correct page is https://www.marc-torres.com/blog/

    OK Sorry for my last message I just didn’t know how .pot, .po and .mo files are working. After having read a little about it and installed Poedit I managed to create localized .mo files and it works partially. The labels are ok but the placeholder is not translated…

    Thread Starter psivel

    (@psivel)

    WPML

    Hi,

    I just want to use your plugin to display the default fields to propose a gift wrap option in the product page. So I need to translate 3 strings: “Gift wrap ?”, “Message” and “Type your message here…”. I’ve tried to add these strings in the .pot file in the format:

    msgid “Gift wrap ?”
    msgstr “”

    But where do I translate them ? Should they be translatable in WPML ? I still don’t see them in WPML String Translation…

    Thread Starter psivel

    (@psivel)

    Reloading the page after saving won’t change nothing since the shipping confirmation email is sent as soon as tracking number and order status is changed by your plugin.

    Well it’s 3 messages you say that the problem cannot be caused by your plugin but I’ve deactivated everything but woocommerce, WPML, Advanced shipment and WP Email and I have exactly the same behaviour:

    – When I manually change the order status, the page is refreshed and the country name is correctly sent in the confirmation email (Deutschland)
    – When I change the status via your plugin, the country name in the email is Allemagne…

    So IMHO it’s obvious that there is something wrong in the way your plugin (or Ajax) fires the woocommerce functions…

    I’ve also opened a ticket on WPML, let’s see if they will me more helpful.

    Thanks.

    Thread Starter psivel

    (@psivel)

    Hello,

    I’ve changed from Kadence to WP HTML Mail – WooCommerce and it has solved my problem. All my emails are translated correctly.

    Now I have another problem. When I use the checkbox to automatically change order status (via Ajax right ?) the customers country is no more translated. So, for example, a german customer who has received the order confirmation email with “Deutschland” in his address, sees “Allemagne” in the shipping confirmation email. I see that your plugin contains strings for country names so I’ve also translated them for Germany in order to do my tests but it doesn’t solve the issue.

    Remark: This not happens if I do the process in 2 steps (tracking number + order status leaving the checkbox unchecked) but, as stated above, if I do that my discount coupons display wrong amounts…

    Can you help me with that one ?

    Thanks

    Thread Starter psivel

    (@psivel)

    Sorry problem solved it was a Shipment tracking misconfiguration.

    Thread Starter psivel

    (@psivel)

    Hi,

    Thank you for your answer. Error logs don’t show nothing but I’ve noticed something: When I change manually the order status, the order page is reloaded but if I change the order status with the Tracking plugin it seems that the script is invoked via Ajax. Could this be the reason of the issue ?

    Thread Starter psivel

    (@psivel)

    Hi,

    What do you mean by “for translate email header and subject, you need to do it with default WooCommerce settings” ? if you mean translate header field and subject with WPML it’s already done since if I don’t check the checkbox these fields are correctly translated. I’ve translated all the fields in my emails in WPML it’s just that in the case I was describing the header and subject were not taken into account…

    But I was telling you it was OK, that I could do the complete process in 2 steps until I find a new side effect..

    Now, when I apply a discount coupon (let’s say 10%), everything is correct until I complete the order.

    – If I complete the order in 2 steps (first tracking number and the change status to complete) the emails are correctly translated but the amount of the discount becomes incorrect (for example a discount of 8,07 € will be recalculated to 8,11 €) thus the completed email and admin order page contains now wrong values…

    BUT

    – If I leave the checkbox checked to set automatically the order status to completed, then the subject and header fields don’t get translated anymore BUT the discount amount are still correct (and they are also correct in the completed email sent to customers).

    So I need to leave this checkbox checked to keep the correct discount values and I need to find the solution to translate correctly the subject and header.

    What do you suggest ?

    Regards,

    Pierre

    Thread Starter psivel

    (@psivel)

    OK problem solved deactivating your email template in woocommerce emails list but ALSO in your plugin settings… Sorry for this long thread for nothing.

    Just remains the first problem about the checkbox…

    Thread Starter psivel

    (@psivel)

    To conclude: If I mark the NL and DE orders as Complete without using your plugin to add a tracking number, the emails are correctly translated. But obviously I lose the tracking table… It seems that there is a problem with your plugin though…

    Thread Starter psivel

    (@psivel)

    Just to add a detail to my last message:

    Now I’m testing with all my languages (FR, EN, ES, NL, DE) using the trick above (first saving the tracking number and then changing order status to send the mail). Everything works fine in FR, EN, ES but I have a problem in NL and DE for the “order complete” email.

    In NL, everything is OK except the order details table header. The title “Order details”, Order number, order date and column titles (Product, Quantity and Price) are in english. The rest is in Dutch.

    In DE, the main text (Hello customer, we are pleased to inform you blablabla…) is in French (my main language), the tracking info table, the entire order details table, the adresses headers and even the footer (which I have translated in all languages)à are in english…

    I can’t believe that I can have such different results depending on the current language.

    Do you have an idea ?

    Thread Starter psivel

    (@psivel)

    OK thank you. Hope you’ll find something…

Viewing 15 replies - 31 through 45 (of 50 total)