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

can different product templates be used?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #11  
Old 02-19-2007, 07:18 AM
 
prakash123 prakash123 is offline
 

Member
  
Join Date: Jul 2006
Posts: 11
 

Default Re: can different product templates be used?

Yes exactly, my business need doesnt need the xcart default layout.

My home page is index.php

I have a menu

Home Products Articles Forum

Products linked to xcart home.php

Products -> Product 1, Product 2, Product 3, Product 4

Clicking on the products

1.Categories 1 - Product 1 , Product 2

2.Category 2 - Product 3, Product 4

My question is can I have different product templates for each of the products.

as I am just hyperlinking the product from my menu.


Please let me know, if this clarifies, and let me know if this is possible.

Thanks

Prakash


Apologies Asked in the thread:

(PS -- Padraic busts his butt here to help everyone, and your pissy response back is not a good way to start. You didn't follow the forum guidelines, so you were asked to post your version. Basic stuff. Please respect our moderator!

Ballinor I am sorry, I have updated the signature.

I was pissed, because i typed my question, and the first mail, i see is someone asking me to update my signature.)
__________________
Xcart Gold

Linux LAMP Server

Xcart Version 4.1.2
Reply With Quote
  #12  
Old 02-19-2007, 07:29 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: can different product templates be used?

yes, you can easily have different product (and/or category) template layouts ona per-product or per-category basis.

It has NOTHING to do with "linking". You probably shouldn't use that terminology, as it will confuse the issue.

You have 2 ways to do this:

1. use if/else statements, as suggested by Padraic
2. use the mod(s) from websiteCM.

If you want to see how the if/else in products.tpl work, on a very basic way, on my site I have 2 different products_t.tpl variations... all are determined by an if/else in products.tpl. Some products are displayed with a 2-up category page, some with 3, some just use the default products listing.
Code:
{if $usertype eq "C" and $cat eq "20" or $cat eq "11" or $cat eq "3" or $cat eq "1" } {include file="customer/main/products_t2.tpl" products=$products} {elseif $usertype eq "C" and $cat ne "17" and $config.Appearance.products_per_row ne "" and $config.Appearance.products_per_row gt 0 and $config.Appearance.products_per_row lt 4 and ($featured eq "Y" or $config.Appearance.featured_only_multicolumn eq "N")} {include file="customer/main/products_t.tpl" products=$products} {else} {if $products}

This is for CATEGORY pages -- but it all works the same way... this is a VERY simple way to implement this. You can make it much more complicated as your store requires.

The thread Padraic suggested is a great start.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 07:18 AM.

   

 
X-Cart forums © 2001-2020