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

Custom product display

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 07-16-2008, 02:26 AM
 
qrichou qrichou is offline
 

Advanced Member
  
Join Date: Oct 2007
Posts: 39
 

Default Custom product display

Hi,

I have created a custom product display products_t_ch.tpl that is to look like a colour chart http://dev.artyfect.com/wn-artists-acrylic-colour-c-25.html

The problem i have is that i want this product display to show 4 products per row but the default for the other product displays to stay the same as set in x-cart 3 per row.

Does anyone know how to achevie this.

Many Thanks
Reply With Quote
  #2  
Old 07-21-2008, 09:18 AM
 
Thedae2k Thedae2k is offline
 

eXpert
  
Join Date: Jan 2004
Posts: 288
 

Default Re: Custom product display

Is it that you want this one specific product to use the different products_t_ch.tpl and all the others us the original products_t.tpl? If the only change is the number of products then you could problably try an {if}{else} like below.

I am not sure the correct code for this but I think you would need to use something like this on your products_t.tpl and not use the products_t_ch.tpl

{if} $products[product].XXXX {math equation="floor(100/x)" x=4="width"}
{else}
{math equation="floor(100/x)" x=$config.Appearance.products_per_row assign="width"}
{/if}

{section name=product loop=$products}
{assign var="discount" value=0}

{if %product.index% is div by $config.Appearance.products_per_row}
<tr>
{assign var="cell_counter" value=0}
{/if}

{math equation="x+1" x=$cell_counter assign="cell_counter" }


This is just a starting point and certianly not correct. Good luck and if you had a different look and feel between the different products templates you would need to do somehitng completely different.
__________________
X-Cart Pro 4.1.9
PHP5.2.5
MySQL 5.0.54
IIS/Apache/NGINX Webservers
Reply With Quote
  #3  
Old 07-22-2008, 01:02 AM
 
qrichou qrichou is offline
 

Advanced Member
  
Join Date: Oct 2007
Posts: 39
 

Default Re: Custom product display

Hi,

What we want is to use a 4 column layout only on specific categorys and these products will use the products_t_ch.tpl

The custom product display(products_t_ch.tpl) only displays on certain categories due to a if statement in subcategories.tpl (below) but cant figure out how to make these categories display in a 4 column layout.

{if $current_category.categoryid eq "25" or $current_category.categoryid eq "26" or $current_category.categoryid eq "173" or $current_category.categoryid eq "174" or $current_category.categoryid eq "182" or $current_category.categoryid eq "39" or $current_category.categoryid eq "35" or $current_category.categoryid eq "36" or $current_category.categoryid eq "37" or $current_category.categoryid eq "38" or $current_category.categoryid eq "138" or $current_category.categoryid eq "139" or $current_category.categoryid eq "186" or $current_category.categoryid eq "187"}
{include file="customer/main/products_t_ch.tpl" products=$products}
{else}
{include file="customer/main/products.tpl" products=$products}
{/if}

I see if i can try what you have sent to see if it works.

Many Thanks
Reply With Quote
  #4  
Old 07-22-2008, 08:29 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: Custom product display

The standard products_t.tpl contains the statement
"{math equation="floor(100/x)" x=$config.Appearance.products_per_row assign="width"}"

Have you tried changing the "x" to 4....
"{math equation="floor(100/4)" 4=$config.Appearance.products_per_row assign="width"}"

in your products_t_ch.tpl?
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
  #5  
Old 07-23-2008, 10:58 PM
 
Thedae2k Thedae2k is offline
 

eXpert
  
Join Date: Jan 2004
Posts: 288
 

Default Re: Custom product display

I think you may want to look at these mods...

http://www.websitecm.com/_search.php?page=1&q=product+templates

they should be perfect for you.
__________________
X-Cart Pro 4.1.9
PHP5.2.5
MySQL 5.0.54
IIS/Apache/NGINX Webservers
Reply With Quote
  #6  
Old 07-24-2008, 12:39 AM
 
Tony Pearce Tony Pearce is offline
 

eXpert
  
Join Date: Apr 2004
Location: Totnes, Devon, UK
Posts: 217
 

Default Re: Custom product display

Hi Thedae2k
seem to see you on the same posts!!

anyway, again we use this mod, very good, here are two examples:

http://www.cableuniverse.co.uk/catalog/cable/cat5e-cables-straight/
with an altered layout

and standard layout:
http://www.cableuniverse.co.uk/catalog/cable/faceplates-modules/

simple to customise with a little playing around and starting points are provided.

Tony
__________________
X Cart version 4.1.9, 4.1.10, 4.1.11, 4.1.12
(Looking after 15 stores)
Just started 4.4.1 for client....
One Page Checkout, On-Sale, Dynamic Images ++++ Loads of others.
+ 2 Multi Domain stores on 4.1.9
Reply With Quote
  #7  
Old 07-24-2008, 03:01 AM
 
qrichou qrichou is offline
 

Advanced Member
  
Join Date: Oct 2007
Posts: 39
 

Default Re: Custom product display

Hi Thedae2k,

Thanks for the mod link, that is what we need.
Reply With Quote
  #8  
Old 07-25-2008, 08:28 AM
 
Thedae2k Thedae2k is offline
 

eXpert
  
Join Date: Jan 2004
Posts: 288
 

Default Re: Custom product display

Tony...which of those mods did you use?
__________________
X-Cart Pro 4.1.9
PHP5.2.5
MySQL 5.0.54
IIS/Apache/NGINX Webservers
Reply With Quote
  #9  
Old 07-25-2008, 08:57 AM
 
Tony Pearce Tony Pearce is offline
 

eXpert
  
Join Date: Apr 2004
Location: Totnes, Devon, UK
Posts: 217
 

Default Re: Custom product display

Hi Thedae2k

I used this package, made life easy!

http://www.websitecm.com/x-cart-mods/multiple-product-templates-package-for-xcart.html

Cheers

Tony
__________________
X Cart version 4.1.9, 4.1.10, 4.1.11, 4.1.12
(Looking after 15 stores)
Just started 4.4.1 for client....
One Page Checkout, On-Sale, Dynamic Images ++++ Loads of others.
+ 2 Multi Domain stores on 4.1.9
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 02:31 AM.

   

 
X-Cart forums © 2001-2020