Jump to content

Custom Orderform Template Customization Smarty Problem (Cart.PHP)


LeeStrong

Recommended Posts

This issue has been resolved, thanks for your help.

 

In main template header.tpl:

{if ($smarty.server.SCRIPT_NAME eq "/cart.php")}

 

The code below the if statement will show when the web address bar is cart.php.

When adding an item to the cart, or adding a product domain the web address bar shows:

cart.php?a=add&pid=4&billingcycle=annually

 

The if statement is then ignored and does not trigger.

 

Does anyone have any inclination as to why this is?

 

Edit: This same code works when I use a different order form. Still don't know why.

Edited by LeeStrong
Link to comment
Share on other sites

I understand it should work because it seems to work correctly when using the stock orderforms, however not under the one I have created. Thanks again though, I'm about to do a more in depth search and try my best to find out why it's doing this.

Link to comment
Share on other sites

I can see you've found a solution but if I understand correctly you're looking to detect if the user is on cart.php? If so you can use:

 


{if $filename eq "cart"}

{/if}

 

 

Or with PHP (has it's benefits in certain cases):

 

{if $filename eq "cart"}
{php}$page = 'cart';{/php}
{/if}

{php}if ($page=='cart') { {/php}

content for cart

{php} } {/php}

 

Jack

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