• Resolved barb55

    (@barb55)


    Hi,
    I noticed that when using the plain emails(not html), the coupon line is not styled like other lines(subtotal, shipping, total etc). Please see this screenshot. The value of the coupon(in my case “Rabatt” is immediately after the word Rabatt, whereas all other lines have a large indent. Can you please fix this in the next update and also give me a quick fix for now?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hello there,

    You can set spacing (a tab) before showing the coupon code in the email template. To do that please check:

    * https://learnwoo.com/customizing-woocommerce-email-templates/
    * Set spacing for tab characters.

    I hope this helps.

    Thread Starter barb55

    (@barb55)

    @ihereira Thanks, could you please let me know which template and where in the template? I looked at email-order-items.php and email-order-details.php and cannot find where the couppn line is added.

    Mirko P.

    (@rainfallnixfig)

    Hi @barb55,

    Depending on which email you want to override, WooCommerce will show the template you’d want to change. For the “Completed order” email the template to override is customer-completed-order.php that you can copy to your child theme folder.


    Link to image: https://i.imgur.com/LHZlFI6.png

    There’s more information on the template’s structure and how to override templates on this support documentation:

    https://woocommerce.com/document/template-structure/

    Cheers.

    Thread Starter barb55

    (@barb55)

    @rainfallnixfig Thanks but that does not answer my question. I am not new to overriding templates and am already overriding quite a few of them, including some of the emails. But if youu look at my first post with the included image, the part I am sking about is not only in one of the emails, it is part of the order, so it must be either in email-order-items.php or email-order-details.php. But I cannot find it there.

    Hi @barb55

    I believe this is a bit more complex since the email templates uses some OOP-abstraction methods.

    What you can try, starting with your email-orders-details.php is working with some custom codes, to edit them, here’s a link with some tips about it!

    Also, if you’re using a translation plugin, you can just try to indent your “Rabatt” word by adding some spaces on it.

    If everything fails, you can also visit the WooCommerce Facebook group or the #developers channel of the WooCommerce Community Slack.

    We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, as well.

    All the best,

    Thread Starter barb55

    (@barb55)

    @chiape Thanks, but that still does not help in how to change the indent for the coupon row! Please can you let me know which part of the email-order-details.php I need to change?

    Thank you. And could this also please be fixed in the next update?

    Hi @barb55! How’s it going today?

    I tried to reproduce it on my test site, and I couldn’t!

    Using a plain text template, this is how it looks like on my end, with a basic setup (Woo + Storefront theme):

    https://snipboard.io/X6py41.jpg

    I’d recommend you to make a conflict test, disabling all of your plugins except for WooCommerce and switching your theme to the Storefront theme, to see how it goes.

    You can read more details about how to test for conflicts here:

    https://docs.woocommerce.com/document/how-to-test-for-conflicts

    If you’re still having issues with that, asking on the WooCommerce Facebook group or the #developers channel of the WooCommerce Community Slack will grant you a chat with the best WooCommerce developers around, and I am sure they will love to help you out!

    Thank you!

    Thread Starter barb55

    (@barb55)

    Okay, I realised that is has to do with the length of the word…in English, “discount” has enough characters for the indent(since it is followed by a tab), but in other languages, the word is shorter and thus the tab indent is shorter!

    Glad that it could be figured out!

    If you have further questions, feel free to create a new thread.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Plain email coupon line/styling’ is closed to new replies.