Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Template mod

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 09-27-2007, 11:01 AM
 
jwilkers jwilkers is offline
 

Advanced Member
  
Join Date: Oct 2005
Posts: 93
 

Default Template mod

Hello,

Just want some input from xcarters:

for my registration area I've changed the line in register.php

func_display("customer/home.tpl",$smarty)

to:

func_display("customer/register.tpl",$smarty)

for a new "register.tpl" I created in order to customize the look, and to lose the left menu portion of the page. Worked fine, haven't noticed any problem.

WHAT I"M really wondering is, now I'm considering it for product.php as well, in order to customize the product page, lose the left menu and create a better layuout. Is this a good idea, or ok to do for the most part?

Input appreciated.

JW
__________________
JW - Xcart Version: several
dragged one cart's database kicking and screaming from 4.0.16 to 4.4.1.
Reply With Quote
  #2  
Old 09-27-2007, 01:05 PM
 
jwilkers jwilkers is offline
 

Advanced Member
  
Join Date: Oct 2005
Posts: 93
 

Default Re: Template mod

anyone?
__________________
JW - Xcart Version: several
dragged one cart's database kicking and screaming from 4.0.16 to 4.4.1.
Reply With Quote
  #3  
Old 09-27-2007, 01:09 PM
 
jwilkers jwilkers is offline
 

Advanced Member
  
Join Date: Oct 2005
Posts: 93
 

Default Re: Template mod

oh, and here is the site: http://www.thehomeloft.com
__________________
JW - Xcart Version: several
dragged one cart's database kicking and screaming from 4.0.16 to 4.4.1.
Reply With Quote
  #4  
Old 09-28-2007, 12:33 PM
 
jwilkers jwilkers is offline
 

Advanced Member
  
Join Date: Oct 2005
Posts: 93
 

Default Re: Template mod

Is anyone aware of any threads about this?
__________________
JW - Xcart Version: several
dragged one cart's database kicking and screaming from 4.0.16 to 4.4.1.
Reply With Quote
  #5  
Old 09-28-2007, 01:10 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Template mod

Why not just use an {if} statement around the left menu to hide if for certain areas?
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #6  
Old 09-28-2007, 01:18 PM
 
jwilkers jwilkers is offline
 

Advanced Member
  
Join Date: Oct 2005
Posts: 93
 

Default Re: Template mod

ok, I may be able to figure out the syntax for that

think there is anything bad about the way I was thinking of doing it? or just that I may be doing too much work?!!

thanks for your input
__________________
JW - Xcart Version: several
dragged one cart's database kicking and screaming from 4.0.16 to 4.4.1.
Reply With Quote
  #7  
Old 09-28-2007, 03:55 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Template mod

The {if} statement is MUCH easier, and it is always better to edit the templates than mess with the PHP

To hide the left column for the product detail page, you would use this:

{if $main ne "product"}
column code here
{/if}

You can use multiple {if} statements to hide it from different pages...for example, if you want to also hide it from the cart:

{if $main ne "cart" and $main ne "product"}
column code
{/if}
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #8  
Old 10-03-2007, 05:54 PM
 
jwilkers jwilkers is offline
 

Advanced Member
  
Join Date: Oct 2005
Posts: 93
 

Default Re: Template mod

what do I put in the "column code" portion of that statement, just the template I want to eliminate, or do I surround the code for that column with the if statement you've showed me?

thanks!
__________________
JW - Xcart Version: several
dragged one cart's database kicking and screaming from 4.0.16 to 4.4.1.
Reply With Quote
  #9  
Old 10-03-2007, 05:56 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Template mod

You put the code you want to be affected by the if statement in that area. So for the first example, the code in the statement would be hidden on the product page, but visible on all other pages. So you would put the whole table cell of the left column if you want to hide the left column.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #10  
Old 10-03-2007, 05:58 PM
 
jwilkers jwilkers is offline
 

Advanced Member
  
Join Date: Oct 2005
Posts: 93
 

Default Re: Template mod

answered my own question by testing it out surrounding the <TD>...works great, I luuuuuv it. Thank you so much!
__________________
JW - Xcart Version: several
dragged one cart's database kicking and screaming from 4.0.16 to 4.4.1.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 01:25 PM.

   

 
X-Cart forums © 2001-2020