X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   editing customer_details.tpl (https://forum.x-cart.com/showthread.php?t=19586)

NightFire 01-29-2006 02:43 AM

editing customer_details.tpl
 
Hi,

I tried to edit the customer_details.tpl

But everytime if I use html codes within it I get a smarty error.
Here is an example of the code which I'm using:

Code:

<table border="0" width="100%">
        <tr><tr>
                <td bgcolor="F3F9F2">{$lng.lbl_personal_information}

                {if $userinfo.default_fields.firstname}

                {$lng.lbl_first_name}: {$userinfo.firstname}

                {/if}

                {if $userinfo.default_fields.lastname}

                {$lng.lbl_last_name}: {$userinfo.lastname}

                {/if}

                {if $userinfo.default_fields.phone}

                {$lng.lbl_phone}: {$userinfo.phone}

                {/if}

                {if $userinfo.default_fields.fax}

                {$lng.lbl_fax}: {$userinfo.fax}

                {/if}

                {if $userinfo.default_fields.email}

                {$lng.lbl_email}: {$userinfo.email}

                {/if}

                {if $userinfo.default_fields.url}

                {$lng.lbl_web_site}: {$userinfo.url}

                {/if}

                {foreach from=$userinfo.additional_fields item=v}{if $v.section eq 'C'
                || $v.section eq 'P'}

                {$v.title}: {$v.value}

                {/if}{/foreach}</td>
                <td bgcolor="F3F9F2">{$lng.lbl_additional_information}:

                {assign var=&quot;is_header&quot; value=&quot;Y&quot;}{/if}

                {$v.title}: {$v.value}

                {/if}{/foreach} </td>
        </tr>


pauldodman 01-29-2006 02:46 AM

Don't know if this is the problem, but the 1st thing I notice is the 2nd line has 2 table row open tags next to each other.

<tr><tr>

Is that right?

NightFire 01-29-2006 03:11 AM

Well, it doesn't make any difference by removing the <tr> tag.
I get the following error:


Code:

Fatal error: Smarty error: [in ./customer/main/customer_details.tpl line 28]: syntax error: mismatched tag {/if}. (Smarty_Compiler.class.php, line 2277) in C:\XAMPP\xampp\htdocs\shop\Smarty-2.6.9\Smarty.class.php on line 1088

Edit: My live shop is on a apache server. But I'm doing my template editing and modifications on a test server on my own computer, so that my live shop won't be interrupted.

pauldodman 01-29-2006 03:15 AM

Well the error message is saying that you have an /if statement out of place - check that your if statements are all correct and are started and ended properly.

NightFire 01-29-2006 03:23 AM

Quote:

Originally Posted by pauldodman
Well the error message is saying that you have an /if statement out of place - check that your if statements are all correct and are started and ended properly.


Thanks. Html is working, the problem was there were some tags not correct.
Have to start all over again. But it will work now.
Thanks for your help.


All times are GMT -8. The time now is 06:51 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.