If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / Plain Text Email Formatting/Layout - repositioning taxes

Plain Text Email Formatting/Layout - repositioning taxes

Started by mcqueeneycoins on 31 Dec 2024, 1:01 PM · Views: 817

Results 1 to 4 of 4
31 Dec 2024, 1:01 PM
#1
mcqueeneycoins avatar

mcqueeneycoins

Zen Follower

Join Date:
Jan 2008
Posts:
156
Plugin Contributions:
0

Plain Text Email Formatting/Layout - repositioning taxes

Currently using 1.5.8a w/ Bootstrap Template. Successfully modified HTML email formats, but have some display issues on plain text emails. On the order confirmation email, in the order totals section, it looks like this:

Sub-Total: $5.09
  USPS Ground Advantage® (2 days): $6.10 CA State Sales Tax (7.25%): $0.37
Total: $11.56

How can I make sales tax show on new line? I checked includes/classes/order.php but didn't see where it was pulling it from.

4 Jan 2025, 12:42 AM
#2
mcqueeneycoins avatar

mcqueeneycoins

Zen Follower

Join Date:
Jan 2008
Posts:
156
Plugin Contributions:
0

Re: Plain Text Email Formatting/Layout - repositioning taxes

I'm having the same issue with coupons...I know I need a line break after the shipping module text, but just can't figure out where to add the \n. Can someone point me to the right file?

Sub-Total: $190.00
USPS Ground Advantage® (3-8 days): $4.95 Gift Certificates, Coupons & Promo Codes (NEWTCA5): -$9.50
Total: $185.45
4 Jan 2025, 1:14 PM
#3
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,142
Plugin Contributions:
56

Re: Plain Text Email Formatting/Layout - repositioning taxes

Are you looking at the order-totals' layout using your email program or are you using a text-editor to view that information?

I'll note that lines 1343-1346 in the as-shipped zc158a /includes/classes/order.php read

        for ($i = 0, $n = sizeof($order_totals); $i < $n; $i++) {
            $email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) .[B] "\n"[/B];
            $html_ot .= '<tr><td class="order-totals-text" align="right" width="100%">' . $order_totals[$i]['title'] . '</td> ' . "\n" . '<td class="order-totals-num" align="right" nowrap="nowrap">' . ($order_totals[$i]['text']) . '</td> </tr>' . "\n";
        }

Note the CR/LF being added after each order total's title/text.

4 Jan 2025, 2:33 PM
#4
mcqueeneycoins avatar

mcqueeneycoins

Zen Follower

Join Date:
Jan 2008
Posts:
156
Plugin Contributions:
0

Re: Plain Text Email Formatting/Layout - repositioning taxes

lat9:

Are you looking at the order-totals' layout using your email program or are you using a text-editor to view that information?

I'll note that lines 1343-1346 in the as-shipped zc158a /includes/classes/order.php read

    for ($i = 0, $n = sizeof($order_totals); $i < $n; $i++) {
        $email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) .[B] "\n"[/B];
        $html_ot .= '<tr><td class="order-totals-text" align="right" width="100%">' . $order_totals[$i]['title'] . '</td> ' . "\n" . '<td class="order-totals-num" align="right" nowrap="nowrap">' . ($order_totals[$i]['text']) . '</td> </tr>' . "\n";
    }
> Note the CR/LF being added after each order total's title/text.

Thanks, lat9--I've looked at the order.php file and the code matches the as-shipped. I'm thinking it might be something in the shipping module somewhere. I do have the USPS module installed, and the failed line break seems to be occuring after the shipping line only. I'll keep digging to see if I can  figure this one out. At least you confirmed where the order total email text was pulling from and that it is coded as intended, which was my main concern. Thanks!