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)
-   -   How to modify Chekout pages template? (https://forum.x-cart.com/showthread.php?t=8412)

magder 07-11-2004 12:04 PM

How to modify Chekout pages template?
 
I want to remove the right column from the checkout pages.

I found a post with some information but it wasn't completely clear to me how this would be done.

I'm assuming I must create a new template
And call that template from a php file.

I have not been able to find the php file from which to change that template information however.

A few hints would be great.

Thanks

laureon 07-11-2004 01:10 PM

Could you describe exactly what you wish to remove from the checkout pages please?

magder 07-11-2004 01:57 PM

I'd like to be able to drop the right column boxes and have the checkout details span both columns.

laureon 07-11-2004 04:31 PM

Hi,

Off the top of my head, I think you could just hide the third right hand column by using an 'if' statement. To remove the column on the checkout page add the 'if' statement above the opening <td> tags for the column:
Code:

{if $main ne "checkout" }
and then after the closing </td> tags of that column:
Code:

{else}
{/if}


You can replace the "checkout" with the name of the smarty variable for any other pages where you wish to hide the right hand column.

HTH

magder 07-11-2004 07:13 PM

That worked. Thanks for the help.
If I now want the middle section to span two columns do I use a conditional statement for the colspan or do I need to make a new template that spans both columns?

BCSE 07-11-2004 08:20 PM

Quote:

Originally Posted by magder
If I now want the middle section to span two columns do I use a conditional statement for the colspan or do I need to make a new template that spans both columns?


You should be able to use a conditional statement for the colspan too. I've done conditional statements inside table tags before.

Carrie

magder 07-12-2004 02:41 AM

I had a look at the smarty documentation and couldn't figure out what the syntax would be for a conditional <td> attribute.

would I just repeat the table cell code like this:

Code:

{if $main ne "checkout"}
<td>
insidie td
</td>

{else}

<td colspan="2">
insidie td
</td>

{/if}


Or would the if statement go inside the <td> tag?

BCSE 07-12-2004 08:32 AM

Try the IF statement in the <td> tag. I've done it before for TR background changes depending on a condition.

So something like
Code:

<td {if $main eq $checkout}colspan=2{/if}>

I know I've done something similar in a <TR> tag.

Carrie

magder 07-12-2004 09:38 AM

Quote:

<td {if $main eq $checkout}colspan=2{/if}>

doesn't that mean that the colspan will not show while in checkout mode?

BCSE 07-12-2004 04:37 PM

eq means equal, so if $main equals checkout, then colspan=2. So on checkout, span 2 columns.

Hope that makes sense.

Carrie

magder 07-14-2004 05:29 AM

Thanks for the help. Your posts taught me quite a bit.

I appreciate the help!

If I knew what I know now about the complexity of this templating system I might have gone with another cart.

But I did want the flexibility is allows. So I guess you get what you pay for so to speak.

BCSE 07-14-2004 05:35 AM

No problem! It's a bit overwhelming at first but very flexible. This url may help too if you've not seen it yet.

http://smarty.php.net/docs.php

Carrie


All times are GMT -8. The time now is 07:58 AM.

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