Jump to content

How to duplicate and have 2 viewinvoice.tpl ?


Recommended Posts

Hi !

 

I read and even developed some custom pages following https://developers.whmcs.com/advanced/creating-pages/ , but it always shows the six template (css, menus, ...)

 

I would like to have 2 viewinvoice.tpl and with an if SMARTY statment in viewinvoice.tpl like:

 

{if $customerisfromArgentina}
{php} header ('Location: viewinvoiceARG.php'); {/php}
{else}
  {php} header ('Location: viewinvoiceORIGINAL.php'); {/php}
{/if}

 

How can i do it ? as with a custom page, it brings menu, and all template, i just need a blank page to design my own viewinvoice with customer details.

Link to comment
Share on other sites

I read and even developed some custom pages following https://developers.whmcs.com/advanced/creating-pages/ , but it always shows the six template (css, menus, ...)

I would like to have 2 viewinvoice.tpl and with an if SMARTY statement in viewinvoice.tpl like:

How can i do it ? as with a custom page, it brings menu, and all template, i just need a blank page to design my own viewinvoice with customer details.

if it were me, i'd just use 1 template that contains 2 different layouts - and definitely not even consider using {php} in the template!

 

you know the client has to be logged in to view the invoice, so you should be able to do this....

 

{if $clientsdetails.country eq 'Argentina'}
new layout
{else}
existing layout
{/if}

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