Community Forums 

Main Content

Customer Receipt HTML template problem with #cart-contents#

    Feb 27 2016 15:52:54

    #1

    rtloon

    Join date : 2016-01-21      Posts : 6

    I have been attempting to modesty modify the template Mal's provides. Everything works except the contents of the #cart_contents# tag, which appear above the table header bar (quantity,product,etc.) rather than below, is not responsive, and seems to have no reasonable cell widths. Am wondering if that tag is misplaced in the template, as it is placed before the header bar. Or whether replacing the previous tag, #customer_message#, with a pasted in customer message, has an impact on the #cart_contents# tag.

    And, as an aside:
    Is there a way to test the HTML edits (including the contents within tags) without having to purchase merchandise to receive a customer receipt?

    Back to the main topic:
    Here is the code, starting from the end of the customer content copy I added into the template (so as to provide more than fits in the customer content fields) replacing the #customer_content# tag (that appeared directly above the #cart_contents# tag in the template) through almost to the end of the file, showing the cart content table elements.
    ___________________
    <span style="font-style: italic;"> If you have any questions,
    email or call me at 309-231-4484 or sunnylanearonia@gmail.com. </span><br>
    <br>
    Teresa<br>
    <br>
    </font></td>
    </tr>
    <tr>
    <td> #Cart_contents#
    <table border="0" cellpadding="3" cellspacing="0" width="100%">
    <tbody>
    <tr>
    <td align="center" bgcolor="#555555" width="12%"><font color="white"
    face="Arial"
    size="2"><b>Quantity</b></font></td>
    <td bgcolor="#555555" width="56%"><font color="white" face="Arial"
    size="2"><b>Product</b></font></td>
    <td align="right" bgcolor="#555555" width="16%"><font color="white"
    face="Arial"
    size="2"><b>Price</b></font></td>
    <td align="right" bgcolor="#555555" width="16%"><font color="white"
    face="Arial"
    size="2"><b>Amount</b></font></td>
    </tr>
    <tr>
    <td colspan="4">
    <hr size="1"></td>
    </tr>
    <tr>
    <td colspan="2"><br>
    </td>
    <td style="background-color: #cccccc;" align="left"><br>
    </td>
    <td style="background-color: #cccccc;" align="right"><br>
    </td>
    </tr>
    <tr>
    <td colspan="2"><br>
    </td>
    <td align="left"><font size="2"><span style="font-family: Arial;"><span
    style="font-weight: bold;">Discount</span></span></font></td>
    <td align="right"><font face="Arial" size="2">-
    #Discount_value#</font></td>
    </tr>
    <tr>
    <td colspan="2"><br>
    </td>
    <td align="left"><font face="Arial" size="2"><b>Sub-total</b></font></td>
    <td align="right"><font face="Arial" size="2">#subtotal#</font></td>
    </tr>
    <tr>
    <td colspan="2"><br>
    </td>
    <td align="left"><font face="Arial" size="2"><b>Tax</b></font></td>
    <td align="right"><font face="Arial" size="2">#Tax_value#</font></td>
    </tr>
    <tr>
    <td colspan="4">
    <hr size="1"></td>
    </tr>
    <tr>
    <td colspan="2"><br>
    </td>
    <td align="left"><font face="Arial" size="2"><b>TOTAL</b></font></td>
    <td align="right"><font face="Arial" size="2">#Total_value#</font></td>
    </tr>
    </tbody>
    </table>
    </td>
    </tr>



    Feb 27 2016 19:00:53

    #2

    rtloon

    Join date : 2016-01-21      Posts : 6

    The initial Mal's template is messed up in the following respects:
    - #cart_contents# appears above the header bar that should be above it to make any sense and be consistent with the structure of the order confirmation
    - Its columns do not align with the columns in the header bar.
    - #customer_message# is empty of content. As I understand it, it should be pulling customer message content entered for non-HTML content above the HTML template option in cart set-up.
    Any suggestions on how to de-bug the template so I can start tweaking something that works properly?

    FYI the template I am referring to is available on this page:
    https://www.mals-e.com/support.php
    - Click on configuring your cart
    - Then on HTML customer receipts
    - Scroll down to download the default template



    Feb 27 2016 21:36:20

    #3

    rtloon

    Join date : 2016-01-21      Posts : 6

    Managed to correct the template and then tweak it to get it working. The #cart_contents# tag needs to be located below the header bar.