Jump to content
xt:Commerce Community Forum

order_send Email Gestaltung: jede zweite Zeile farbig


flavor

Recommended Posts

Moin!

Ich benötige eine kleine Hilfestellung. In der 4er Version waren in der Bestätigungsmail die Artikelauslistungen abwechselnd farbig gestaltet um diese besser lesen zu können. In der 5er ist das leider nicht mehr der Fall. Gibt es eine Möglichkeit das einfach zu lösen, PHP oder CSS?

 

Die aktuelle send_order sieht so aus:

 

{include file="file:$_system_root_templates/email/email_top.html"}

<!-- // Begin Content \\ -->

<table class="email-content" cellpadding="0" cellspacing="0" width="660" style="font: 12px Arial, Helvetica, sans-serif;color: #484848;">

    <tr>

        <td colspan="6" class="left" align="left">

            <h1 style="font-size:14px;">Ihre Bestellung zur Kontrolle</h1>

            Hallo {$order_data.delivery_firstname} {$order_data.delivery_lastname},<br /><br /> vielen Dank f&uuml;r Ihre Bestellung in unserem Online Shop.</td>

    </tr>

    <tr>

        <td colspan="6"><br /></td>

    </tr>

    <tr>

        <td colspan="3" align="left">

            <h2 style="font-size:12px;">{txt key=TEXT_ORDER_NUMBER}</h2>

            {$order_data.orders_id}

        </td>

        <td colspan="3" align="left">

            <h2 style="font-size:12px;">{txt key=TEXT_ORDER_DATE}</h2>

            {$order_data.date_purchased}

        </td>

    </tr>

    <tr>

        <td colspan="6"><br /></td>

    </tr>

    <tr>

        <td colspan="3" align="left">

            <h2 style="font-size:12px;">{if $order_data.customers_cid}{txt key=TEXT_CUSTOMER_ID}</h2>

            {$order_data.customers_cid}{/if}

        </td>

        <td colspan="3" align="left">

            <h2 style="font-size:12px;">{txt key=TEXT_EMAIL}</h2>

            {$order_data.customers_email_address}

        </td>

    </tr>

    <tr>

        <td colspan="6"><br /></td>

    </tr>

    <tr>

        <td colspan="3" align="left">

            <h2 style="font-size:12px;">{txt key=TEXT_SHIPPING_ADDRESS}</h2>

            {if $order_data.delivery_company}{$order_data.delivery_company}<br />{/if}

            {if $order_data.delivery_company_2}{$order_data.delivery_company_2}<br />{/if}

            {if $order_data.delivery_company_3}{$order_data.delivery_company_3}<br />{/if}

            {$order_data.delivery_firstname} {$order_data.delivery_lastname}<br />

            {$order_data.delivery_street_address}<br />

            {if $order_data.delivery_suburb}{$order_data.delivery_suburb}<br />{/if}

            {$order_data.delivery_postcode} {$order_data.delivery_city}<br />

            {if $order_data.delivery_state}{$order_data.delivery_state}<br />{/if}

            {$order_data.delivery_country}<br />

            {if $order_data.delivery_phone OR $order_data.delivery_mobile_phone OR $order_data.delivery_fax}<br />{/if}

            {if $order_data.delivery_phone}{txt key=TEXT_PHONE} {$order_data.delivery_phone}<br />{/if}

            {if $order_data.delivery_mobile_phone}{txt key=TEXT_MOBILE_PHONE} {$order_data.delivery_mobile_phone}<br />{/if}

            {if $order_data.delivery_fax}{txt key=TEXT_FAX} {$order_data.delivery_fax}<br />{/if}

        </td>

        <td colspan="3" align="left">

            <h2 style="font-size:12px;">{txt key=TEXT_PAYMENT_ADDRESS}</h2>

            {if $order_data.billing_company}{$order_data.billing_company}<br />{/if}

            {if $order_data.billing_company_2}{$order_data.billing_company_2}<br />{/if}

            {if $order_data.billing_company_3}{$order_data.billing_company_3}<br />{/if}

            {$order_data.billing_firstname} {$order_data.billing_lastname}<br />

            {$order_data.billing_street_address}<br />

            {if $order_data.billing_suburb}{$order_data.billing_suburb}<br />{/if}

            {$order_data.billing_postcode} {$order_data.billing_city}<br />

            {if $order_data.billing_state}{$order_data.billing_state}<br />{/if}

            {$order_data.billing_country}<br />

            {if $order_data.billing_phone OR $order_data.billing_mobile_phone OR $order_data.billing_fax}<br />{/if}

            {if $order_data.billing_phone}{txt key=TEXT_PHONE} {$order_data.billing_phone}<br />{/if}

            {if $order_data.billing_mobile_phone}{txt key=TEXT_MOBILE_PHONE} {$order_data.billing_mobile_phone}<br />{/if}

            {if $order_data.billing_fax}{txt key=TEXT_FAX} {$order_data.billing_fax}<br />{/if}

        </td>

    </tr>

    <tr>

        <td colspan="6"><br /></td>

    </tr>

    <tr>

        <td colspan="3" align="left">

            <h2 style="font-size:12px;">{txt key=TEXT_SHIPPING_METHOD}</h2>

            {$order_data.shipping_code}

        </td>

        <td colspan="3" align="left">

            <h2 style="font-size:12px;">{txt key=TEXT_PAYMENT_METHOD}</h2>

            {$order_data.payment_name}

            {if $order_data.bank_details}
                <br />
                {txt key='TEXT_BANK_DETAILS'}<br />

                {foreach from=$order_data.bank_details item=bd}

                    {txt key='TEXT_BAD_ACCOUNT_NAME'}: {$bd.bad_account_name}<br />

                    {txt key='TEXT_BAD_BANK_IDENTIFIER_CODE'}: {$bd.bad_bank_identifier_code}<br />

                    {txt key='TEXT_BAD_DUE_DATE'}: {$bd.bad_due_date}<br />

                    {txt key='TEXT_BAD_INTERNATIONAL_BANK_ACCOUNT_NUMBER'}: {$bd.bad_international_bank_account_number}<br />

                    {txt key='TEXT_BAD_REFERENCE_NUMBER'}: {$bd.bad_reference_number}

                {/foreach}

            {/if}

        </td>

    </tr>

    <tr>

        <td colspan="6"><br /></td>

    </tr>

    {if $shipping_info_html}

    <tr>

        <td colspan="6" align="left">

            <h2 style="font-size:12px;">{txt key=TEXT_SHIPPING_INFOS}</h2>

            {$shipping_info_html}

        </td>

    </tr>

    <tr>

        <td colspan="6"><br /></td>

    </tr>

    {/if}

    {if $payment_info_html}

    <tr>

        <td colspan="6" align="left">

            <h2 style="font-size:12px;">{txt key=TEXT_PAYMENT_INFOS}</h2>

            {$payment_info_html}

        </td>

    </tr>

    <tr>

        <td colspan="6"><br /></td>

    </tr>    

    {/if}

    {if $order_data.comments}

    <tr>

        <td colspan="6" align="left">

            <h2 style="font-size:12px;">{txt key=TEXT_COMMENTS}</h2>

            {$order_data.comments}

        </td>

    </tr>

    <tr>

        <td colspan="6"><br /></td>

    </tr>

    {/if}

    <tr>

        <td colspan="6" align="left">

            <h2 style="font-size:12px;">Ihre Bestellung</h2>

        </td>

    </tr>

    <tr>

        <td align="left" class="left bold myfont" style="font-weight:bold;">{txt key=TEXT_QTY}</td>

        <td align="left" class="left bold" style="font-weight:bold;">{txt key=TEXT_ARTICLE}</td>

        <td align="left" class="left bold" style="font-weight:bold;">{txt key=TEXT_PRODUCTS_MODEL}</td>

        <td align="right" class="right bold" style="font-weight:bold;">{txt key=TEXT_SINGLE_PRICE}</td>

        <td align="right" class="right bold" style="font-weight:bold;">{txt key=TEXT_PRODUCTS_DISCOUNT}</td>

        <td align="right" class="right bold" style="font-weight:bold;">{txt key=TEXT_TOTAL_PRICE}</td>

    </tr>

     <tr>

        <td colspan="6"><br /></td>

    </tr>

    {foreach name=aussen item=order_values from=$order_products}

    <tr class="order-products">

        <td align="left" class="left">{$order_values.products_quantity} x</td>

        <td align="left" class="left">{$order_values.products_name}</td>

        <td align="left" class="left">{$order_values.products_model}</td>

        <td align="right" class="right">{$order_values.products_price.formated}</td>

        <td align="right" class="right">{if $order_values.products_discount != ""}{$order_values.products_discount}%{else}-{/if}</td>

        <td align="right" class="right">{$order_values.products_final_price.formated}</td>

    </tr>

    <tr>

        <td colspan="6"><br /></td>

    </tr>

    {$order_values.products_information.html_content}

    {/foreach}

    <tr class="order-subtotal">

        <td colspan="4"></td>

        <td align="right" class="right bold"  style="font-weight:bold;">{txt key=TEXT_SUB_TOTAL}:</td>

        <td align="right" class="right">{$total.product_total.formated}</td>

    </tr>

     <tr>

        <td colspan="6"><br /></td>

    </tr>

    {foreach name=aussen item=order_total_values from=$order_total_data}

    <tr class="order-shipping" >

        <td colspan="4"></td>

        <td align="right" class="right">{$order_total_values.orders_total_name}:</td>

        <td align="right" class="right">{$order_total_values.orders_total_price.formated}</td>

    </tr>

    {/foreach}

    {foreach name=aussen item=tax_data from=$total.total_tax}

    <tr class="order-tax">

        <td colspan="4"></td>

        <td align="right" class="right">MwSt. {$tax_data.tax_key}%:</td>

        <td align="right" class="right">{$tax_data.tax_value.formated}</td>

    </tr>

    {/foreach}

     <tr>

        <td colspan="6"><br /></td>

    </tr>

    <tr class="order-total">

        <td colspan="4"></td>

        <td align="right" class="right bold" style="font-weight:bold;">{txt key=TEXT_TOTAL}:</td>

        <td align="right" class="right">{$total.total.formated}</td>

    </tr>

    {hook key=email_send_order_rows_bottom}

</table>

<!-- // End Content \\ -->

{include file="file:$_system_root_templates/email/email_bottom.html"}

Link to comment
Share on other sites

  • 1 month later...

Das sollte mit css relativ einfach klappen. Du könntest aus der Tabelle mit den Artikeln per child-Pseudo-Klasse jede zweite Zeile einfärben:

html:
... <tr class="order-products"> ...

css:

.order-products:nth-child(2n) {
    background-color: #ededed;
}

 

Damit wird nur jedes zweite (also 2, 4, 6, 8 etc.) TR mit class="order-products" angesprochen und kann gestyled werden, die anderen Zelien (1, 3, 5, 7 etc.) bleiben unverändert.

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
  • Create New...