Jump to content

Customise layout of invioce depending on payment type.


Recommended Posts

Ok, so i added mail payment and i need to have a long description, which ends up with a 100px wide collom which is about 800px long!

 

So i had a go at modding the viewinvoice.tpl file and it didnt work :(

 

okay so i tried making it like this:

{if $logo}<p><img src="{$logo}"></p>{else}<h1>{$companyname}</h1>{/if}
</td>
<td align="center">

{if $status eq "Unpaid"}

<font class="unpaid">{$LANG.invoicesunpaid}</font><br />
{if $allowchangegateway}
<form method="post" action="{$smarty.server.PHP_SELF}?id={$invoiceid}">{$gatewaydropdown}</form>
{else}
{$paymentmethod}<br />
{/if}

{if $gatewaydropdown !eq "Mail Payment"} <!-- Custom -->
{$paymentbutton}
{/if} <!--Custom-->



{elseif $status eq "Paid"}

<font class="paid">{$LANG.invoicespaid}</font><br />
{$paymentmethod}<br />
({$datepaid})

{else}

<font class="cancelled">{$LANG.invoicescancelled}</font>

{/if}

</td></tr></table>
[if $gatewaydropdown eq "Mail Payment"}
<div style="width:100%;border: 1px solid #000">
{$paymentbutton}
</div>
{/if}

{if $offlinepaid}<p align="center">{$LANG.invoiceofflinepaid}</p>{else}<br />{/if}

{if $manualapplycredit}
<div class="creditbox">{$LANG.invoiceaddcreditdesc1} {$currencysymbol}{$totalcredit} {$currency}. {$LANG.invoiceaddcreditdesc2}<br />
<form method="post" action="{$smarty.server.PHP_SELF}?id={$invoiceid}"><input type="hidden" name="applycredit" value="true" />
{$LANG.invoiceaddcreditamount}: <input type="text" name="creditamount" size="10" value="{$creditamount}" /> <input type="submit" value="{$LANG.invoiceaddcreditapply}" />
</form></div>
<br />
{/if}

 

which following the logic of the rest of the template code i thought would work...

 

but no it just returns a blank page...

 

So how can i do it?

 

I just want it to if its the mail payment it shows the box with the desc text in under the header and everything... how can i do it :S

 

Thanks alot!

Dan

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated