Jump to content

Different theme for ordering


nexushosting

Recommended Posts

Hi Guys,

 

I am desperately needing to use the 'default' system template for ordering and my other template for the actual client area. Is there any way I can achieve this? I am aware that it is possible to use different cart templates but that's not going to work for me in this circumstance.

 

Any assistance would be greatly appreciated!

 

Thanks!

Link to comment
Share on other sites

Hi,

 

I tried use php to detect the page (either clientarea or cart) and include different headers based on the response but it will be too difficult considering the complex functions I have already used in the header file.

 

Is there any way to do this, or a better alternative to php?

 

Thanks in advance!!!

Link to comment
Share on other sites

You don't have to use PHP, just use smarty conditionals. you could check the value of $smarty.server.PHP_SELF to see if you're viewing cart.php (effectively, the order form). If you are, show X code.

 

Hi,

 

Thanks for that, I have tried to use smarty code as below in my header.tpl file but I still can't get it to work. It doesn't output anything. Where nexusnetheader.php is the header for my theme and carttheader.php is the header for the default template.

 

{if $smarty.server.PHP_SELF == "https://domain.com/cart.php"}

{include include file='https://domain.com/includes/cartheader.php'}

{else include file='https://domain.com/includes/nexusnetheader.php'}

{/if}

 

Thanks!!!!

Link to comment
Share on other sites

Take a look and see what PHP_SELF actually returns..

 

http://php.net/manual/en/reserved.variables.server.php

 

Alistair's solution is probably better anyways.

 

Ok,

 

Thanks. Alastair's solution would be the easiest, however the issue is that it obviously puts the template type in a cookie, so when the user finishes the order, they use the default template, when I want them to use my system template. Unless i'm missing something here?

 

Or, is there any way to pick up the theme that is being used and change it based on the page?

 

Thanks in advance.

Link to comment
Share on other sites

Hi,

 

Thanks for that, I have tried to use smarty code as below in my header.tpl file but I still can't get it to work. It doesn't output anything. Where nexusnetheader.php is the header for my theme and carttheader.php is the header for the default template.

 

{if $smarty.server.PHP_SELF == "https://domain.com/cart.php"}

{include include file='https://domain.com/includes/cartheader.php'}

{else include file='https://domain.com/includes/nexusnetheader.php'}

{/if}

 

Thanks!!!!

 

Try:

 

{if $filename eq 'cart'}

{include file='name-of-your-template-folder/cartheader.tpl'}

{else}

{include file='name-of-your-template-folder/nexusnetheader.tpl'}

{/if}

 

If you are using the "portal" template, the name-of-your-template-folder would simply be portal, e.g:

 

{include file='portal/cartheader.tpl'}

 

Notice it's a .tpl file, not PHP.

 

Hope it helps.

Link to comment
Share on other sites

Try:

 

{if $filename eq 'cart'}

{include file='name-of-your-template-folder/cartheader.tpl'}

{else}

{include file='name-of-your-template-folder/nexusnetheader.tpl'}

{/if}

 

If you are using the "portal" template, the name-of-your-template-folder would simply be portal, e.g:

 

{include file='portal/cartheader.tpl'}

 

Notice it's a .tpl file, not PHP.

 

Hope it helps.

 

Hi,

 

Your help is much appreciated. I have tried using this however nothing is shown in the header now, so the source of the login page is just the content of that page, the header is not included at the top.

 

Any other ideas?

 

Thanks,

Matthew

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